| Semtech sx150x GPIO controller bindings |
| |
| Required properties: |
| - compatible: |
| - "sx1508q" for sx1508 GPIO controller |
| - "sx1509q" for sx1509 GPIO controller |
| - #gpio-cells : Should be two. |
| - first cell is the pin number |
| - second cell is used to specify optional parameters (unused) |
| - gpio-controller : Marks the device node as a GPIO controller. |
| - reg: 7-bit I2C address. |
| - sx150x,reset_onprobe: If set to true, the driver will trigger |
| a full reset of the chip at the beginning of the probe in order |
| to place it in a known state. |
| - sx150x,oscio_is_gpo: If set to true, the driver will configure |
| OSCIO as a GPO instead of as an oscillator, increasing the size |
| of the GP(I)O pool created by this expander by one. The |
| output-only GPO pin will be added at the end of the block. |
| - sx150x,pullup_ena: A bit-mask which enables or disables the pull-up |
| resistor for each IO line in the expander. Setting the bit at |
| position n will enable the pull-up for the IO at the corresponding |
| offset. For chips with fewer than 16 IO pins, high-end bits are ignored. |
| - sx150x,pulldn_ena: A bit-mask which enables-or disables the pull-down |
| resistor for each IO line in the expander. Setting the bit at position |
| n will enable the pull-down for the IO at the corresponding offset. |
| For chips with fewer than 16 IO pins, high-end bits are ignored. |
| - sx150x,float_ena: A bit-mask which enables-or disables open-drain |
| operation for each IO line in the expander. Setting the bit at |
| position n enables open-drain operation for the IO at the corresponding |
| offset. Clearing the bit enables regular push-pull operation for that IO. |
| For chips with fewer than 16 IO pins, high-end bits are ignored. |
| - sx150x,polarity: A bit-mask which enables polarity inversion for each IO line |
| in the expander. Setting the bit at position n inverts the polarity of |
| that IO line, while clearing it results in normal polarity. For chips with |
| fewer than 16 IO pins, high-end bits are ignored. |
| - sx150x,reset_gpio: System GPIO number connected to NRESET of SX150x devices. |
| If "sx150x,reset_onprobe" is true, then the reset_gpio is pulled from low |
| to high to reset the SX150x device. (optional) |
| |
| Example: |
| |
| i2c@f9925000 { |
| ioexp_gpios: io_exp@3e { |
| #gpio-cells = <2>; |
| gpio-controller; |
| compatible = "sx1509q"; |
| reg = <0x3e>; |
| sx150x,pullup_ena = <0x00>; |
| sx150x,pulldn_ena = <0x00>; |
| sx150x,float_ena = <0x00>; |
| sx150x,polarity = <0x00>; |
| sx150x,reset_onprobe; |
| sx150x,reset_gpio = <&msmgpio 138 0x00>; |
| label = "ioexp-gpio"; |
| }; |
| }; |
| |
| Usage: |
| gpio_test { |
| compatible = "testcode"; |
| test_gpio = <&ioexp_gpios 5 0x00>; |
| }; |