Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: i2c: i2c-mux-pca954x: Convert to DT schema

Convert the i2c-mux-pca954x binding to DT schema format.

Add the missing compatible for 'nxp,pca9645' which is already in use.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Wolfram Sang <wsa@kernel.org>
Acked-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210526184839.2937899-6-robh@kernel.org

+110 -74
-74
Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.txt
··· 1 - * NXP PCA954x I2C bus switch 2 - 3 - The driver supports NXP PCA954x and PCA984x I2C mux/switch devices. 4 - 5 - Required Properties: 6 - 7 - - compatible: Must contain one of the following. 8 - "nxp,pca9540", 9 - "nxp,pca9542", 10 - "nxp,pca9543", 11 - "nxp,pca9544", 12 - "nxp,pca9545", 13 - "nxp,pca9546", "nxp,pca9846", 14 - "nxp,pca9547", "nxp,pca9847", 15 - "nxp,pca9548", "nxp,pca9848", 16 - "nxp,pca9849" 17 - 18 - - reg: The I2C address of the device. 19 - 20 - The following required properties are defined externally: 21 - 22 - - Standard I2C mux properties. See i2c-mux.txt in this directory. 23 - - I2C child bus nodes. See i2c-mux.txt in this directory. 24 - 25 - Optional Properties: 26 - 27 - - reset-gpios: Reference to the GPIO connected to the reset input. 28 - - idle-state: if present, overrides i2c-mux-idle-disconnect, 29 - Please refer to Documentation/devicetree/bindings/mux/mux-controller.yaml 30 - - i2c-mux-idle-disconnect: Boolean; if defined, forces mux to disconnect all 31 - children in idle state. This is necessary for example, if there are several 32 - multiplexers on the bus and the devices behind them use same I2C addresses. 33 - - interrupts: Interrupt mapping for IRQ. 34 - - interrupt-controller: Marks the device node as an interrupt controller. 35 - - #interrupt-cells : Should be two. 36 - - first cell is the pin number 37 - - second cell is used to specify flags. 38 - See also Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 39 - 40 - Example: 41 - 42 - i2c-switch@74 { 43 - compatible = "nxp,pca9548"; 44 - #address-cells = <1>; 45 - #size-cells = <0>; 46 - reg = <0x74>; 47 - 48 - interrupt-parent = <&ipic>; 49 - interrupts = <17 IRQ_TYPE_LEVEL_LOW>; 50 - interrupt-controller; 51 - #interrupt-cells = <2>; 52 - 53 - i2c@2 { 54 - #address-cells = <1>; 55 - #size-cells = <0>; 56 - reg = <2>; 57 - 58 - eeprom@54 { 59 - compatible = "atmel,24c08"; 60 - reg = <0x54>; 61 - }; 62 - }; 63 - 64 - i2c@4 { 65 - #address-cells = <1>; 66 - #size-cells = <0>; 67 - reg = <4>; 68 - 69 - rtc@51 { 70 - compatible = "nxp,pcf8563"; 71 - reg = <0x51>; 72 - }; 73 - }; 74 - };
+110
Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP PCA954x I2C bus switch 8 + 9 + maintainers: 10 + - Laurent Pinchart <laurent.pinchart@ideasonboard.com> 11 + 12 + description: 13 + The binding supports NXP PCA954x and PCA984x I2C mux/switch devices. 14 + 15 + allOf: 16 + - $ref: /schemas/i2c/i2c-mux.yaml# 17 + 18 + properties: 19 + compatible: 20 + oneOf: 21 + - enum: 22 + - nxp,pca9540 23 + - nxp,pca9542 24 + - nxp,pca9543 25 + - nxp,pca9544 26 + - nxp,pca9545 27 + - nxp,pca9546 28 + - nxp,pca9547 29 + - nxp,pca9548 30 + - nxp,pca9846 31 + - nxp,pca9847 32 + - nxp,pca9848 33 + - nxp,pca9849 34 + - items: 35 + - const: nxp,pca9646 36 + - const: nxp,pca9546 37 + 38 + reg: 39 + maxItems: 1 40 + 41 + interrupts: 42 + maxItems: 1 43 + 44 + "#interrupt-cells": 45 + const: 2 46 + 47 + interrupt-controller: true 48 + 49 + reset-gpios: 50 + maxItems: 1 51 + 52 + i2c-mux-idle-disconnect: 53 + type: boolean 54 + description: Forces mux to disconnect all children in idle state. This is 55 + necessary for example, if there are several multiplexers on the bus and 56 + the devices behind them use same I2C addresses. 57 + 58 + idle-state: 59 + description: if present, overrides i2c-mux-idle-disconnect 60 + $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state 61 + 62 + required: 63 + - compatible 64 + - reg 65 + 66 + unevaluatedProperties: false 67 + 68 + examples: 69 + - | 70 + #include <dt-bindings/interrupt-controller/irq.h> 71 + 72 + i2c { 73 + #address-cells = <1>; 74 + #size-cells = <0>; 75 + 76 + i2c-mux@74 { 77 + compatible = "nxp,pca9548"; 78 + #address-cells = <1>; 79 + #size-cells = <0>; 80 + reg = <0x74>; 81 + 82 + interrupt-parent = <&ipic>; 83 + interrupts = <17 IRQ_TYPE_LEVEL_LOW>; 84 + interrupt-controller; 85 + #interrupt-cells = <2>; 86 + 87 + i2c@2 { 88 + #address-cells = <1>; 89 + #size-cells = <0>; 90 + reg = <2>; 91 + 92 + eeprom@54 { 93 + compatible = "atmel,24c08"; 94 + reg = <0x54>; 95 + }; 96 + }; 97 + 98 + i2c@4 { 99 + #address-cells = <1>; 100 + #size-cells = <0>; 101 + reg = <4>; 102 + 103 + rtc@51 { 104 + compatible = "nxp,pcf8563"; 105 + reg = <0x51>; 106 + }; 107 + }; 108 + }; 109 + }; 110 + ...