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