···11+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause22+%YAML 1.233+---44+$id: http://devicetree.org/schemas/pinctrl/sophgo,sg2042-pinctrl.yaml#55+$schema: http://devicetree.org/meta-schemas/core.yaml#66+77+title: Sophgo SG2042 Pin Controller88+99+maintainers:1010+ - Inochi Amaoto <inochiama@outlook.com>1111+1212+properties:1313+ compatible:1414+ enum:1515+ - sophgo,sg2042-pinctrl1616+ - sophgo,sg2044-pinctrl1717+1818+ reg:1919+ maxItems: 12020+2121+patternProperties:2222+ '-cfg$':2323+ type: object2424+ description:2525+ A pinctrl node should contain at least one subnode representing the2626+ pinctrl groups available on the machine.2727+2828+ additionalProperties: false2929+3030+ patternProperties:3131+ '-pins$':3232+ type: object3333+ description: |3434+ Each subnode will list the pins it needs, and how they should3535+ be configured, with regard to muxer configuration, bias input3636+ enable/disable, input schmitt trigger enable, drive strength3737+ output enable/disable state. For configuration detail,3838+ refer to https://github.com/sophgo/sophgo-doc/.3939+4040+ allOf:4141+ - $ref: pincfg-node.yaml#4242+ - $ref: pinmux-node.yaml#4343+4444+ properties:4545+ pinmux:4646+ description: |4747+ The list of GPIOs and their mux settings that properties in the4848+ node apply to. This should be set using the PINMUX macro.4949+5050+ bias-disable: true5151+5252+ bias-pull-up:5353+ type: boolean5454+5555+ bias-pull-down:5656+ type: boolean5757+5858+ drive-strength-microamp:5959+ description: typical current when output low level.6060+6161+ input-schmitt-enable: true6262+6363+ input-schmitt-disable: true6464+6565+ required:6666+ - pinmux6767+6868+ additionalProperties: false6969+7070+required:7171+ - compatible7272+ - reg7373+7474+allOf:7575+ - if:7676+ properties:7777+ compatible:7878+ contains:7979+ const: sophgo,sg2042-pinctrl8080+ then:8181+ patternProperties:8282+ '-cfg$':8383+ patternProperties:8484+ '-pins$':8585+ properties:8686+ drive-strength-microamp:8787+ enum: [ 5400, 8100, 10700, 13400,8888+ 16100, 18800, 21400, 24100,8989+ 26800, 29400, 32100, 34800,9090+ 37400, 40100, 42800, 45400 ]9191+9292+ - if:9393+ properties:9494+ compatible:9595+ contains:9696+ const: sophgo,sg2044-pinctrl9797+ then:9898+ patternProperties:9999+ '-cfg$':100100+ patternProperties:101101+ '-pins$':102102+ properties:103103+ drive-strength-microamp:104104+ enum: [ 3200, 6400, 9600, 12700,105105+ 15900, 19100, 22200, 25300,106106+ 29500, 32700, 35900, 39000,107107+ 42000, 45200, 48300, 51400]108108+109109+additionalProperties: false110110+111111+examples:112112+ - |113113+ #include <dt-bindings/pinctrl/pinctrl-sg2042.h>114114+115115+ pinctrl@30011000 {116116+ compatible = "sophgo,sg2042-pinctrl";117117+ reg = <30011000 0x1000>;118118+119119+ uart0_cfg: uart0-cfg {120120+ uart0-pins {121121+ pinmux = <PINMUX(PIN_UART0_TX, 0)>,122122+ <PINMUX(PIN_UART0_RX, 0)>;123123+ bias-pull-up;124124+ drive-strength-microamp = <13400>;125125+ };126126+ };127127+ };128128+129129+...
+40-6
drivers/pinctrl/sophgo/Kconfig
···33# Sophgo SoC PINCTRL drivers44#5566-config PINCTRL_SOPHGO_CV18XX77- bool66+config PINCTRL_SOPHGO_COMMON77+ tristate88 select GENERIC_PINCTRL_GROUPS99 select GENERIC_PINMUX_FUNCTIONS1010 select GENERIC_PINCONF1111+1212+config PINCTRL_SOPHGO_CV18XX_OPS1313+ bool11141215config PINCTRL_SOPHGO_CV1800B1316 tristate "Sophgo CV1800B SoC Pinctrl driver"1417 depends on ARCH_SOPHGO || COMPILE_TEST1518 depends on OF1616- select PINCTRL_SOPHGO_CV18XX1919+ select PINCTRL_SOPHGO_COMMON2020+ select PINCTRL_SOPHGO_CV18XX_OPS1721 help1822 Say Y to select the pinctrl driver for CV1800B SoC.1923 This pin controller allows selecting the mux function for···2824 tristate "Sophgo CV1812H SoC Pinctrl driver"2925 depends on ARCH_SOPHGO || COMPILE_TEST3026 depends on OF3131- select PINCTRL_SOPHGO_CV18XX2727+ select PINCTRL_SOPHGO_COMMON2828+ select PINCTRL_SOPHGO_CV18XX_OPS3229 help3330 Say Y to select the pinctrl driver for CV1812H SoC.3431 This pin controller allows selecting the mux function for···4035 tristate "Sophgo SG2000 SoC Pinctrl driver"4136 depends on ARCH_SOPHGO || COMPILE_TEST4237 depends on OF4343- select PINCTRL_SOPHGO_CV18XX3838+ select PINCTRL_SOPHGO_COMMON3939+ select PINCTRL_SOPHGO_CV18XX_OPS4440 help4541 Say Y to select the pinctrl driver for SG2000 SoC.4642 This pin controller allows selecting the mux function for···5246 tristate "Sophgo SG2002 SoC Pinctrl driver"5347 depends on ARCH_SOPHGO || COMPILE_TEST5448 depends on OF5555- select PINCTRL_SOPHGO_CV18XX4949+ select PINCTRL_SOPHGO_COMMON5050+ select PINCTRL_SOPHGO_CV18XX_OPS5651 help5752 Say Y to select the pinctrl driver for SG2002 SoC.5853 This pin controller allows selecting the mux function for5954 each pin. This driver can also be built as a module called6055 pinctrl-sg2002.5656+5757+config PINCTRL_SOPHGO_SG2042_OPS5858+ bool5959+6060+config PINCTRL_SOPHGO_SG20426161+ tristate "Sophgo SG2042 SoC Pinctrl driver"6262+ depends on ARCH_SOPHGO || COMPILE_TEST6363+ depends on OF6464+ select PINCTRL_SOPHGO_COMMON6565+ select PINCTRL_SOPHGO_SG2042_OPS6666+ help6767+ Say Y to select the pinctrl driver for SG2042 SoC.6868+ This pin controller allows selecting the mux function for6969+ each pin. This driver can also be built as a module called7070+ pinctrl-sg2042.7171+7272+config PINCTRL_SOPHGO_SG20447373+ tristate "Sophgo SG2044 SoC Pinctrl driver"7474+ depends on ARCH_SOPHGO || COMPILE_TEST7575+ depends on OF7676+ select PINCTRL_SOPHGO_COMMON7777+ select PINCTRL_SOPHGO_SG2042_OPS7878+ help7979+ Say Y to select the pinctrl driver for SG2044 SoC.8080+ This pin controller allows selecting the mux function for8181+ each pin. This driver can also be built as a module called8282+ pinctrl-sg2044.