About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Documentation / devicetree / bindings / i2c / i2c-mux.txt




Custom Search

Based on kernel version 4.13.3. Page generated on 2017-09-23 13:55 EST.

1	Common i2c bus multiplexer/switch properties.
2	
3	An i2c bus multiplexer/switch will have several child busses that are
4	numbered uniquely in a device dependent manner.  The nodes for an i2c bus
5	multiplexer/switch will have one child node for each child bus.
6	
7	Optional properties:
8	- #address-cells = <1>;
9	   This property is required is the i2c-mux child node does not exist.
10	
11	- #size-cells = <0>;
12	   This property is required is the i2c-mux child node does not exist.
13	
14	- i2c-mux
15	   For i2c multiplexers/switches that have child nodes that are a mixture
16	   of both i2c child busses and other child nodes, the 'i2c-mux' subnode
17	   can be used for populating the i2c child busses.  If an 'i2c-mux'
18	   subnode is present, only subnodes of this will be considered as i2c
19	   child busses.
20	
21	Required properties for the i2c-mux child node:
22	- #address-cells = <1>;
23	- #size-cells = <0>;
24	
25	Required properties for i2c child bus nodes:
26	- #address-cells = <1>;
27	- #size-cells = <0>;
28	- reg : The sub-bus number.
29	
30	Optional properties for i2c child bus nodes:
31	- Other properties specific to the multiplexer/switch hardware.
32	- Child nodes conforming to i2c bus binding
33	
34	
35	Example :
36	
37		/*
38		   An NXP pca9548 8 channel I2C multiplexer at address 0x70
39		   with two NXP pca8574 GPIO expanders attached, one each to
40		   ports 3 and 4.
41		 */
42	
43		mux@70 {
44			compatible = "nxp,pca9548";
45			reg = <0x70>;
46			#address-cells = <1>;
47			#size-cells = <0>;
48	
49			i2c@3 {
50				#address-cells = <1>;
51				#size-cells = <0>;
52				reg = <3>;
53	
54				gpio1: gpio@38 {
55					compatible = "nxp,pca8574";
56					reg = <0x38>;
57					#gpio-cells = <2>;
58					gpio-controller;
59				};
60			};
61			i2c@4 {
62				#address-cells = <1>;
63				#size-cells = <0>;
64				reg = <4>;
65	
66				gpio2: gpio@38 {
67					compatible = "nxp,pca8574";
68					reg = <0x38>;
69					#gpio-cells = <2>;
70					gpio-controller;
71				};
72			};
73		};
Hide Line Numbers
About Kernel Documentation Linux Kernel Contact Linux Resources Linux Blog

Information is copyright its respective author. All material is available from the Linux Kernel Source distributed under a GPL License. This page is provided as a free service by mjmwired.net.