18c2ecf20Sopenharmony_ciBroadcom Kona Family GPIO 28c2ecf20Sopenharmony_ci========================= 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThis GPIO driver is used in the following Broadcom SoCs: 58c2ecf20Sopenharmony_ci BCM11130, BCM11140, BCM11351, BCM28145, BCM28155 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciThe Broadcom GPIO Controller IP can be configured prior to synthesis to 88c2ecf20Sopenharmony_cisupport up to 8 banks of 32 GPIOs where each bank has its own IRQ. The 98c2ecf20Sopenharmony_ciGPIO controller only supports edge, not level, triggering of interrupts. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciRequired properties 128c2ecf20Sopenharmony_ci------------------- 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci- compatible: "brcm,bcm11351-gpio", "brcm,kona-gpio" 158c2ecf20Sopenharmony_ci- reg: Physical base address and length of the controller's registers. 168c2ecf20Sopenharmony_ci- interrupts: The interrupt outputs from the controller. There is one GPIO 178c2ecf20Sopenharmony_ci interrupt per GPIO bank. The number of interrupts listed depends on the 188c2ecf20Sopenharmony_ci number of GPIO banks on the SoC. The interrupts must be ordered by bank, 198c2ecf20Sopenharmony_ci starting with bank 0. There is always a 1:1 mapping between banks and 208c2ecf20Sopenharmony_ci IRQs. 218c2ecf20Sopenharmony_ci- #gpio-cells: Should be <2>. The first cell is the pin number, the second 228c2ecf20Sopenharmony_ci cell is used to specify optional parameters: 238c2ecf20Sopenharmony_ci - bit 0 specifies polarity (0 for normal, 1 for inverted) 248c2ecf20Sopenharmony_ci See also "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt. 258c2ecf20Sopenharmony_ci- #interrupt-cells: Should be <2>. The first cell is the GPIO number. The 268c2ecf20Sopenharmony_ci second cell is used to specify flags. The following subset of flags is 278c2ecf20Sopenharmony_ci supported: 288c2ecf20Sopenharmony_ci - trigger type (bits[1:0]): 298c2ecf20Sopenharmony_ci 1 = low-to-high edge triggered. 308c2ecf20Sopenharmony_ci 2 = high-to-low edge triggered. 318c2ecf20Sopenharmony_ci 3 = low-to-high or high-to-low edge triggered 328c2ecf20Sopenharmony_ci Valid values are 1, 2, 3 338c2ecf20Sopenharmony_ci See also .../devicetree/bindings/interrupt-controller/interrupts.txt. 348c2ecf20Sopenharmony_ci- gpio-controller: Marks the device node as a GPIO controller. 358c2ecf20Sopenharmony_ci- interrupt-controller: Marks the device node as an interrupt controller. 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciExample: 388c2ecf20Sopenharmony_ci gpio: gpio@35003000 { 398c2ecf20Sopenharmony_ci compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio"; 408c2ecf20Sopenharmony_ci reg = <0x35003000 0x800>; 418c2ecf20Sopenharmony_ci interrupts = 428c2ecf20Sopenharmony_ci <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH 438c2ecf20Sopenharmony_ci GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH 448c2ecf20Sopenharmony_ci GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH 458c2ecf20Sopenharmony_ci GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH 468c2ecf20Sopenharmony_ci GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH 478c2ecf20Sopenharmony_ci GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>; 488c2ecf20Sopenharmony_ci #gpio-cells = <2>; 498c2ecf20Sopenharmony_ci #interrupt-cells = <2>; 508c2ecf20Sopenharmony_ci gpio-controller; 518c2ecf20Sopenharmony_ci interrupt-controller; 528c2ecf20Sopenharmony_ci }; 53