1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/i2c/i2c-mux-reg.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Register-based I2C Bus Mux 8 9maintainers: 10 - Peter Rosin <peda@axentia.se> 11 12description: | 13 This binding describes an I2C bus multiplexer that uses a single 14 memory-mapped register to route the I2C signals. 15 16 Whenever an access is made to a device on a child bus, the value 17 set in the relevant node's reg property is output to the register. 18 19 If an idle state is defined via the idle-state property, the 20 register is set to that value whenever no access is being made. 21 Otherwise the most recently used value is left programmed. 22 23allOf: 24 - $ref: /schemas/i2c/i2c-mux.yaml# 25 26properties: 27 compatible: 28 const: i2c-mux-reg 29 30 reg: 31 maxItems: 1 32 description: | 33 Offset and size of the register that selects the active child 34 bus, relative to the parent node's address space. The size 35 determines the access width and must be 1, 2, or 4 bytes. If 36 omitted, the platform device's own memory resource is used 37 instead. 38 39 i2c-parent: 40 $ref: /schemas/types.yaml#/definitions/phandle 41 description: 42 Phandle of the I2C bus that this multiplexer's master-side port 43 is connected to. 44 45 little-endian: 46 type: boolean 47 description: Register is accessed in little-endian byte order. 48 49 big-endian: 50 type: boolean 51 description: Register is accessed in big-endian byte order. 52 53 write-only: 54 type: boolean 55 description: 56 Register is write-only; the driver must not read back the 57 current selection. 58 59 idle-state: 60 $ref: /schemas/types.yaml#/definitions/uint32 61 description: 62 Value to write to the register when no child bus is selected. 63 64required: 65 - compatible 66 - i2c-parent 67 68unevaluatedProperties: false 69 70examples: 71 - | 72 i2c-mux@6028 { 73 compatible = "i2c-mux-reg"; 74 reg = <0x6028 0x4>; 75 little-endian; 76 #address-cells = <1>; 77 #size-cells = <0>; 78 i2c-parent = <&i2c1>; 79 80 i2c@0 { 81 reg = <0>; 82 #address-cells = <1>; 83 #size-cells = <0>; 84 }; 85 86 i2c@1 { 87 reg = <1>; 88 #address-cells = <1>; 89 #size-cells = <0>; 90 }; 91 }; 92... 93