1*68ea8c87SInochi Amaoto# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*68ea8c87SInochi Amaoto%YAML 1.2 3*68ea8c87SInochi Amaoto--- 4*68ea8c87SInochi Amaoto$id: http://devicetree.org/schemas/pinctrl/sophgo,sg2042-pinctrl.yaml# 5*68ea8c87SInochi Amaoto$schema: http://devicetree.org/meta-schemas/core.yaml# 6*68ea8c87SInochi Amaoto 7*68ea8c87SInochi Amaototitle: Sophgo SG2042 Pin Controller 8*68ea8c87SInochi Amaoto 9*68ea8c87SInochi Amaotomaintainers: 10*68ea8c87SInochi Amaoto - Inochi Amaoto <inochiama@outlook.com> 11*68ea8c87SInochi Amaoto 12*68ea8c87SInochi Amaotoproperties: 13*68ea8c87SInochi Amaoto compatible: 14*68ea8c87SInochi Amaoto enum: 15*68ea8c87SInochi Amaoto - sophgo,sg2042-pinctrl 16*68ea8c87SInochi Amaoto - sophgo,sg2044-pinctrl 17*68ea8c87SInochi Amaoto 18*68ea8c87SInochi Amaoto reg: 19*68ea8c87SInochi Amaoto maxItems: 1 20*68ea8c87SInochi Amaoto 21*68ea8c87SInochi AmaotopatternProperties: 22*68ea8c87SInochi Amaoto '-cfg$': 23*68ea8c87SInochi Amaoto type: object 24*68ea8c87SInochi Amaoto description: 25*68ea8c87SInochi Amaoto A pinctrl node should contain at least one subnode representing the 26*68ea8c87SInochi Amaoto pinctrl groups available on the machine. 27*68ea8c87SInochi Amaoto 28*68ea8c87SInochi Amaoto additionalProperties: false 29*68ea8c87SInochi Amaoto 30*68ea8c87SInochi Amaoto patternProperties: 31*68ea8c87SInochi Amaoto '-pins$': 32*68ea8c87SInochi Amaoto type: object 33*68ea8c87SInochi Amaoto description: | 34*68ea8c87SInochi Amaoto Each subnode will list the pins it needs, and how they should 35*68ea8c87SInochi Amaoto be configured, with regard to muxer configuration, bias input 36*68ea8c87SInochi Amaoto enable/disable, input schmitt trigger enable, drive strength 37*68ea8c87SInochi Amaoto output enable/disable state. For configuration detail, 38*68ea8c87SInochi Amaoto refer to https://github.com/sophgo/sophgo-doc/. 39*68ea8c87SInochi Amaoto 40*68ea8c87SInochi Amaoto allOf: 41*68ea8c87SInochi Amaoto - $ref: pincfg-node.yaml# 42*68ea8c87SInochi Amaoto - $ref: pinmux-node.yaml# 43*68ea8c87SInochi Amaoto 44*68ea8c87SInochi Amaoto properties: 45*68ea8c87SInochi Amaoto pinmux: 46*68ea8c87SInochi Amaoto description: | 47*68ea8c87SInochi Amaoto The list of GPIOs and their mux settings that properties in the 48*68ea8c87SInochi Amaoto node apply to. This should be set using the PINMUX macro. 49*68ea8c87SInochi Amaoto 50*68ea8c87SInochi Amaoto bias-disable: true 51*68ea8c87SInochi Amaoto 52*68ea8c87SInochi Amaoto bias-pull-up: 53*68ea8c87SInochi Amaoto type: boolean 54*68ea8c87SInochi Amaoto 55*68ea8c87SInochi Amaoto bias-pull-down: 56*68ea8c87SInochi Amaoto type: boolean 57*68ea8c87SInochi Amaoto 58*68ea8c87SInochi Amaoto drive-strength-microamp: 59*68ea8c87SInochi Amaoto description: typical current when output low level. 60*68ea8c87SInochi Amaoto 61*68ea8c87SInochi Amaoto input-schmitt-enable: true 62*68ea8c87SInochi Amaoto 63*68ea8c87SInochi Amaoto input-schmitt-disable: true 64*68ea8c87SInochi Amaoto 65*68ea8c87SInochi Amaoto required: 66*68ea8c87SInochi Amaoto - pinmux 67*68ea8c87SInochi Amaoto 68*68ea8c87SInochi Amaoto additionalProperties: false 69*68ea8c87SInochi Amaoto 70*68ea8c87SInochi Amaotorequired: 71*68ea8c87SInochi Amaoto - compatible 72*68ea8c87SInochi Amaoto - reg 73*68ea8c87SInochi Amaoto 74*68ea8c87SInochi AmaotoallOf: 75*68ea8c87SInochi Amaoto - if: 76*68ea8c87SInochi Amaoto properties: 77*68ea8c87SInochi Amaoto compatible: 78*68ea8c87SInochi Amaoto contains: 79*68ea8c87SInochi Amaoto const: sophgo,sg2042-pinctrl 80*68ea8c87SInochi Amaoto then: 81*68ea8c87SInochi Amaoto patternProperties: 82*68ea8c87SInochi Amaoto '-cfg$': 83*68ea8c87SInochi Amaoto patternProperties: 84*68ea8c87SInochi Amaoto '-pins$': 85*68ea8c87SInochi Amaoto properties: 86*68ea8c87SInochi Amaoto drive-strength-microamp: 87*68ea8c87SInochi Amaoto enum: [ 5400, 8100, 10700, 13400, 88*68ea8c87SInochi Amaoto 16100, 18800, 21400, 24100, 89*68ea8c87SInochi Amaoto 26800, 29400, 32100, 34800, 90*68ea8c87SInochi Amaoto 37400, 40100, 42800, 45400 ] 91*68ea8c87SInochi Amaoto 92*68ea8c87SInochi Amaoto - if: 93*68ea8c87SInochi Amaoto properties: 94*68ea8c87SInochi Amaoto compatible: 95*68ea8c87SInochi Amaoto contains: 96*68ea8c87SInochi Amaoto const: sophgo,sg2044-pinctrl 97*68ea8c87SInochi Amaoto then: 98*68ea8c87SInochi Amaoto patternProperties: 99*68ea8c87SInochi Amaoto '-cfg$': 100*68ea8c87SInochi Amaoto patternProperties: 101*68ea8c87SInochi Amaoto '-pins$': 102*68ea8c87SInochi Amaoto properties: 103*68ea8c87SInochi Amaoto drive-strength-microamp: 104*68ea8c87SInochi Amaoto enum: [ 3200, 6400, 9600, 12700, 105*68ea8c87SInochi Amaoto 15900, 19100, 22200, 25300, 106*68ea8c87SInochi Amaoto 29500, 32700, 35900, 39000, 107*68ea8c87SInochi Amaoto 42000, 45200, 48300, 51400] 108*68ea8c87SInochi Amaoto 109*68ea8c87SInochi AmaotoadditionalProperties: false 110*68ea8c87SInochi Amaoto 111*68ea8c87SInochi Amaotoexamples: 112*68ea8c87SInochi Amaoto - | 113*68ea8c87SInochi Amaoto #include <dt-bindings/pinctrl/pinctrl-sg2042.h> 114*68ea8c87SInochi Amaoto 115*68ea8c87SInochi Amaoto pinctrl@30011000 { 116*68ea8c87SInochi Amaoto compatible = "sophgo,sg2042-pinctrl"; 117*68ea8c87SInochi Amaoto reg = <30011000 0x1000>; 118*68ea8c87SInochi Amaoto 119*68ea8c87SInochi Amaoto uart0_cfg: uart0-cfg { 120*68ea8c87SInochi Amaoto uart0-pins { 121*68ea8c87SInochi Amaoto pinmux = <PINMUX(PIN_UART0_TX, 0)>, 122*68ea8c87SInochi Amaoto <PINMUX(PIN_UART0_RX, 0)>; 123*68ea8c87SInochi Amaoto bias-pull-up; 124*68ea8c87SInochi Amaoto drive-strength-microamp = <13400>; 125*68ea8c87SInochi Amaoto }; 126*68ea8c87SInochi Amaoto }; 127*68ea8c87SInochi Amaoto }; 128*68ea8c87SInochi Amaoto 129*68ea8c87SInochi Amaoto... 130