186335b51SRob Herring# SPDX-License-Identifier: GPL-2.0
286335b51SRob Herring%YAML 1.2
386335b51SRob Herring---
486335b51SRob Herring$id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
586335b51SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
686335b51SRob Herring
7*dde2c690SPatrick Rudolphtitle: NXP PCA954x I2C and compatible bus switches
886335b51SRob Herring
986335b51SRob Herringmaintainers:
1086335b51SRob Herring  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1186335b51SRob Herring
1286335b51SRob Herringdescription:
13*dde2c690SPatrick Rudolph  The NXP PCA954x and compatible devices are I2C bus
14*dde2c690SPatrick Rudolph  multiplexer/switches that share the same functionality
15*dde2c690SPatrick Rudolph  and register layout.
16*dde2c690SPatrick Rudolph  The devices usually have 4 or 8 child buses, which are
17*dde2c690SPatrick Rudolph  attached to the parent bus by using the SMBus "Send Byte"
18*dde2c690SPatrick Rudolph  command.
1986335b51SRob Herring
2086335b51SRob Herringproperties:
2186335b51SRob Herring  compatible:
2286335b51SRob Herring    oneOf:
2386335b51SRob Herring      - enum:
24*dde2c690SPatrick Rudolph          - maxim,max7356
25*dde2c690SPatrick Rudolph          - maxim,max7357
26*dde2c690SPatrick Rudolph          - maxim,max7358
27*dde2c690SPatrick Rudolph          - maxim,max7367
28*dde2c690SPatrick Rudolph          - maxim,max7368
29*dde2c690SPatrick Rudolph          - maxim,max7369
3086335b51SRob Herring          - nxp,pca9540
3186335b51SRob Herring          - nxp,pca9542
3286335b51SRob Herring          - nxp,pca9543
3386335b51SRob Herring          - nxp,pca9544
3486335b51SRob Herring          - nxp,pca9545
3586335b51SRob Herring          - nxp,pca9546
3686335b51SRob Herring          - nxp,pca9547
3786335b51SRob Herring          - nxp,pca9548
3886335b51SRob Herring          - nxp,pca9846
3986335b51SRob Herring          - nxp,pca9847
4086335b51SRob Herring          - nxp,pca9848
4186335b51SRob Herring          - nxp,pca9849
4286335b51SRob Herring      - items:
4386335b51SRob Herring          - const: nxp,pca9646
4486335b51SRob Herring          - const: nxp,pca9546
4586335b51SRob Herring
4686335b51SRob Herring  reg:
4786335b51SRob Herring    maxItems: 1
4886335b51SRob Herring
4986335b51SRob Herring  interrupts:
5086335b51SRob Herring    maxItems: 1
5186335b51SRob Herring
5286335b51SRob Herring  "#interrupt-cells":
5386335b51SRob Herring    const: 2
5486335b51SRob Herring
5586335b51SRob Herring  interrupt-controller: true
5686335b51SRob Herring
5786335b51SRob Herring  reset-gpios:
5886335b51SRob Herring    maxItems: 1
5986335b51SRob Herring
6086335b51SRob Herring  i2c-mux-idle-disconnect:
6186335b51SRob Herring    type: boolean
6286335b51SRob Herring    description: Forces mux to disconnect all children in idle state. This is
6386335b51SRob Herring      necessary for example, if there are several multiplexers on the bus and
6486335b51SRob Herring      the devices behind them use same I2C addresses.
6586335b51SRob Herring
6686335b51SRob Herring  idle-state:
6786335b51SRob Herring    description: if present, overrides i2c-mux-idle-disconnect
6886335b51SRob Herring    $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state
6986335b51SRob Herring
70*dde2c690SPatrick Rudolph  vdd-supply:
71*dde2c690SPatrick Rudolph    description: A voltage regulator supplying power to the chip. On PCA9846
72*dde2c690SPatrick Rudolph      the regulator supplies power to VDD2 (core logic) and optionally to VDD1.
73*dde2c690SPatrick Rudolph
7486335b51SRob Herringrequired:
7586335b51SRob Herring  - compatible
7686335b51SRob Herring  - reg
7786335b51SRob Herring
78f0382e3aSPatrick RudolphallOf:
79f0382e3aSPatrick Rudolph  - $ref: /schemas/i2c/i2c-mux.yaml#
80f0382e3aSPatrick Rudolph  - if:
81f0382e3aSPatrick Rudolph      not:
82f0382e3aSPatrick Rudolph        properties:
83f0382e3aSPatrick Rudolph          compatible:
84f0382e3aSPatrick Rudolph            contains:
85f0382e3aSPatrick Rudolph              enum:
86*dde2c690SPatrick Rudolph                - maxim,max7367
87*dde2c690SPatrick Rudolph                - maxim,max7369
88f0382e3aSPatrick Rudolph                - nxp,pca9542
89f0382e3aSPatrick Rudolph                - nxp,pca9543
90f0382e3aSPatrick Rudolph                - nxp,pca9544
91f0382e3aSPatrick Rudolph                - nxp,pca9545
92f0382e3aSPatrick Rudolph    then:
93f0382e3aSPatrick Rudolph      properties:
94f0382e3aSPatrick Rudolph        interrupts: false
95f0382e3aSPatrick Rudolph        "#interrupt-cells": false
96f0382e3aSPatrick Rudolph        interrupt-controller: false
97f0382e3aSPatrick Rudolph
9886335b51SRob HerringunevaluatedProperties: false
9986335b51SRob Herring
10086335b51SRob Herringexamples:
10186335b51SRob Herring  - |
10286335b51SRob Herring    #include <dt-bindings/interrupt-controller/irq.h>
10386335b51SRob Herring
10486335b51SRob Herring    i2c {
10586335b51SRob Herring        #address-cells = <1>;
10686335b51SRob Herring        #size-cells = <0>;
10786335b51SRob Herring
10886335b51SRob Herring        i2c-mux@74 {
109f0382e3aSPatrick Rudolph            compatible = "nxp,pca9545";
11086335b51SRob Herring            #address-cells = <1>;
11186335b51SRob Herring            #size-cells = <0>;
11286335b51SRob Herring            reg = <0x74>;
11386335b51SRob Herring
114*dde2c690SPatrick Rudolph            vdd-supply = <&p3v3>;
115*dde2c690SPatrick Rudolph
11686335b51SRob Herring            interrupt-parent = <&ipic>;
11786335b51SRob Herring            interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
11886335b51SRob Herring            interrupt-controller;
11986335b51SRob Herring            #interrupt-cells = <2>;
12086335b51SRob Herring
12186335b51SRob Herring            i2c@2 {
12286335b51SRob Herring                #address-cells = <1>;
12386335b51SRob Herring                #size-cells = <0>;
12486335b51SRob Herring                reg = <2>;
12586335b51SRob Herring
12686335b51SRob Herring                eeprom@54 {
12786335b51SRob Herring                    compatible = "atmel,24c08";
12886335b51SRob Herring                    reg = <0x54>;
12986335b51SRob Herring                };
13086335b51SRob Herring            };
13186335b51SRob Herring
13286335b51SRob Herring            i2c@4 {
13386335b51SRob Herring                #address-cells = <1>;
13486335b51SRob Herring                #size-cells = <0>;
13586335b51SRob Herring                reg = <4>;
13686335b51SRob Herring
13786335b51SRob Herring                rtc@51 {
13886335b51SRob Herring                    compatible = "nxp,pcf8563";
13986335b51SRob Herring                    reg = <0x51>;
14086335b51SRob Herring                };
14186335b51SRob Herring            };
14286335b51SRob Herring        };
14386335b51SRob Herring    };
14486335b51SRob Herring...
145