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