1*c66ec88fSEmmanuel VadotBroadcom iProc GPIO/PINCONF Controller 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotRequired properties: 4*c66ec88fSEmmanuel Vadot 5*c66ec88fSEmmanuel Vadot- compatible: 6*c66ec88fSEmmanuel Vadot "brcm,iproc-gpio" for the generic iProc based GPIO controller IP that 7*c66ec88fSEmmanuel Vadot supports full-featured pinctrl and GPIO functions used in various iProc 8*c66ec88fSEmmanuel Vadot based SoCs 9*c66ec88fSEmmanuel Vadot 10*c66ec88fSEmmanuel Vadot May contain an SoC-specific compatibility string to accommodate any 11*c66ec88fSEmmanuel Vadot SoC-specific features 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel Vadot "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", or 14*c66ec88fSEmmanuel Vadot "brcm,cygnus-crmu-gpio" for Cygnus SoCs 15*c66ec88fSEmmanuel Vadot 16*c66ec88fSEmmanuel Vadot "brcm,iproc-nsp-gpio" for the iProc NSP SoC that has drive strength support 17*c66ec88fSEmmanuel Vadot disabled 18*c66ec88fSEmmanuel Vadot 19*c66ec88fSEmmanuel Vadot "brcm,iproc-stingray-gpio" for the iProc Stingray SoC that has the general 20*c66ec88fSEmmanuel Vadot pinctrl support completely disabled in this IP block. In Stingray, a 21*c66ec88fSEmmanuel Vadot different IP block is used to handle pinctrl related functions 22*c66ec88fSEmmanuel Vadot 23*c66ec88fSEmmanuel Vadot- reg: 24*c66ec88fSEmmanuel Vadot Define the base and range of the I/O address space that contains SoC 25*c66ec88fSEmmanuel VadotGPIO/PINCONF controller registers 26*c66ec88fSEmmanuel Vadot 27*c66ec88fSEmmanuel Vadot- ngpios: 28*c66ec88fSEmmanuel Vadot Total number of in-use slots in GPIO controller 29*c66ec88fSEmmanuel Vadot 30*c66ec88fSEmmanuel Vadot- #gpio-cells: 31*c66ec88fSEmmanuel Vadot Must be two. The first cell is the GPIO pin number (within the 32*c66ec88fSEmmanuel Vadotcontroller's pin space) and the second cell is used for the following: 33*c66ec88fSEmmanuel Vadot bit[0]: polarity (0 for active high and 1 for active low) 34*c66ec88fSEmmanuel Vadot 35*c66ec88fSEmmanuel Vadot- gpio-controller: 36*c66ec88fSEmmanuel Vadot Specifies that the node is a GPIO controller 37*c66ec88fSEmmanuel Vadot 38*c66ec88fSEmmanuel VadotOptional properties: 39*c66ec88fSEmmanuel Vadot 40*c66ec88fSEmmanuel Vadot- interrupts: 41*c66ec88fSEmmanuel Vadot Interrupt ID 42*c66ec88fSEmmanuel Vadot 43*c66ec88fSEmmanuel Vadot- interrupt-controller: 44*c66ec88fSEmmanuel Vadot Specifies that the node is an interrupt controller 45*c66ec88fSEmmanuel Vadot 46*c66ec88fSEmmanuel Vadot- gpio-ranges: 47*c66ec88fSEmmanuel Vadot Specifies the mapping between gpio controller and pin-controllers pins. 48*c66ec88fSEmmanuel Vadot This requires 4 fields in cells defined as - 49*c66ec88fSEmmanuel Vadot 1. Phandle of pin-controller. 50*c66ec88fSEmmanuel Vadot 2. GPIO base pin offset. 51*c66ec88fSEmmanuel Vadot 3 Pin-control base pin offset. 52*c66ec88fSEmmanuel Vadot 4. number of gpio pins which are linearly mapped from pin base. 53*c66ec88fSEmmanuel Vadot 54*c66ec88fSEmmanuel VadotSupported generic PINCONF properties in child nodes: 55*c66ec88fSEmmanuel Vadot 56*c66ec88fSEmmanuel Vadot- pins: 57*c66ec88fSEmmanuel Vadot The list of pins (within the controller's own pin space) that properties 58*c66ec88fSEmmanuel Vadotin the node apply to. Pin names are "gpio-<pin>" 59*c66ec88fSEmmanuel Vadot 60*c66ec88fSEmmanuel Vadot- bias-disable: 61*c66ec88fSEmmanuel Vadot Disable pin bias 62*c66ec88fSEmmanuel Vadot 63*c66ec88fSEmmanuel Vadot- bias-pull-up: 64*c66ec88fSEmmanuel Vadot Enable internal pull up resistor 65*c66ec88fSEmmanuel Vadot 66*c66ec88fSEmmanuel Vadot- bias-pull-down: 67*c66ec88fSEmmanuel Vadot Enable internal pull down resistor 68*c66ec88fSEmmanuel Vadot 69*c66ec88fSEmmanuel Vadot- drive-strength: 70*c66ec88fSEmmanuel Vadot Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA) 71*c66ec88fSEmmanuel Vadot 72*c66ec88fSEmmanuel VadotExample: 73*c66ec88fSEmmanuel Vadot gpio_ccm: gpio@1800a000 { 74*c66ec88fSEmmanuel Vadot compatible = "brcm,cygnus-ccm-gpio"; 75*c66ec88fSEmmanuel Vadot reg = <0x1800a000 0x50>, 76*c66ec88fSEmmanuel Vadot <0x0301d164 0x20>; 77*c66ec88fSEmmanuel Vadot ngpios = <24>; 78*c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 79*c66ec88fSEmmanuel Vadot gpio-controller; 80*c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>; 81*c66ec88fSEmmanuel Vadot interrupt-controller; 82*c66ec88fSEmmanuel Vadot 83*c66ec88fSEmmanuel Vadot touch_pins: touch_pins { 84*c66ec88fSEmmanuel Vadot pwr: pwr { 85*c66ec88fSEmmanuel Vadot pins = "gpio-0"; 86*c66ec88fSEmmanuel Vadot drive-strength = <16>; 87*c66ec88fSEmmanuel Vadot }; 88*c66ec88fSEmmanuel Vadot 89*c66ec88fSEmmanuel Vadot event: event { 90*c66ec88fSEmmanuel Vadot pins = "gpio-1"; 91*c66ec88fSEmmanuel Vadot bias-pull-up; 92*c66ec88fSEmmanuel Vadot }; 93*c66ec88fSEmmanuel Vadot }; 94*c66ec88fSEmmanuel Vadot }; 95*c66ec88fSEmmanuel Vadot 96*c66ec88fSEmmanuel Vadot gpio_asiu: gpio@180a5000 { 97*c66ec88fSEmmanuel Vadot compatible = "brcm,cygnus-asiu-gpio"; 98*c66ec88fSEmmanuel Vadot reg = <0x180a5000 0x668>; 99*c66ec88fSEmmanuel Vadot ngpios = <146>; 100*c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 101*c66ec88fSEmmanuel Vadot gpio-controller; 102*c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; 103*c66ec88fSEmmanuel Vadot interrupt-controller; 104*c66ec88fSEmmanuel Vadot gpio-ranges = <&pinctrl 0 42 1>, 105*c66ec88fSEmmanuel Vadot <&pinctrl 1 44 3>; 106*c66ec88fSEmmanuel Vadot }; 107*c66ec88fSEmmanuel Vadot 108*c66ec88fSEmmanuel Vadot /* 109*c66ec88fSEmmanuel Vadot * Touchscreen that uses the CCM GPIO 0 and 1 110*c66ec88fSEmmanuel Vadot */ 111*c66ec88fSEmmanuel Vadot tsc { 112*c66ec88fSEmmanuel Vadot ... 113*c66ec88fSEmmanuel Vadot ... 114*c66ec88fSEmmanuel Vadot gpio-pwr = <&gpio_ccm 0 0>; 115*c66ec88fSEmmanuel Vadot gpio-event = <&gpio_ccm 1 0>; 116*c66ec88fSEmmanuel Vadot }; 117*c66ec88fSEmmanuel Vadot 118*c66ec88fSEmmanuel Vadot /* Bluetooth that uses the ASIU GPIO 5, with polarity inverted */ 119*c66ec88fSEmmanuel Vadot bluetooth { 120*c66ec88fSEmmanuel Vadot ... 121*c66ec88fSEmmanuel Vadot ... 122*c66ec88fSEmmanuel Vadot bcm,rfkill-bank-sel = <&gpio_asiu 5 1> 123*c66ec88fSEmmanuel Vadot } 124