Neil Armstrong | 9e80f90 | 2016-10-21 11:09:58 +0200 | [diff] [blame] | 1 | SEMTECH SX150x GPIO expander bindings |
| 2 | |
| 3 | Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and |
| 4 | ../interrupt-controller/interrupts.txt for generic information regarding |
| 5 | pin controller, GPIO, and interrupt bindings. |
| 6 | |
| 7 | Required properties: |
| 8 | - compatible: should be one of : |
Peter Rosin | 4f5ac8c | 2016-11-24 21:45:20 +0100 | [diff] [blame] | 9 | "semtech,sx1501q", |
Peter Rosin | bba709b | 2016-11-24 21:45:19 +0100 | [diff] [blame] | 10 | "semtech,sx1502q", |
| 11 | "semtech,sx1503q", |
Peter Rosin | 4f5ac8c | 2016-11-24 21:45:20 +0100 | [diff] [blame] | 12 | "semtech,sx1504q", |
| 13 | "semtech,sx1505q", |
Neil Armstrong | 9e80f90 | 2016-10-21 11:09:58 +0200 | [diff] [blame] | 14 | "semtech,sx1506q", |
Peter Rosin | 4f5ac8c | 2016-11-24 21:45:20 +0100 | [diff] [blame] | 15 | "semtech,sx1507q", |
Neil Armstrong | 9e80f90 | 2016-10-21 11:09:58 +0200 | [diff] [blame] | 16 | "semtech,sx1508q", |
Peter Rosin | bba709b | 2016-11-24 21:45:19 +0100 | [diff] [blame] | 17 | "semtech,sx1509q". |
Neil Armstrong | 9e80f90 | 2016-10-21 11:09:58 +0200 | [diff] [blame] | 18 | |
| 19 | - reg: The I2C slave address for this device. |
| 20 | |
| 21 | - #gpio-cells: Should be 2. The first cell is the GPIO number and the |
| 22 | second cell is used to specify optional parameters: |
| 23 | bit 0: polarity (0: normal, 1: inverted) |
| 24 | |
| 25 | - gpio-controller: Marks the device as a GPIO controller. |
| 26 | |
| 27 | Optional properties : |
| 28 | - interrupt-parent: phandle of the parent interrupt controller. |
| 29 | |
| 30 | - interrupts: Interrupt specifier for the controllers interrupt. |
| 31 | |
| 32 | - interrupt-controller: Marks the device as a interrupt controller. |
| 33 | |
| 34 | - semtech,probe-reset: Will trigger a reset of the GPIO expander on probe, |
Peter Rosin | 4f5ac8c | 2016-11-24 21:45:20 +0100 | [diff] [blame] | 35 | only for sx1507q, sx1508q and sx1509q |
Neil Armstrong | 9e80f90 | 2016-10-21 11:09:58 +0200 | [diff] [blame] | 36 | |
| 37 | The GPIO expander can optionally be used as an interrupt controller, in |
| 38 | which case it uses the default two cell specifier. |
| 39 | |
| 40 | Required properties for pin configuration sub-nodes: |
| 41 | - pins: List of pins to which the configuration applies. |
| 42 | |
| 43 | Optional properties for pin configuration sub-nodes: |
| 44 | ---------------------------------------------------- |
| 45 | - bias-disable: disable any pin bias, except the OSCIO pin |
| 46 | - bias-pull-up: pull up the pin, except the OSCIO pin |
| 47 | - bias-pull-down: pull down the pin, except the OSCIO pin |
| 48 | - bias-pull-pin-default: use pin-default pull state, except the OSCIO pin |
| 49 | - drive-push-pull: drive actively high and low |
Peter Rosin | 4f5ac8c | 2016-11-24 21:45:20 +0100 | [diff] [blame] | 50 | - drive-open-drain: drive with open drain only for sx1507q, sx1508q and sx1509q and except the OSCIO pin |
Neil Armstrong | 9e80f90 | 2016-10-21 11:09:58 +0200 | [diff] [blame] | 51 | - output-low: set the pin to output mode with low level |
| 52 | - output-high: set the pin to output mode with high level |
| 53 | |
| 54 | Example: |
| 55 | |
| 56 | i2c0gpio-expander@20{ |
| 57 | #gpio-cells = <2>; |
| 58 | #interrupt-cells = <2>; |
| 59 | compatible = "semtech,sx1506q"; |
| 60 | reg = <0x20>; |
| 61 | interrupt-parent = <&gpio_1>; |
| 62 | interrupts = <16 0>; |
| 63 | |
| 64 | gpio-controller; |
| 65 | interrupt-controller; |
| 66 | |
| 67 | pinctrl-names = "default"; |
| 68 | pinctrl-0 = <&gpio1_cfg_pins>; |
| 69 | |
| 70 | gpio1_cfg_pins: gpio1-cfg { |
| 71 | pins = "gpio1"; |
| 72 | bias-pull-up; |
| 73 | }; |
| 74 | }; |