184943d6fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 284943d6fSEmmanuel Vadot%YAML 1.2 384943d6fSEmmanuel Vadot--- 484943d6fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/nuvoton,npcm845-pinctrl.yaml# 584943d6fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 684943d6fSEmmanuel Vadot 784943d6fSEmmanuel Vadottitle: Nuvoton NPCM845 Pin Controller and GPIO 884943d6fSEmmanuel Vadot 984943d6fSEmmanuel Vadotmaintainers: 1084943d6fSEmmanuel Vadot - Tomer Maimon <tmaimon77@gmail.com> 1184943d6fSEmmanuel Vadot 1284943d6fSEmmanuel Vadotdescription: 1384943d6fSEmmanuel Vadot The Nuvoton BMC NPCM8XX Pin Controller multi-function routed through 1484943d6fSEmmanuel Vadot the multiplexing block, Each pin supports GPIO functionality (GPIOx) 1584943d6fSEmmanuel Vadot and multiple functions that directly connect the pin to different 1684943d6fSEmmanuel Vadot hardware blocks. 1784943d6fSEmmanuel Vadot 1884943d6fSEmmanuel Vadotproperties: 1984943d6fSEmmanuel Vadot compatible: 2084943d6fSEmmanuel Vadot const: nuvoton,npcm845-pinctrl 2184943d6fSEmmanuel Vadot 2284943d6fSEmmanuel Vadot ranges: 2384943d6fSEmmanuel Vadot maxItems: 1 2484943d6fSEmmanuel Vadot 2584943d6fSEmmanuel Vadot '#address-cells': 2684943d6fSEmmanuel Vadot const: 1 2784943d6fSEmmanuel Vadot 2884943d6fSEmmanuel Vadot '#size-cells': 2984943d6fSEmmanuel Vadot const: 1 3084943d6fSEmmanuel Vadot 3184943d6fSEmmanuel Vadot nuvoton,sysgcr: 3284943d6fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 3384943d6fSEmmanuel Vadot description: a phandle to access GCR registers. 3484943d6fSEmmanuel Vadot 3584943d6fSEmmanuel VadotpatternProperties: 3684943d6fSEmmanuel Vadot '^gpio@': 3784943d6fSEmmanuel Vadot type: object 3884943d6fSEmmanuel Vadot additionalProperties: false 3984943d6fSEmmanuel Vadot 4084943d6fSEmmanuel Vadot description: 4184943d6fSEmmanuel Vadot Eight GPIO banks that each contain 32 GPIOs. 4284943d6fSEmmanuel Vadot 4384943d6fSEmmanuel Vadot properties: 4484943d6fSEmmanuel Vadot gpio-controller: true 4584943d6fSEmmanuel Vadot 4684943d6fSEmmanuel Vadot '#gpio-cells': 4784943d6fSEmmanuel Vadot const: 2 4884943d6fSEmmanuel Vadot 4984943d6fSEmmanuel Vadot reg: 5084943d6fSEmmanuel Vadot maxItems: 1 5184943d6fSEmmanuel Vadot 5284943d6fSEmmanuel Vadot interrupts: 5384943d6fSEmmanuel Vadot maxItems: 1 5484943d6fSEmmanuel Vadot 5584943d6fSEmmanuel Vadot gpio-ranges: 5684943d6fSEmmanuel Vadot maxItems: 1 5784943d6fSEmmanuel Vadot 5884943d6fSEmmanuel Vadot required: 5984943d6fSEmmanuel Vadot - gpio-controller 6084943d6fSEmmanuel Vadot - '#gpio-cells' 6184943d6fSEmmanuel Vadot - reg 6284943d6fSEmmanuel Vadot - interrupts 6384943d6fSEmmanuel Vadot - gpio-ranges 6484943d6fSEmmanuel Vadot 6584943d6fSEmmanuel Vadot '-mux$': 6684943d6fSEmmanuel Vadot $ref: pinmux-node.yaml# 6784943d6fSEmmanuel Vadot 6884943d6fSEmmanuel Vadot properties: 6984943d6fSEmmanuel Vadot groups: 7084943d6fSEmmanuel Vadot description: 7184943d6fSEmmanuel Vadot One or more groups of pins to mux to a certain function 7284943d6fSEmmanuel Vadot items: 7384943d6fSEmmanuel Vadot enum: [ iox1, iox2, smb1d, smb2d, lkgpo1, lkgpo2, ioxh, gspi, 74*b2d2a78aSEmmanuel Vadot smb5b, smb5c, lkgpo0, pspi, jm1, jm2, smb4b, smb4c, smb15, 75*b2d2a78aSEmmanuel Vadot smb16, smb17, smb18, smb19, smb20, smb21, smb22, smb23, 76*b2d2a78aSEmmanuel Vadot smb23b, smb4d, smb14, smb5, smb4, smb3, spi0cs1, spi0cs2, 77*b2d2a78aSEmmanuel Vadot spi0cs3, spi1cs0, spi1cs1, spi1cs2, spi1cs3, spi1cs23, smb3c, 78*b2d2a78aSEmmanuel Vadot smb3b, bmcuart0a, uart1, jtag2, bmcuart1, uart2, sg1mdio, 79*b2d2a78aSEmmanuel Vadot bmcuart0b, r1err, r1md, r1oen, r2oen, rmii3, r3oen, smb3d, 80*b2d2a78aSEmmanuel Vadot fanin0, fanin1, fanin2, fanin3, fanin4, fanin5, fanin6, 81*b2d2a78aSEmmanuel Vadot fanin7, fanin8, fanin9, fanin10, fanin11, fanin12, fanin13, 82*b2d2a78aSEmmanuel Vadot fanin14, fanin15, pwm0, pwm1, pwm2, pwm3, r2, r2err, r2md, 83*b2d2a78aSEmmanuel Vadot r3rxer, ga20kbc, smb5d, lpc, espi, rg2, ddr, i3c0, i3c1, 84*b2d2a78aSEmmanuel Vadot i3c2, i3c3, i3c4, i3c5, smb0, smb1, smb2, smb2c, smb2b, smb1c, 85*b2d2a78aSEmmanuel Vadot smb1b, smb8, smb9, smb10, smb11, sd1, sd1pwr, pwm4, pwm5, 86*b2d2a78aSEmmanuel Vadot pwm6, pwm7, pwm8, pwm9, pwm10, pwm11, mmc8, mmc, mmcwp, mmccd, 87*b2d2a78aSEmmanuel Vadot mmcrst, clkout, serirq, scipme, smi, smb6, smb6b, smb6c, 88*b2d2a78aSEmmanuel Vadot smb6d, smb7, smb7b, smb7c, smb7d, spi1, faninx, r1, spi3, 89*b2d2a78aSEmmanuel Vadot spi3cs1, spi3quad, spi3cs2, spi3cs3, nprd_smi, smb0b, smb0c, 90*b2d2a78aSEmmanuel Vadot smb0den, smb0d, ddc, rg2mdio, wdog1, wdog2, smb12, smb13, 91*b2d2a78aSEmmanuel Vadot spix, spixcs1, clkreq, hgpio0, hgpio1, hgpio2, hgpio3, hgpio4, 92*b2d2a78aSEmmanuel Vadot hgpio5, hgpio6, hgpio7, bu4, bu4b, bu5, bu5b, bu6, gpo187 ] 9384943d6fSEmmanuel Vadot 9484943d6fSEmmanuel Vadot function: 9584943d6fSEmmanuel Vadot description: 9684943d6fSEmmanuel Vadot The function that a group of pins is muxed to 97*b2d2a78aSEmmanuel Vadot enum: [ iox1, iox2, smb1d, smb2d, lkgpo1, lkgpo2, ioxh, gspi, smb5b, 98*b2d2a78aSEmmanuel Vadot smb5c, lkgpo0, pspi, jm1, jm2, smb4b, smb4c, smb15, smb16, 99*b2d2a78aSEmmanuel Vadot smb17, smb18, smb19, smb20, smb21, smb22, smb23, smb23b, smb4d, 100*b2d2a78aSEmmanuel Vadot smb14, smb5, smb4, smb3, spi0cs1, spi0cs2, spi0cs3, spi1cs0, 101*b2d2a78aSEmmanuel Vadot spi1cs1, spi1cs2, spi1cs3, spi1cs23, smb3c, smb3b, bmcuart0a, 102*b2d2a78aSEmmanuel Vadot uart1, jtag2, bmcuart1, uart2, sg1mdio, bmcuart0b, r1err, r1md, 103*b2d2a78aSEmmanuel Vadot r1oen, r2oen, rmii3, r3oen, smb3d, fanin0, fanin1, fanin2, 104*b2d2a78aSEmmanuel Vadot fanin3, fanin4, fanin5, fanin6, fanin7, fanin8, fanin9, fanin10, 10584943d6fSEmmanuel Vadot fanin11, fanin12, fanin13, fanin14, fanin15, pwm0, pwm1, pwm2, 10684943d6fSEmmanuel Vadot pwm3, r2, r2err, r2md, r3rxer, ga20kbc, smb5d, lpc, espi, rg2, 10784943d6fSEmmanuel Vadot ddr, i3c0, i3c1, i3c2, i3c3, i3c4, i3c5, smb0, smb1, smb2, 10884943d6fSEmmanuel Vadot smb2c, smb2b, smb1c, smb1b, smb8, smb9, smb10, smb11, sd1, 10984943d6fSEmmanuel Vadot sd1pwr, pwm4, pwm5, pwm6, pwm7, pwm8, pwm9, pwm10, pwm11, 110*b2d2a78aSEmmanuel Vadot mmc8, mmc, mmcwp, mmccd, mmcrst, clkout, serirq, scipme, smi, 111*b2d2a78aSEmmanuel Vadot smb6, smb6b, smb6c, smb6d, smb7, smb7b, smb7c, smb7d, spi1, 112*b2d2a78aSEmmanuel Vadot faninx, r1, spi3, spi3cs1, spi3quad, spi3cs2, spi3cs3, nprd_smi, 113*b2d2a78aSEmmanuel Vadot smb0b, smb0c, smb0den, smb0d, ddc, rg2mdio, wdog1, wdog2, 114*b2d2a78aSEmmanuel Vadot smb12, smb13, spix, spixcs1, clkreq, hgpio0, hgpio1, hgpio2, 115*b2d2a78aSEmmanuel Vadot hgpio3, hgpio4, hgpio5, hgpio6, hgpio7, bu4, bu4b, bu5, bu5b, 116*b2d2a78aSEmmanuel Vadot bu6, gpo187 ] 11784943d6fSEmmanuel Vadot 11884943d6fSEmmanuel Vadot dependencies: 11984943d6fSEmmanuel Vadot groups: [ function ] 12084943d6fSEmmanuel Vadot function: [ groups ] 12184943d6fSEmmanuel Vadot 12284943d6fSEmmanuel Vadot additionalProperties: false 12384943d6fSEmmanuel Vadot 12484943d6fSEmmanuel Vadot '^pin': 12584943d6fSEmmanuel Vadot $ref: pincfg-node.yaml# 12684943d6fSEmmanuel Vadot 12784943d6fSEmmanuel Vadot properties: 12884943d6fSEmmanuel Vadot pins: 12984943d6fSEmmanuel Vadot description: 13084943d6fSEmmanuel Vadot A list of pins to configure in certain ways, such as enabling 13184943d6fSEmmanuel Vadot debouncing 13284943d6fSEmmanuel Vadot items: 13384943d6fSEmmanuel Vadot pattern: '^GPIO([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-6])' 13484943d6fSEmmanuel Vadot 13584943d6fSEmmanuel Vadot bias-disable: true 13684943d6fSEmmanuel Vadot 13784943d6fSEmmanuel Vadot bias-pull-up: true 13884943d6fSEmmanuel Vadot 13984943d6fSEmmanuel Vadot bias-pull-down: true 14084943d6fSEmmanuel Vadot 14184943d6fSEmmanuel Vadot input-enable: true 14284943d6fSEmmanuel Vadot 14384943d6fSEmmanuel Vadot output-low: true 14484943d6fSEmmanuel Vadot 14584943d6fSEmmanuel Vadot output-high: true 14684943d6fSEmmanuel Vadot 14784943d6fSEmmanuel Vadot drive-push-pull: true 14884943d6fSEmmanuel Vadot 14984943d6fSEmmanuel Vadot drive-open-drain: true 15084943d6fSEmmanuel Vadot 15184943d6fSEmmanuel Vadot input-debounce: 15284943d6fSEmmanuel Vadot description: 15384943d6fSEmmanuel Vadot Debouncing periods in microseconds, one period per interrupt 15484943d6fSEmmanuel Vadot bank found in the controller 15584943d6fSEmmanuel Vadot minItems: 1 15684943d6fSEmmanuel Vadot maxItems: 4 15784943d6fSEmmanuel Vadot 15884943d6fSEmmanuel Vadot slew-rate: 15984943d6fSEmmanuel Vadot description: | 16084943d6fSEmmanuel Vadot 0: Low rate 16184943d6fSEmmanuel Vadot 1: High rate 16284943d6fSEmmanuel Vadot enum: [0, 1] 16384943d6fSEmmanuel Vadot 16484943d6fSEmmanuel Vadot drive-strength: 16584943d6fSEmmanuel Vadot enum: [ 0, 1, 2, 4, 8, 12 ] 16684943d6fSEmmanuel Vadot 16784943d6fSEmmanuel Vadot additionalProperties: false 16884943d6fSEmmanuel Vadot 16984943d6fSEmmanuel VadotallOf: 17084943d6fSEmmanuel Vadot - $ref: pinctrl.yaml# 17184943d6fSEmmanuel Vadot 17284943d6fSEmmanuel Vadotrequired: 17384943d6fSEmmanuel Vadot - compatible 17484943d6fSEmmanuel Vadot - ranges 17584943d6fSEmmanuel Vadot - '#address-cells' 17684943d6fSEmmanuel Vadot - '#size-cells' 17784943d6fSEmmanuel Vadot - nuvoton,sysgcr 17884943d6fSEmmanuel Vadot 17984943d6fSEmmanuel VadotadditionalProperties: false 18084943d6fSEmmanuel Vadot 18184943d6fSEmmanuel Vadotexamples: 18284943d6fSEmmanuel Vadot - | 18384943d6fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 18484943d6fSEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 18584943d6fSEmmanuel Vadot 18684943d6fSEmmanuel Vadot soc { 18784943d6fSEmmanuel Vadot #address-cells = <2>; 18884943d6fSEmmanuel Vadot #size-cells = <2>; 18984943d6fSEmmanuel Vadot 19084943d6fSEmmanuel Vadot pinctrl: pinctrl@f0010000 { 19184943d6fSEmmanuel Vadot compatible = "nuvoton,npcm845-pinctrl"; 19284943d6fSEmmanuel Vadot ranges = <0x0 0x0 0xf0010000 0x8000>; 19384943d6fSEmmanuel Vadot #address-cells = <1>; 19484943d6fSEmmanuel Vadot #size-cells = <1>; 19584943d6fSEmmanuel Vadot nuvoton,sysgcr = <&gcr>; 19684943d6fSEmmanuel Vadot 19784943d6fSEmmanuel Vadot gpio0: gpio@0 { 19884943d6fSEmmanuel Vadot gpio-controller; 19984943d6fSEmmanuel Vadot #gpio-cells = <2>; 20084943d6fSEmmanuel Vadot reg = <0x0 0xb0>; 20184943d6fSEmmanuel Vadot interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>; 20284943d6fSEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 32>; 20384943d6fSEmmanuel Vadot }; 20484943d6fSEmmanuel Vadot 20584943d6fSEmmanuel Vadot fanin0_pin: fanin0-mux { 20684943d6fSEmmanuel Vadot groups = "fanin0"; 20784943d6fSEmmanuel Vadot function = "fanin0"; 20884943d6fSEmmanuel Vadot }; 20984943d6fSEmmanuel Vadot 21084943d6fSEmmanuel Vadot pin34_slew: pin34-slew { 21184943d6fSEmmanuel Vadot pins = "GPIO34/I3C4_SDA"; 21284943d6fSEmmanuel Vadot bias-disable; 21384943d6fSEmmanuel Vadot }; 21484943d6fSEmmanuel Vadot }; 21584943d6fSEmmanuel Vadot }; 216