blob: bf76867168e9fd39461f07468c5a782a4bdef9ef [file] [log] [blame]
Neil Armstrong9e80f902016-10-21 11:09:58 +02001SEMTECH SX150x GPIO expander bindings
2
3Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and
4../interrupt-controller/interrupts.txt for generic information regarding
5pin controller, GPIO, and interrupt bindings.
6
7Required properties:
8- compatible: should be one of :
Peter Rosin4f5ac8c2016-11-24 21:45:20 +01009 "semtech,sx1501q",
Peter Rosinbba709b2016-11-24 21:45:19 +010010 "semtech,sx1502q",
11 "semtech,sx1503q",
Peter Rosin4f5ac8c2016-11-24 21:45:20 +010012 "semtech,sx1504q",
13 "semtech,sx1505q",
Neil Armstrong9e80f902016-10-21 11:09:58 +020014 "semtech,sx1506q",
Peter Rosin4f5ac8c2016-11-24 21:45:20 +010015 "semtech,sx1507q",
Neil Armstrong9e80f902016-10-21 11:09:58 +020016 "semtech,sx1508q",
Peter Rosinbba709b2016-11-24 21:45:19 +010017 "semtech,sx1509q".
Neil Armstrong9e80f902016-10-21 11:09:58 +020018
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
27Optional 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 Rosin4f5ac8c2016-11-24 21:45:20 +010035 only for sx1507q, sx1508q and sx1509q
Neil Armstrong9e80f902016-10-21 11:09:58 +020036
37The GPIO expander can optionally be used as an interrupt controller, in
38which case it uses the default two cell specifier.
39
40Required properties for pin configuration sub-nodes:
41 - pins: List of pins to which the configuration applies.
42
43Optional 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 Rosin4f5ac8c2016-11-24 21:45:20 +010050 - drive-open-drain: drive with open drain only for sx1507q, sx1508q and sx1509q and except the OSCIO pin
Neil Armstrong9e80f902016-10-21 11:09:58 +020051 - output-low: set the pin to output mode with low level
52 - output-high: set the pin to output mode with high level
53
54Example:
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 };