xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/i2c-mux-pca954x.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* NXP PCA954x I2C bus switch
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotThe driver supports NXP PCA954x and PCA984x I2C mux/switch devices.
4*c66ec88fSEmmanuel Vadot
5*c66ec88fSEmmanuel VadotRequired Properties:
6*c66ec88fSEmmanuel Vadot
7*c66ec88fSEmmanuel Vadot  - compatible: Must contain one of the following.
8*c66ec88fSEmmanuel Vadot    "nxp,pca9540",
9*c66ec88fSEmmanuel Vadot    "nxp,pca9542",
10*c66ec88fSEmmanuel Vadot    "nxp,pca9543",
11*c66ec88fSEmmanuel Vadot    "nxp,pca9544",
12*c66ec88fSEmmanuel Vadot    "nxp,pca9545",
13*c66ec88fSEmmanuel Vadot    "nxp,pca9546", "nxp,pca9846",
14*c66ec88fSEmmanuel Vadot    "nxp,pca9547", "nxp,pca9847",
15*c66ec88fSEmmanuel Vadot    "nxp,pca9548", "nxp,pca9848",
16*c66ec88fSEmmanuel Vadot    "nxp,pca9849"
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel Vadot  - reg: The I2C address of the device.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel Vadot  The following required properties are defined externally:
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadot  - Standard I2C mux properties. See i2c-mux.txt in this directory.
23*c66ec88fSEmmanuel Vadot  - I2C child bus nodes. See i2c-mux.txt in this directory.
24*c66ec88fSEmmanuel Vadot
25*c66ec88fSEmmanuel VadotOptional Properties:
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot  - reset-gpios: Reference to the GPIO connected to the reset input.
28*c66ec88fSEmmanuel Vadot  - idle-state: if present, overrides i2c-mux-idle-disconnect,
29*c66ec88fSEmmanuel Vadot    Please refer to Documentation/devicetree/bindings/mux/mux-controller.txt
30*c66ec88fSEmmanuel Vadot  - i2c-mux-idle-disconnect: Boolean; if defined, forces mux to disconnect all
31*c66ec88fSEmmanuel Vadot    children in idle state. This is necessary for example, if there are several
32*c66ec88fSEmmanuel Vadot    multiplexers on the bus and the devices behind them use same I2C addresses.
33*c66ec88fSEmmanuel Vadot  - interrupts: Interrupt mapping for IRQ.
34*c66ec88fSEmmanuel Vadot  - interrupt-controller: Marks the device node as an interrupt controller.
35*c66ec88fSEmmanuel Vadot  - #interrupt-cells : Should be two.
36*c66ec88fSEmmanuel Vadot    - first cell is the pin number
37*c66ec88fSEmmanuel Vadot    - second cell is used to specify flags.
38*c66ec88fSEmmanuel Vadot    See also Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel VadotExample:
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel Vadot	i2c-switch@74 {
43*c66ec88fSEmmanuel Vadot		compatible = "nxp,pca9548";
44*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
45*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
46*c66ec88fSEmmanuel Vadot		reg = <0x74>;
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel Vadot		interrupt-parent = <&ipic>;
49*c66ec88fSEmmanuel Vadot		interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
50*c66ec88fSEmmanuel Vadot		interrupt-controller;
51*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
52*c66ec88fSEmmanuel Vadot
53*c66ec88fSEmmanuel Vadot		i2c@2 {
54*c66ec88fSEmmanuel Vadot			#address-cells = <1>;
55*c66ec88fSEmmanuel Vadot			#size-cells = <0>;
56*c66ec88fSEmmanuel Vadot			reg = <2>;
57*c66ec88fSEmmanuel Vadot
58*c66ec88fSEmmanuel Vadot			eeprom@54 {
59*c66ec88fSEmmanuel Vadot				compatible = "atmel,24c08";
60*c66ec88fSEmmanuel Vadot				reg = <0x54>;
61*c66ec88fSEmmanuel Vadot			};
62*c66ec88fSEmmanuel Vadot		};
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel Vadot		i2c@4 {
65*c66ec88fSEmmanuel Vadot			#address-cells = <1>;
66*c66ec88fSEmmanuel Vadot			#size-cells = <0>;
67*c66ec88fSEmmanuel Vadot			reg = <4>;
68*c66ec88fSEmmanuel Vadot
69*c66ec88fSEmmanuel Vadot			rtc@51 {
70*c66ec88fSEmmanuel Vadot				compatible = "nxp,pcf8563";
71*c66ec88fSEmmanuel Vadot				reg = <0x51>;
72*c66ec88fSEmmanuel Vadot			};
73*c66ec88fSEmmanuel Vadot		};
74*c66ec88fSEmmanuel Vadot	};
75