xref: /linux/Documentation/devicetree/bindings/i2c/renesas,rmobile-iic.yaml (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
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
7title: Renesas R-Mobile I2C Bus Interface (IIC)
8
9maintainers:
10  - Wolfram Sang <wsa+renesas@sang-engineering.com>
11
12properties:
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
84required:
85  - compatible
86  - reg
87  - interrupts
88  - clocks
89  - power-domains
90  - '#address-cells'
91  - '#size-cells'
92
93allOf:
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
128unevaluatedProperties: false
129
130examples:
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    };
150