1*c66ec88fSEmmanuel VadotBroadcom Northstar plus (NSP) GPIO/PINCONF Controller 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotRequired properties: 4*c66ec88fSEmmanuel Vadot- compatible: 5*c66ec88fSEmmanuel Vadot Must be "brcm,nsp-gpio-a" 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel Vadot- reg: 8*c66ec88fSEmmanuel Vadot Should contain the register physical address and length for each of 9*c66ec88fSEmmanuel Vadot GPIO base, IO control registers 10*c66ec88fSEmmanuel Vadot 11*c66ec88fSEmmanuel Vadot- #gpio-cells: 12*c66ec88fSEmmanuel Vadot Must be two. The first cell is the GPIO pin number (within the 13*c66ec88fSEmmanuel Vadot controller's pin space) and the second cell is used for the following: 14*c66ec88fSEmmanuel Vadot bit[0]: polarity (0 for active high and 1 for active low) 15*c66ec88fSEmmanuel Vadot 16*c66ec88fSEmmanuel Vadot- gpio-controller: 17*c66ec88fSEmmanuel Vadot Specifies that the node is a GPIO controller 18*c66ec88fSEmmanuel Vadot 19*c66ec88fSEmmanuel Vadot- ngpios: 20*c66ec88fSEmmanuel Vadot Number of gpios supported (58x25 supports 32 and 58x23 supports 24) 21*c66ec88fSEmmanuel Vadot 22*c66ec88fSEmmanuel VadotOptional properties: 23*c66ec88fSEmmanuel Vadot- interrupts: 24*c66ec88fSEmmanuel Vadot Interrupt ID 25*c66ec88fSEmmanuel Vadot 26*c66ec88fSEmmanuel Vadot- interrupt-controller: 27*c66ec88fSEmmanuel Vadot Specifies that the node is an interrupt controller 28*c66ec88fSEmmanuel Vadot 29*c66ec88fSEmmanuel Vadot- gpio-ranges: 30*c66ec88fSEmmanuel Vadot Specifies the mapping between gpio controller and pin-controllers pins. 31*c66ec88fSEmmanuel Vadot This requires 4 fields in cells defined as - 32*c66ec88fSEmmanuel Vadot 1. Phandle of pin-controller. 33*c66ec88fSEmmanuel Vadot 2. GPIO base pin offset. 34*c66ec88fSEmmanuel Vadot 3 Pin-control base pin offset. 35*c66ec88fSEmmanuel Vadot 4. number of gpio pins which are linearly mapped from pin base. 36*c66ec88fSEmmanuel Vadot 37*c66ec88fSEmmanuel VadotSupported generic PINCONF properties in child nodes: 38*c66ec88fSEmmanuel Vadot- pins: 39*c66ec88fSEmmanuel Vadot The list of pins (within the controller's own pin space) that properties 40*c66ec88fSEmmanuel Vadot in the node apply to. Pin names are "gpio-<pin>" 41*c66ec88fSEmmanuel Vadot 42*c66ec88fSEmmanuel Vadot- bias-disable: 43*c66ec88fSEmmanuel Vadot Disable pin bias 44*c66ec88fSEmmanuel Vadot 45*c66ec88fSEmmanuel Vadot- bias-pull-up: 46*c66ec88fSEmmanuel Vadot Enable internal pull up resistor 47*c66ec88fSEmmanuel Vadot 48*c66ec88fSEmmanuel Vadot- bias-pull-down: 49*c66ec88fSEmmanuel Vadot Enable internal pull down resistor 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel Vadot- drive-strength: 52*c66ec88fSEmmanuel Vadot Valid drive strength values include 2, 4, 6, 8, 10, 12, 14, 16 (mA) 53*c66ec88fSEmmanuel Vadot 54*c66ec88fSEmmanuel VadotExample: 55*c66ec88fSEmmanuel Vadot 56*c66ec88fSEmmanuel Vadot gpioa: gpio@18000020 { 57*c66ec88fSEmmanuel Vadot compatible = "brcm,nsp-gpio-a"; 58*c66ec88fSEmmanuel Vadot reg = <0x18000020 0x100>, 59*c66ec88fSEmmanuel Vadot <0x1803f1c4 0x1c>; 60*c66ec88fSEmmanuel Vadot #gpio-cells = <2>; 61*c66ec88fSEmmanuel Vadot gpio-controller; 62*c66ec88fSEmmanuel Vadot ngpios = <32>; 63*c66ec88fSEmmanuel Vadot gpio-ranges = <&pinctrl 0 0 31>; 64*c66ec88fSEmmanuel Vadot interrupt-controller; 65*c66ec88fSEmmanuel Vadot interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; 66*c66ec88fSEmmanuel Vadot 67*c66ec88fSEmmanuel Vadot /* Hog a few default settings */ 68*c66ec88fSEmmanuel Vadot pinctrl-names = "default"; 69*c66ec88fSEmmanuel Vadot pinctrl-0 = <&led>; 70*c66ec88fSEmmanuel Vadot led: led { 71*c66ec88fSEmmanuel Vadot pins = "gpio-1"; 72*c66ec88fSEmmanuel Vadot bias-pull-up; 73*c66ec88fSEmmanuel Vadot }; 74*c66ec88fSEmmanuel Vadot 75*c66ec88fSEmmanuel Vadot pwr: pwr { 76*c66ec88fSEmmanuel Vadot gpio-hog; 77*c66ec88fSEmmanuel Vadot gpios = <3 1>; 78*c66ec88fSEmmanuel Vadot output-high; 79*c66ec88fSEmmanuel Vadot }; 80*c66ec88fSEmmanuel Vadot }; 81