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