1*84943d6fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*84943d6fSEmmanuel Vadot%YAML 1.2 3*84943d6fSEmmanuel Vadot--- 4*84943d6fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/nuvoton,npcm845-pinctrl.yaml# 5*84943d6fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*84943d6fSEmmanuel Vadot 7*84943d6fSEmmanuel Vadottitle: Nuvoton NPCM845 Pin Controller and GPIO 8*84943d6fSEmmanuel Vadot 9*84943d6fSEmmanuel Vadotmaintainers: 10*84943d6fSEmmanuel Vadot - Tomer Maimon <tmaimon77@gmail.com> 11*84943d6fSEmmanuel Vadot 12*84943d6fSEmmanuel Vadotdescription: 13*84943d6fSEmmanuel Vadot The Nuvoton BMC NPCM8XX Pin Controller multi-function routed through 14*84943d6fSEmmanuel Vadot the multiplexing block, Each pin supports GPIO functionality (GPIOx) 15*84943d6fSEmmanuel Vadot and multiple functions that directly connect the pin to different 16*84943d6fSEmmanuel Vadot hardware blocks. 17*84943d6fSEmmanuel Vadot 18*84943d6fSEmmanuel Vadotproperties: 19*84943d6fSEmmanuel Vadot compatible: 20*84943d6fSEmmanuel Vadot const: nuvoton,npcm845-pinctrl 21*84943d6fSEmmanuel Vadot 22*84943d6fSEmmanuel Vadot ranges: 23*84943d6fSEmmanuel Vadot maxItems: 1 24*84943d6fSEmmanuel Vadot 25*84943d6fSEmmanuel Vadot '#address-cells': 26*84943d6fSEmmanuel Vadot const: 1 27*84943d6fSEmmanuel Vadot 28*84943d6fSEmmanuel Vadot '#size-cells': 29*84943d6fSEmmanuel Vadot const: 1 30*84943d6fSEmmanuel Vadot 31*84943d6fSEmmanuel Vadot nuvoton,sysgcr: 32*84943d6fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 33*84943d6fSEmmanuel Vadot description: a phandle to access GCR registers. 34*84943d6fSEmmanuel Vadot 35*84943d6fSEmmanuel VadotpatternProperties: 36*84943d6fSEmmanuel Vadot '^gpio@': 37*84943d6fSEmmanuel Vadot type: object 38*84943d6fSEmmanuel Vadot additionalProperties: false 39*84943d6fSEmmanuel Vadot 40*84943d6fSEmmanuel Vadot description: 41*84943d6fSEmmanuel Vadot Eight GPIO banks that each contain 32 GPIOs. 42*84943d6fSEmmanuel Vadot 43*84943d6fSEmmanuel Vadot properties: 44*84943d6fSEmmanuel Vadot gpio-controller: true 45*84943d6fSEmmanuel Vadot 46*84943d6fSEmmanuel Vadot '#gpio-cells': 47*84943d6fSEmmanuel Vadot const: 2 48*84943d6fSEmmanuel Vadot 49*84943d6fSEmmanuel Vadot reg: 50*84943d6fSEmmanuel Vadot maxItems: 1 51*84943d6fSEmmanuel Vadot 52*84943d6fSEmmanuel Vadot interrupts: 53*84943d6fSEmmanuel Vadot maxItems: 1 54*84943d6fSEmmanuel Vadot 55*84943d6fSEmmanuel Vadot gpio-ranges: 56*84943d6fSEmmanuel Vadot maxItems: 1 57*84943d6fSEmmanuel Vadot 58*84943d6fSEmmanuel Vadot required: 59*84943d6fSEmmanuel Vadot - gpio-controller 60*84943d6fSEmmanuel Vadot - '#gpio-cells' 61*84943d6fSEmmanuel Vadot - reg 62*84943d6fSEmmanuel Vadot - interrupts 63*84943d6fSEmmanuel Vadot - gpio-ranges 64*84943d6fSEmmanuel Vadot 65*84943d6fSEmmanuel Vadot '-mux$': 66*84943d6fSEmmanuel Vadot $ref: pinmux-node.yaml# 67*84943d6fSEmmanuel Vadot 68*84943d6fSEmmanuel Vadot properties: 69*84943d6fSEmmanuel Vadot groups: 70*84943d6fSEmmanuel Vadot description: 71*84943d6fSEmmanuel Vadot One or more groups of pins to mux to a certain function 72*84943d6fSEmmanuel Vadot items: 73*84943d6fSEmmanuel Vadot enum: [ iox1, iox2, smb1d, smb2d, lkgpo1, lkgpo2, ioxh, gspi, 74*84943d6fSEmmanuel Vadot smb5b, smb5c, lkgpo0, pspi, jm1, jm2, smb4den, smb4b, 75*84943d6fSEmmanuel Vadot smb4c, smb15, smb16, smb17, smb18, smb19, smb20, smb21, 76*84943d6fSEmmanuel Vadot smb22, smb23, smb23b, smb4d, smb14, smb5, smb4, smb3, 77*84943d6fSEmmanuel Vadot spi0cs1, spi0cs2, spi0cs3, spi1cs0, spi1cs1, spi1cs2, 78*84943d6fSEmmanuel Vadot spi1cs3, spi1cs23, smb3c, smb3b, bmcuart0a, uart1, jtag2, 79*84943d6fSEmmanuel Vadot bmcuart1, uart2, sg1mdio, bmcuart0b, r1err, r1md, r1oen, 80*84943d6fSEmmanuel Vadot r2oen, rmii3, r3oen, smb3d, fanin0, fanin1, fanin2, fanin3, 81*84943d6fSEmmanuel Vadot fanin4, fanin5, fanin6, fanin7, fanin8, fanin9, fanin10, 82*84943d6fSEmmanuel Vadot fanin11, fanin12, fanin13, fanin14, fanin15, pwm0, pwm1, pwm2, 83*84943d6fSEmmanuel Vadot pwm3, r2, r2err, r2md, r3rxer, ga20kbc, smb5d, lpc, espi, rg2, 84*84943d6fSEmmanuel Vadot ddr, i3c0, i3c1, i3c2, i3c3, i3c4, i3c5, smb0, smb1, smb2, 85*84943d6fSEmmanuel Vadot smb2c, smb2b, smb1c, smb1b, smb8, smb9, smb10, smb11, sd1, 86*84943d6fSEmmanuel Vadot sd1pwr, pwm4, pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11, 87*84943d6fSEmmanuel Vadot mmc8, mmc, mmcwp, mmccd, mmcrst, clkout, serirq, lpcclk, 88*84943d6fSEmmanuel Vadot scipme, smi, smb6, smb7, spi1, faninx, r1, spi3, spi3cs1, 89*84943d6fSEmmanuel Vadot spi3quad, spi3cs2, spi3cs3, nprd_smi, smb0b, smb0c, smb0den, 90*84943d6fSEmmanuel Vadot smb0d, ddc, rg2mdio, wdog1, wdog2, smb12, smb13, spix, 91*84943d6fSEmmanuel Vadot spixcs1, clkreq, hgpio0, hgpio1, hgpio2, hgpio3, hgpio4, 92*84943d6fSEmmanuel Vadot hgpio5, hgpio6, hgpio7 ] 93*84943d6fSEmmanuel Vadot 94*84943d6fSEmmanuel Vadot function: 95*84943d6fSEmmanuel Vadot description: 96*84943d6fSEmmanuel Vadot The function that a group of pins is muxed to 97*84943d6fSEmmanuel Vadot enum: [ iox1, iox2, smb1d, smb2d, lkgpo1, lkgpo2, ioxh, gspi, 98*84943d6fSEmmanuel Vadot smb5b, smb5c, lkgpo0, pspi, jm1, jm2, smb4den, smb4b, 99*84943d6fSEmmanuel Vadot smb4c, smb15, smb16, smb17, smb18, smb19, smb20, smb21, 100*84943d6fSEmmanuel Vadot smb22, smb23, smb23b, smb4d, smb14, smb5, smb4, smb3, 101*84943d6fSEmmanuel Vadot spi0cs1, spi0cs2, spi0cs3, spi1cs0, spi1cs1, spi1cs2, 102*84943d6fSEmmanuel Vadot spi1cs3, spi1cs23, smb3c, smb3b, bmcuart0a, uart1, jtag2, 103*84943d6fSEmmanuel Vadot bmcuart1, uart2, sg1mdio, bmcuart0b, r1err, r1md, r1oen, 104*84943d6fSEmmanuel Vadot r2oen, rmii3, r3oen, smb3d, fanin0, fanin1, fanin2, fanin3, 105*84943d6fSEmmanuel Vadot fanin4, fanin5, fanin6, fanin7, fanin8, fanin9, fanin10, 106*84943d6fSEmmanuel Vadot fanin11, fanin12, fanin13, fanin14, fanin15, pwm0, pwm1, pwm2, 107*84943d6fSEmmanuel Vadot pwm3, r2, r2err, r2md, r3rxer, ga20kbc, smb5d, lpc, espi, rg2, 108*84943d6fSEmmanuel Vadot ddr, i3c0, i3c1, i3c2, i3c3, i3c4, i3c5, smb0, smb1, smb2, 109*84943d6fSEmmanuel Vadot smb2c, smb2b, smb1c, smb1b, smb8, smb9, smb10, smb11, sd1, 110*84943d6fSEmmanuel Vadot sd1pwr, pwm4, pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11, 111*84943d6fSEmmanuel Vadot mmc8, mmc, mmcwp, mmccd, mmcrst, clkout, serirq, lpcclk, 112*84943d6fSEmmanuel Vadot scipme, smi, smb6, smb7, spi1, faninx, r1, spi3, spi3cs1, 113*84943d6fSEmmanuel Vadot spi3quad, spi3cs2, spi3cs3, nprd_smi, smb0b, smb0c, smb0den, 114*84943d6fSEmmanuel Vadot smb0d, ddc, rg2mdio, wdog1, wdog2, smb12, smb13, spix, 115*84943d6fSEmmanuel Vadot spixcs1, clkreq, hgpio0, hgpio1, hgpio2, hgpio3, hgpio4, 116*84943d6fSEmmanuel Vadot hgpio5, hgpio6, hgpio7 ] 117*84943d6fSEmmanuel Vadot 118*84943d6fSEmmanuel Vadot dependencies: 119*84943d6fSEmmanuel Vadot groups: [ function ] 120*84943d6fSEmmanuel Vadot function: [ groups ] 121*84943d6fSEmmanuel Vadot 122*84943d6fSEmmanuel Vadot additionalProperties: false 123*84943d6fSEmmanuel Vadot 124*84943d6fSEmmanuel Vadot '^pin': 125*84943d6fSEmmanuel Vadot $ref: pincfg-node.yaml# 126*84943d6fSEmmanuel Vadot 127*84943d6fSEmmanuel Vadot properties: 128*84943d6fSEmmanuel Vadot pins: 129*84943d6fSEmmanuel Vadot description: 130*84943d6fSEmmanuel Vadot A list of pins to configure in certain ways, such as enabling 131*84943d6fSEmmanuel Vadot debouncing 132*84943d6fSEmmanuel Vadot items: 133*84943d6fSEmmanuel Vadot pattern: '^GPIO([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-6])' 134*84943d6fSEmmanuel Vadot 135*84943d6fSEmmanuel Vadot bias-disable: true 136*84943d6fSEmmanuel Vadot 137*84943d6fSEmmanuel Vadot bias-pull-up: true 138*84943d6fSEmmanuel Vadot 139*84943d6fSEmmanuel Vadot bias-pull-down: true 140*84943d6fSEmmanuel Vadot 141*84943d6fSEmmanuel Vadot input-enable: true 142*84943d6fSEmmanuel Vadot 143*84943d6fSEmmanuel Vadot output-low: true 144*84943d6fSEmmanuel Vadot 145*84943d6fSEmmanuel Vadot output-high: true 146*84943d6fSEmmanuel Vadot 147*84943d6fSEmmanuel Vadot drive-push-pull: true 148*84943d6fSEmmanuel Vadot 149*84943d6fSEmmanuel Vadot drive-open-drain: true 150*84943d6fSEmmanuel Vadot 151*84943d6fSEmmanuel Vadot input-debounce: 152*84943d6fSEmmanuel Vadot description: 153*84943d6fSEmmanuel Vadot Debouncing periods in microseconds, one period per interrupt 154*84943d6fSEmmanuel Vadot bank found in the controller 155*84943d6fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 156*84943d6fSEmmanuel Vadot minItems: 1 157*84943d6fSEmmanuel Vadot maxItems: 4 158*84943d6fSEmmanuel Vadot 159*84943d6fSEmmanuel Vadot slew-rate: 160*84943d6fSEmmanuel Vadot description: | 161*84943d6fSEmmanuel Vadot 0: Low rate 162*84943d6fSEmmanuel Vadot 1: High rate 163*84943d6fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 164*84943d6fSEmmanuel Vadot enum: [0, 1] 165*84943d6fSEmmanuel Vadot 166*84943d6fSEmmanuel Vadot drive-strength: 167*84943d6fSEmmanuel Vadot enum: [ 0, 1, 2, 4, 8, 12 ] 168*84943d6fSEmmanuel Vadot 169*84943d6fSEmmanuel Vadot additionalProperties: false 170*84943d6fSEmmanuel Vadot 171*84943d6fSEmmanuel VadotallOf: 172*84943d6fSEmmanuel Vadot - $ref: pinctrl.yaml# 173*84943d6fSEmmanuel Vadot 174*84943d6fSEmmanuel Vadotrequired: 175*84943d6fSEmmanuel Vadot - compatible 176*84943d6fSEmmanuel Vadot - ranges 177*84943d6fSEmmanuel Vadot - '#address-cells' 178*84943d6fSEmmanuel Vadot - '#size-cells' 179*84943d6fSEmmanuel Vadot - nuvoton,sysgcr 180*84943d6fSEmmanuel Vadot 181*84943d6fSEmmanuel VadotadditionalProperties: false 182*84943d6fSEmmanuel Vadot 183*84943d6fSEmmanuel Vadotexamples: 184*84943d6fSEmmanuel Vadot - | 185*84943d6fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 186*84943d6fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 187*84943d6fSEmmanuel Vadot 188*84943d6fSEmmanuel Vadot soc { 189*84943d6fSEmmanuel Vadot #address-cells = <2>; 190*84943d6fSEmmanuel Vadot #size-cells = <2>; 191*84943d6fSEmmanuel Vadot 192*84943d6fSEmmanuel Vadot pinctrl: pinctrl@f0010000 { 193*84943d6fSEmmanuel Vadot compatible = "nuvoton,npcm845-pinctrl"; 194*84943d6fSEmmanuel Vadot ranges = <0x0 0x0 0xf0010000 0x8000>; 195*84943d6fSEmmanuel Vadot #address-cells = <1>; 196*84943d6fSEmmanuel Vadot #size-cells = <1>; 197*84943d6fSEmmanuel Vadot nuvoton,sysgcr = <&gcr>; 198*84943d6fSEmmanuel Vadot 199*84943d6fSEmmanuel Vadot gpio0: gpio@0 { 200*84943d6fSEmmanuel Vadot gpio-controller; 201*84943d6fSEmmanuel Vadot #gpio-cells = <2>; 202*84943d6fSEmmanuel Vadot reg = <0x0 0xb0>; 203*84943d6fSEmmanuel Vadot interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>; 204*84943d6fSEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 32>; 205*84943d6fSEmmanuel Vadot }; 206*84943d6fSEmmanuel Vadot 207*84943d6fSEmmanuel Vadot fanin0_pin: fanin0-mux { 208*84943d6fSEmmanuel Vadot groups = "fanin0"; 209*84943d6fSEmmanuel Vadot function = "fanin0"; 210*84943d6fSEmmanuel Vadot }; 211*84943d6fSEmmanuel Vadot 212*84943d6fSEmmanuel Vadot pin34_slew: pin34-slew { 213*84943d6fSEmmanuel Vadot pins = "GPIO34/I3C4_SDA"; 214*84943d6fSEmmanuel Vadot bias-disable; 215*84943d6fSEmmanuel Vadot }; 216*84943d6fSEmmanuel Vadot }; 217*84943d6fSEmmanuel Vadot }; 218