summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/pinctrl/pinctrl-sx150x.txt
blob: bf76867168e9fd39461f07468c5a782a4bdef9ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
SEMTECH SX150x GPIO expander bindings

Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and
../interrupt-controller/interrupts.txt for generic information regarding
pin controller, GPIO, and interrupt bindings.

Required properties:
- compatible: should be one of :
			"semtech,sx1501q",
			"semtech,sx1502q",
			"semtech,sx1503q",
			"semtech,sx1504q",
			"semtech,sx1505q",
			"semtech,sx1506q",
			"semtech,sx1507q",
			"semtech,sx1508q",
			"semtech,sx1509q".

- reg: The I2C slave address for this device.

- #gpio-cells: Should be 2. The first cell is the GPIO number and the
		second cell is used to specify optional parameters:
		bit 0: polarity (0: normal, 1: inverted)

- gpio-controller: Marks the device as a GPIO controller.

Optional properties :
- interrupt-parent: phandle of the parent interrupt controller.

- interrupts: Interrupt specifier for the controllers interrupt.

- interrupt-controller: Marks the device as a interrupt controller.

- semtech,probe-reset: Will trigger a reset of the GPIO expander on probe,
		only for sx1507q, sx1508q and sx1509q

The GPIO expander can optionally be used as an interrupt controller, in
which case it uses the default two cell specifier.

Required properties for pin configuration sub-nodes:
 - pins: List of pins to which the configuration applies.

Optional properties for pin configuration sub-nodes:
----------------------------------------------------
 - bias-disable: disable any pin bias, except the OSCIO pin
 - bias-pull-up: pull up the pin, except the OSCIO pin
 - bias-pull-down: pull down the pin, except the OSCIO pin
 - bias-pull-pin-default: use pin-default pull state, except the OSCIO pin
 - drive-push-pull: drive actively high and low
 - drive-open-drain: drive with open drain only for sx1507q, sx1508q and sx1509q and except the OSCIO pin
 - output-low: set the pin to output mode with low level
 - output-high: set the pin to output mode with high level

Example:

	i2c0gpio-expander@20{
		#gpio-cells = <2>;
		#interrupt-cells = <2>;
		compatible = "semtech,sx1506q";
		reg = <0x20>;
		interrupt-parent = <&gpio_1>;
		interrupts = <16 0>;

		gpio-controller;
		interrupt-controller;

		pinctrl-names = "default";
		pinctrl-0 = <&gpio1_cfg_pins>;

		gpio1_cfg_pins: gpio1-cfg {
			pins = "gpio1";
			bias-pull-up;
		};
	};