1*64aa494dSInochi Amaoto# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*64aa494dSInochi Amaoto%YAML 1.2 3*64aa494dSInochi Amaoto--- 4*64aa494dSInochi Amaoto$id: http://devicetree.org/schemas/pinctrl/sophgo,cv1800-pinctrl.yaml# 5*64aa494dSInochi Amaoto$schema: http://devicetree.org/meta-schemas/core.yaml# 6*64aa494dSInochi Amaoto 7*64aa494dSInochi Amaototitle: Sophgo CV1800 Pin Controller 8*64aa494dSInochi Amaoto 9*64aa494dSInochi Amaotomaintainers: 10*64aa494dSInochi Amaoto - Inochi Amaoto <inochiama@outlook.com> 11*64aa494dSInochi Amaoto 12*64aa494dSInochi Amaotoproperties: 13*64aa494dSInochi Amaoto compatible: 14*64aa494dSInochi Amaoto enum: 15*64aa494dSInochi Amaoto - sophgo,cv1800b-pinctrl 16*64aa494dSInochi Amaoto - sophgo,cv1812h-pinctrl 17*64aa494dSInochi Amaoto - sophgo,sg2000-pinctrl 18*64aa494dSInochi Amaoto - sophgo,sg2002-pinctrl 19*64aa494dSInochi Amaoto 20*64aa494dSInochi Amaoto reg: 21*64aa494dSInochi Amaoto items: 22*64aa494dSInochi Amaoto - description: pinctrl for system domain 23*64aa494dSInochi Amaoto - description: pinctrl for rtc domain 24*64aa494dSInochi Amaoto 25*64aa494dSInochi Amaoto reg-names: 26*64aa494dSInochi Amaoto items: 27*64aa494dSInochi Amaoto - const: sys 28*64aa494dSInochi Amaoto - const: rtc 29*64aa494dSInochi Amaoto 30*64aa494dSInochi Amaoto resets: 31*64aa494dSInochi Amaoto maxItems: 1 32*64aa494dSInochi Amaoto 33*64aa494dSInochi AmaotopatternProperties: 34*64aa494dSInochi Amaoto '-cfg$': 35*64aa494dSInochi Amaoto type: object 36*64aa494dSInochi Amaoto description: 37*64aa494dSInochi Amaoto A pinctrl node should contain at least one subnode representing the 38*64aa494dSInochi Amaoto pinctrl groups available on the machine. 39*64aa494dSInochi Amaoto 40*64aa494dSInochi Amaoto additionalProperties: false 41*64aa494dSInochi Amaoto 42*64aa494dSInochi Amaoto patternProperties: 43*64aa494dSInochi Amaoto '-pins$': 44*64aa494dSInochi Amaoto type: object 45*64aa494dSInochi Amaoto description: | 46*64aa494dSInochi Amaoto Each subnode will list the pins it needs, and how they should 47*64aa494dSInochi Amaoto be configured, with regard to muxer configuration, bias, input 48*64aa494dSInochi Amaoto enable/disable, input schmitt trigger, slew-rate, drive strength 49*64aa494dSInochi Amaoto and bus hold state. In addition, all pins in the same subnode 50*64aa494dSInochi Amaoto should have the same power domain. For configuration detail, 51*64aa494dSInochi Amaoto refer to https://github.com/sophgo/sophgo-doc/. 52*64aa494dSInochi Amaoto 53*64aa494dSInochi Amaoto allOf: 54*64aa494dSInochi Amaoto - $ref: pincfg-node.yaml# 55*64aa494dSInochi Amaoto - $ref: pinmux-node.yaml# 56*64aa494dSInochi Amaoto 57*64aa494dSInochi Amaoto properties: 58*64aa494dSInochi Amaoto pinmux: 59*64aa494dSInochi Amaoto description: | 60*64aa494dSInochi Amaoto The list of GPIOs and their mux settings that properties in the 61*64aa494dSInochi Amaoto node apply to. This should be set using the GPIOMUX or GPIOMUX2 62*64aa494dSInochi Amaoto macro. 63*64aa494dSInochi Amaoto 64*64aa494dSInochi Amaoto bias-pull-up: 65*64aa494dSInochi Amaoto type: boolean 66*64aa494dSInochi Amaoto 67*64aa494dSInochi Amaoto bias-pull-down: 68*64aa494dSInochi Amaoto type: boolean 69*64aa494dSInochi Amaoto 70*64aa494dSInochi Amaoto drive-strength-microamp: 71*64aa494dSInochi Amaoto description: typical current when output high level. 72*64aa494dSInochi Amaoto 73*64aa494dSInochi Amaoto input-schmitt-microvolt: 74*64aa494dSInochi Amaoto description: typical threshold for schmitt trigger. 75*64aa494dSInochi Amaoto 76*64aa494dSInochi Amaoto power-source: 77*64aa494dSInochi Amaoto description: power supplies at X mV. 78*64aa494dSInochi Amaoto enum: [ 1800, 3300 ] 79*64aa494dSInochi Amaoto 80*64aa494dSInochi Amaoto slew-rate: 81*64aa494dSInochi Amaoto description: slew rate for output buffer (0 is fast, 1 is slow) 82*64aa494dSInochi Amaoto enum: [ 0, 1 ] 83*64aa494dSInochi Amaoto 84*64aa494dSInochi Amaoto bias-bus-hold: true 85*64aa494dSInochi Amaoto 86*64aa494dSInochi Amaoto required: 87*64aa494dSInochi Amaoto - pinmux 88*64aa494dSInochi Amaoto - power-source 89*64aa494dSInochi Amaoto 90*64aa494dSInochi Amaoto additionalProperties: false 91*64aa494dSInochi Amaoto 92*64aa494dSInochi Amaotorequired: 93*64aa494dSInochi Amaoto - compatible 94*64aa494dSInochi Amaoto - reg 95*64aa494dSInochi Amaoto - reg-names 96*64aa494dSInochi Amaoto 97*64aa494dSInochi AmaotoadditionalProperties: false 98*64aa494dSInochi Amaoto 99*64aa494dSInochi Amaotoexamples: 100*64aa494dSInochi Amaoto - | 101*64aa494dSInochi Amaoto #include <dt-bindings/pinctrl/pinctrl-cv1800b.h> 102*64aa494dSInochi Amaoto 103*64aa494dSInochi Amaoto pinctrl@3001000 { 104*64aa494dSInochi Amaoto compatible = "sophgo,cv1800b-pinctrl"; 105*64aa494dSInochi Amaoto reg = <0x03001000 0x1000>, 106*64aa494dSInochi Amaoto <0x05027000 0x1000>; 107*64aa494dSInochi Amaoto reg-names = "sys", "rtc"; 108*64aa494dSInochi Amaoto 109*64aa494dSInochi Amaoto uart0_cfg: uart0-cfg { 110*64aa494dSInochi Amaoto uart0-pins { 111*64aa494dSInochi Amaoto pinmux = <PINMUX(PIN_UART0_TX, 0)>, 112*64aa494dSInochi Amaoto <PINMUX(PIN_UART0_RX, 0)>; 113*64aa494dSInochi Amaoto bias-pull-up; 114*64aa494dSInochi Amaoto drive-strength-microamp = <10800>; 115*64aa494dSInochi Amaoto input-schmitt-microvolt = <0>; 116*64aa494dSInochi Amaoto power-source = <3300>; 117*64aa494dSInochi Amaoto slew-rate = <0>; 118*64aa494dSInochi Amaoto }; 119*64aa494dSInochi Amaoto }; 120*64aa494dSInochi Amaoto }; 121*64aa494dSInochi Amaoto 122*64aa494dSInochi Amaoto... 123