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

dt-bindings: i2c: renesas,iic: Convert to json-schema

Convert the Renesas R-Mobile I2C Bus Interface (IIC) Device Tree binding
documentation to json-schema.

Document missing properties.
R-Mobile A1 and SH-Mobile have multiple interrupts.
Update the example to match reality.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

authored by

Geert Uytterhoeven and committed by
Wolfram Sang
632ce677 56909511

+150 -68
-67
Documentation/devicetree/bindings/i2c/renesas,iic.txt
··· 1 - Device tree configuration for Renesas IIC (sh_mobile) driver 2 - 3 - Required properties: 4 - - compatible : 5 - - "renesas,iic-r8a73a4" (R-Mobile APE6) 6 - - "renesas,iic-r8a7740" (R-Mobile A1) 7 - - "renesas,iic-r8a7742" (RZ/G1H) 8 - - "renesas,iic-r8a7743" (RZ/G1M) 9 - - "renesas,iic-r8a7744" (RZ/G1N) 10 - - "renesas,iic-r8a7745" (RZ/G1E) 11 - - "renesas,iic-r8a774a1" (RZ/G2M) 12 - - "renesas,iic-r8a774b1" (RZ/G2N) 13 - - "renesas,iic-r8a774c0" (RZ/G2E) 14 - - "renesas,iic-r8a774e1" (RZ/G2H) 15 - - "renesas,iic-r8a7790" (R-Car H2) 16 - - "renesas,iic-r8a7791" (R-Car M2-W) 17 - - "renesas,iic-r8a7792" (R-Car V2H) 18 - - "renesas,iic-r8a7793" (R-Car M2-N) 19 - - "renesas,iic-r8a7794" (R-Car E2) 20 - - "renesas,iic-r8a7795" (R-Car H3) 21 - - "renesas,iic-r8a7796" (R-Car M3-W) 22 - - "renesas,iic-r8a77961" (R-Car M3-W+) 23 - - "renesas,iic-r8a77965" (R-Car M3-N) 24 - - "renesas,iic-r8a77990" (R-Car E3) 25 - - "renesas,iic-sh73a0" (SH-Mobile AG5) 26 - - "renesas,rcar-gen2-iic" (generic R-Car Gen2 or RZ/G1 27 - compatible device) 28 - - "renesas,rcar-gen3-iic" (generic R-Car Gen3 or RZ/G2 29 - compatible device) 30 - - "renesas,rmobile-iic" (generic device) 31 - 32 - When compatible with a generic R-Car version, nodes 33 - must list the SoC-specific version corresponding to 34 - the platform first followed by the generic R-Car 35 - version. 36 - 37 - When compatible with "renesas,rmobile-iic" it should 38 - be the last compatibility string listed. 39 - 40 - - reg : address start and address range size of device 41 - - interrupts : interrupt of device 42 - - clocks : clock for device 43 - - #address-cells : should be <1> 44 - - #size-cells : should be <0> 45 - 46 - Optional properties: 47 - - clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset. 48 - - dmas : Must contain a list of two references to DMA 49 - specifiers, one for transmission, and one for 50 - reception. 51 - - dma-names : Must contain a list of two DMA names, "tx" and "rx". 52 - 53 - 54 - Pinctrl properties might be needed, too. See there. 55 - 56 - Example: 57 - 58 - iic0: i2c@e6500000 { 59 - compatible = "renesas,iic-r8a7790", "renesas,rcar-gen2-iic", 60 - "renesas,rmobile-iic"; 61 - reg = <0 0xe6500000 0 0x425>; 62 - interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>; 63 - clocks = <&mstp3_clks R8A7790_CLK_IIC0>; 64 - clock-frequency = <400000>; 65 - #address-cells = <1>; 66 - #size-cells = <0>; 67 - };
+149
Documentation/devicetree/bindings/i2c/renesas,rmobile-iic.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/i2c/renesas,rmobile-iic.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Renesas R-Mobile I2C Bus Interface (IIC) 8 + 9 + maintainers: 10 + - Wolfram Sang <wsa+renesas@sang-engineering.com> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - items: 16 + - enum: 17 + - renesas,iic-r8a73a4 # R-Mobile APE6 18 + - renesas,iic-r8a7740 # R-Mobile A1 19 + - renesas,iic-sh73a0 # SH-Mobile AG5 20 + - const: renesas,rmobile-iic # Generic 21 + 22 + - items: 23 + - enum: 24 + - renesas,iic-r8a7742 # RZ/G1H 25 + - renesas,iic-r8a7743 # RZ/G1M 26 + - renesas,iic-r8a7744 # RZ/G1N 27 + - renesas,iic-r8a7745 # RZ/G1E 28 + - renesas,iic-r8a7790 # R-Car H2 29 + - renesas,iic-r8a7791 # R-Car M2-W 30 + - renesas,iic-r8a7792 # R-Car V2H 31 + - renesas,iic-r8a7793 # R-Car M2-N 32 + - renesas,iic-r8a7794 # R-Car E2 33 + - const: renesas,rcar-gen2-iic # R-Car Gen2 and RZ/G1 34 + - const: renesas,rmobile-iic # Generic 35 + 36 + - items: 37 + - enum: 38 + - renesas,iic-r8a774a1 # RZ/G2M 39 + - renesas,iic-r8a774b1 # RZ/G2N 40 + - renesas,iic-r8a774c0 # RZ/G2E 41 + - renesas,iic-r8a774e1 # RZ/G2H 42 + - renesas,iic-r8a7795 # R-Car H3 43 + - renesas,iic-r8a7796 # R-Car M3-W 44 + - renesas,iic-r8a77961 # R-Car M3-W+ 45 + - renesas,iic-r8a77965 # R-Car M3-N 46 + - renesas,iic-r8a77990 # R-Car E3 47 + - const: renesas,rcar-gen3-iic # R-Car Gen3 and RZ/G2 48 + - const: renesas,rmobile-iic # Generic 49 + 50 + reg: 51 + maxItems: 1 52 + 53 + interrupts: true 54 + 55 + clock-frequency: 56 + description: 57 + Desired I2C bus clock frequency in Hz. The absence of this property 58 + indicates the default frequency 100 kHz. 59 + 60 + clocks: 61 + maxItems: 1 62 + 63 + power-domains: 64 + maxItems: 1 65 + 66 + resets: 67 + maxItems: 1 68 + 69 + dmas: 70 + minItems: 2 71 + maxItems: 4 72 + description: 73 + Must contain a list of pairs of references to DMA specifiers, one for 74 + transmission, and one for reception. 75 + 76 + dma-names: 77 + minItems: 2 78 + maxItems: 4 79 + items: 80 + enum: 81 + - tx 82 + - rx 83 + 84 + required: 85 + - compatible 86 + - reg 87 + - interrupts 88 + - clocks 89 + - power-domains 90 + - '#address-cells' 91 + - '#size-cells' 92 + 93 + allOf: 94 + - $ref: /schemas/i2c/i2c-controller.yaml# 95 + 96 + - if: 97 + properties: 98 + compatible: 99 + contains: 100 + enum: 101 + - renesas,iic-r8a7740 102 + - renesas,iic-sh73a0 103 + then: 104 + properties: 105 + interrupts: 106 + items: 107 + - description: Arbitration Lost Interrupt (ALI) 108 + - description: Non-acknowledge Detection Interrupt (TACKI) 109 + - description: Wait Interrupt (WAITI) 110 + - description: Data Transmit Enable interrupt (DTEI) 111 + else: 112 + properties: 113 + interrupts: 114 + items: 115 + - description: Single combined interrupt 116 + 117 + - if: 118 + properties: 119 + compatible: 120 + contains: 121 + enum: 122 + - renesas,rcar-gen2-iic 123 + - renesas,rcar-gen3-iic 124 + then: 125 + required: 126 + - resets 127 + 128 + unevaluatedProperties: false 129 + 130 + examples: 131 + - | 132 + #include <dt-bindings/clock/r8a7790-cpg-mssr.h> 133 + #include <dt-bindings/interrupt-controller/arm-gic.h> 134 + #include <dt-bindings/power/r8a7790-sysc.h> 135 + 136 + iic0: i2c@e6500000 { 137 + compatible = "renesas,iic-r8a7790", "renesas,rcar-gen2-iic", 138 + "renesas,rmobile-iic"; 139 + reg = <0xe6500000 0x425>; 140 + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; 141 + clocks = <&cpg CPG_MOD 318>; 142 + clock-frequency = <400000>; 143 + dmas = <&dmac0 0x61>, <&dmac0 0x62>, <&dmac1 0x61>, <&dmac1 0x62>; 144 + dma-names = "tx", "rx", "tx", "rx"; 145 + power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 146 + resets = <&cpg 318>; 147 + #address-cells = <1>; 148 + #size-cells = <0>; 149 + };
+1 -1
MAINTAINERS
··· 15599 15599 L: linux-renesas-soc@vger.kernel.org 15600 15600 S: Supported 15601 15601 F: Documentation/devicetree/bindings/i2c/renesas,rcar-i2c.yaml 15602 - F: Documentation/devicetree/bindings/i2c/renesas,iic.txt 15602 + F: Documentation/devicetree/bindings/i2c/renesas,rmobile-iic.yaml 15603 15603 F: drivers/i2c/busses/i2c-rcar.c 15604 15604 F: drivers/i2c/busses/i2c-sh_mobile.c 15605 15605