0001 Register-based I2C Bus Mux
0002
0003 This binding describes an I2C bus multiplexer that uses a single register
0004 to route the I2C signals.
0005
0006 Required properties:
0007 - compatible: i2c-mux-reg
0008 - i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
0009 port is connected to.
0010 * Standard I2C mux properties. See i2c-mux.yaml in this directory.
0011 * I2C child bus nodes. See i2c-mux.yaml in this directory.
0012
0013 Optional properties:
0014 - reg: this pair of <offset size> specifies the register to control the mux.
0015 The <offset size> depends on its parent node. It can be any memory-mapped
0016 address. The size must be either 1, 2, or 4 bytes. If reg is omitted, the
0017 resource of this device will be used.
0018 - little-endian: The existence indicates the register is in little endian.
0019 - big-endian: The existence indicates the register is in big endian.
0020 If both little-endian and big-endian are omitted, the endianness of the
0021 CPU will be used.
0022 - write-only: The existence indicates the register is write-only.
0023 - idle-state: value to set the muxer to when idle. When no value is
0024 given, it defaults to the last value used.
0025
0026 Whenever an access is made to a device on a child bus, the value set
0027 in the relevant node's reg property will be output to the register.
0028
0029 If an idle state is defined, using the idle-state (optional) property,
0030 whenever an access is not being made to a device on a child bus, the
0031 register will be set according to the idle value.
0032
0033 If an idle state is not defined, the most recently used value will be
0034 left programmed into the register.
0035
0036 Example of a mux on PCIe card, the host is a powerpc SoC (big endian):
0037
0038 i2c-mux {
0039 /* the <offset size> depends on the address translation
0040 * of the parent device. If omitted, device resource
0041 * will be used instead. The size is to determine
0042 * whether iowrite32, iowrite16, or iowrite8 will be used.
0043 */
0044 reg = <0x6028 0x4>;
0045 little-endian; /* little endian register on PCIe */
0046 compatible = "i2c-mux-reg";
0047 #address-cells = <1>;
0048 #size-cells = <0>;
0049 i2c-parent = <&i2c1>;
0050 i2c@0 {
0051 reg = <0>;
0052 #address-cells = <1>;
0053 #size-cells = <0>;
0054
0055 si5338: clock-generator@70 {
0056 compatible = "silabs,si5338";
0057 reg = <0x70>;
0058 /* other stuff */
0059 };
0060 };
0061
0062 i2c@1 {
0063 /* data is written using iowrite32 */
0064 reg = <1>;
0065 #address-cells = <1>;
0066 #size-cells = <0>;
0067
0068 si5338: clock-generator@70 {
0069 compatible = "silabs,si5338";
0070 reg = <0x70>;
0071 /* other stuff */
0072 };
0073 };
0074 };