Path: blob/master/Documentation/devicetree/bindings/i2c/i2c-mux-reg.txt
26307 views
Register-based I2C Bus Mux12This binding describes an I2C bus multiplexer that uses a single register3to route the I2C signals.45Required properties:6- compatible: i2c-mux-reg7- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side8port is connected to.9* Standard I2C mux properties. See i2c-mux.yaml in this directory.10* I2C child bus nodes. See i2c-mux.yaml in this directory.1112Optional properties:13- reg: this pair of <offset size> specifies the register to control the mux.14The <offset size> depends on its parent node. It can be any memory-mapped15address. The size must be either 1, 2, or 4 bytes. If reg is omitted, the16resource of this device will be used.17- little-endian: The existence indicates the register is in little endian.18- big-endian: The existence indicates the register is in big endian.19If both little-endian and big-endian are omitted, the endianness of the20CPU will be used.21- write-only: The existence indicates the register is write-only.22- idle-state: value to set the muxer to when idle. When no value is23given, it defaults to the last value used.2425Whenever an access is made to a device on a child bus, the value set26in the relevant node's reg property will be output to the register.2728If an idle state is defined, using the idle-state (optional) property,29whenever an access is not being made to a device on a child bus, the30register will be set according to the idle value.3132If an idle state is not defined, the most recently used value will be33left programmed into the register.3435Example of a mux on PCIe card, the host is a powerpc SoC (big endian):3637i2c-mux {38/* the <offset size> depends on the address translation39* of the parent device. If omitted, device resource40* will be used instead. The size is to determine41* whether iowrite32, iowrite16, or iowrite8 will be used.42*/43reg = <0x6028 0x4>;44little-endian; /* little endian register on PCIe */45compatible = "i2c-mux-reg";46#address-cells = <1>;47#size-cells = <0>;48i2c-parent = <&i2c1>;49i2c@0 {50reg = <0>;51#address-cells = <1>;52#size-cells = <0>;5354si5338: clock-generator@70 {55compatible = "silabs,si5338";56reg = <0x70>;57/* other stuff */58};59};6061i2c@1 {62/* data is written using iowrite32 */63reg = <1>;64#address-cells = <1>;65#size-cells = <0>;6667si5338: clock-generator@70 {68compatible = "silabs,si5338";69reg = <0x70>;70/* other stuff */71};72};73};747576