"Fossies" - the Fresh Open Source Software Archive

Member "linux-5.3.1/Documentation/devicetree/bindings/i2c/i2c-mux.txt" (21 Sep 2019, 1812 Bytes) of package /linux/kernel/v5.3/linux-5.3.1.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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 if the i2c-mux child node does not exist.
   10 
   11 - #size-cells = <0>;
   12    This property is required if 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 	};