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