xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/renesas,rcar-i2c.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25956d97fSEmmanuel Vadot%YAML 1.2
35956d97fSEmmanuel Vadot---
45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/i2c/renesas,rcar-i2c.yaml#
55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65956d97fSEmmanuel Vadot
75956d97fSEmmanuel Vadottitle: Renesas R-Car I2C Controller
85956d97fSEmmanuel Vadot
95956d97fSEmmanuel Vadotmaintainers:
105956d97fSEmmanuel Vadot  - Wolfram Sang <wsa+renesas@sang-engineering.com>
115956d97fSEmmanuel Vadot
125956d97fSEmmanuel Vadotproperties:
135956d97fSEmmanuel Vadot  compatible:
145956d97fSEmmanuel Vadot    oneOf:
155956d97fSEmmanuel Vadot      - items:
165956d97fSEmmanuel Vadot          - enum:
175956d97fSEmmanuel Vadot              - renesas,i2c-r8a7778      # R-Car M1A
185956d97fSEmmanuel Vadot              - renesas,i2c-r8a7779      # R-Car H1
195956d97fSEmmanuel Vadot          - const: renesas,rcar-gen1-i2c # R-Car Gen1
205956d97fSEmmanuel Vadot
215956d97fSEmmanuel Vadot      - items:
225956d97fSEmmanuel Vadot          - enum:
235956d97fSEmmanuel Vadot              - renesas,i2c-r8a7742      # RZ/G1H
245956d97fSEmmanuel Vadot              - renesas,i2c-r8a7743      # RZ/G1M
255956d97fSEmmanuel Vadot              - renesas,i2c-r8a7744      # RZ/G1N
265956d97fSEmmanuel Vadot              - renesas,i2c-r8a7745      # RZ/G1E
275956d97fSEmmanuel Vadot              - renesas,i2c-r8a77470     # RZ/G1C
285956d97fSEmmanuel Vadot              - renesas,i2c-r8a7790      # R-Car H2
295956d97fSEmmanuel Vadot              - renesas,i2c-r8a7791      # R-Car M2-W
305956d97fSEmmanuel Vadot              - renesas,i2c-r8a7792      # R-Car V2H
315956d97fSEmmanuel Vadot              - renesas,i2c-r8a7793      # R-Car M2-N
325956d97fSEmmanuel Vadot              - renesas,i2c-r8a7794      # R-Car E2
335956d97fSEmmanuel Vadot          - const: renesas,rcar-gen2-i2c # R-Car Gen2 and RZ/G1
345956d97fSEmmanuel Vadot
355956d97fSEmmanuel Vadot      - items:
365956d97fSEmmanuel Vadot          - enum:
375956d97fSEmmanuel Vadot              - renesas,i2c-r8a774a1     # RZ/G2M
385956d97fSEmmanuel Vadot              - renesas,i2c-r8a774b1     # RZ/G2N
395956d97fSEmmanuel Vadot              - renesas,i2c-r8a774c0     # RZ/G2E
405956d97fSEmmanuel Vadot              - renesas,i2c-r8a774e1     # RZ/G2H
415956d97fSEmmanuel Vadot              - renesas,i2c-r8a7795      # R-Car H3
425956d97fSEmmanuel Vadot              - renesas,i2c-r8a7796      # R-Car M3-W
435956d97fSEmmanuel Vadot              - renesas,i2c-r8a77961     # R-Car M3-W+
445956d97fSEmmanuel Vadot              - renesas,i2c-r8a77965     # R-Car M3-N
455956d97fSEmmanuel Vadot              - renesas,i2c-r8a77970     # R-Car V3M
465956d97fSEmmanuel Vadot              - renesas,i2c-r8a77980     # R-Car V3H
475956d97fSEmmanuel Vadot              - renesas,i2c-r8a77990     # R-Car E3
485956d97fSEmmanuel Vadot              - renesas,i2c-r8a77995     # R-Car D3
495956d97fSEmmanuel Vadot          - const: renesas,rcar-gen3-i2c # R-Car Gen3 and RZ/G2
505956d97fSEmmanuel Vadot
51c9ccf3a3SEmmanuel Vadot      - items:
52c9ccf3a3SEmmanuel Vadot          - enum:
53d5b0e70fSEmmanuel Vadot              - renesas,i2c-r8a779a0     # R-Car V3U
54c9ccf3a3SEmmanuel Vadot              - renesas,i2c-r8a779f0     # R-Car S4-8
55*7ef62cebSEmmanuel Vadot              - renesas,i2c-r8a779g0     # R-Car V4H
56c9ccf3a3SEmmanuel Vadot          - const: renesas,rcar-gen4-i2c # R-Car Gen4
57c9ccf3a3SEmmanuel Vadot
585956d97fSEmmanuel Vadot  reg:
595956d97fSEmmanuel Vadot    maxItems: 1
605956d97fSEmmanuel Vadot
615956d97fSEmmanuel Vadot  interrupts:
625956d97fSEmmanuel Vadot    maxItems: 1
635956d97fSEmmanuel Vadot
645956d97fSEmmanuel Vadot  clock-frequency:
655956d97fSEmmanuel Vadot    description:
665956d97fSEmmanuel Vadot      Desired I2C bus clock frequency in Hz. The absence of this property
675956d97fSEmmanuel Vadot      indicates the default frequency 100 kHz.
685956d97fSEmmanuel Vadot
695956d97fSEmmanuel Vadot  clocks:
705956d97fSEmmanuel Vadot    maxItems: 1
715956d97fSEmmanuel Vadot
725956d97fSEmmanuel Vadot  power-domains:
735956d97fSEmmanuel Vadot    maxItems: 1
745956d97fSEmmanuel Vadot
755956d97fSEmmanuel Vadot  resets:
765956d97fSEmmanuel Vadot    maxItems: 1
775956d97fSEmmanuel Vadot
785956d97fSEmmanuel Vadot  dmas:
795956d97fSEmmanuel Vadot    minItems: 2
805956d97fSEmmanuel Vadot    maxItems: 4
815956d97fSEmmanuel Vadot    description:
825956d97fSEmmanuel Vadot      Must contain a list of pairs of references to DMA specifiers, one for
835956d97fSEmmanuel Vadot      transmission, and one for reception.
845956d97fSEmmanuel Vadot
855956d97fSEmmanuel Vadot  dma-names:
865956d97fSEmmanuel Vadot    minItems: 2
875956d97fSEmmanuel Vadot    maxItems: 4
885956d97fSEmmanuel Vadot    items:
895956d97fSEmmanuel Vadot      enum:
905956d97fSEmmanuel Vadot        - tx
915956d97fSEmmanuel Vadot        - rx
925956d97fSEmmanuel Vadot
935956d97fSEmmanuel Vadot  i2c-scl-falling-time-ns:
945956d97fSEmmanuel Vadot    default: 35
955956d97fSEmmanuel Vadot    description:
965956d97fSEmmanuel Vadot      Number of nanoseconds the SCL signal takes to fall; t(f) in the I2C
975956d97fSEmmanuel Vadot      specification.
985956d97fSEmmanuel Vadot
995956d97fSEmmanuel Vadot  i2c-scl-internal-delay-ns:
1005956d97fSEmmanuel Vadot    default: 50
1015956d97fSEmmanuel Vadot    description:
1025956d97fSEmmanuel Vadot      Number of nanoseconds the IP core additionally needs to setup SCL.
1035956d97fSEmmanuel Vadot
1045956d97fSEmmanuel Vadot  i2c-scl-rising-time-ns:
1055956d97fSEmmanuel Vadot    default: 200
1065956d97fSEmmanuel Vadot    description:
1075956d97fSEmmanuel Vadot      Number of nanoseconds the SCL signal takes to rise; t(r) in the I2C
1085956d97fSEmmanuel Vadot      specification.
1095956d97fSEmmanuel Vadot
1105956d97fSEmmanuel Vadotrequired:
1115956d97fSEmmanuel Vadot  - compatible
1125956d97fSEmmanuel Vadot  - reg
1135956d97fSEmmanuel Vadot  - interrupts
1145956d97fSEmmanuel Vadot  - clocks
1155956d97fSEmmanuel Vadot  - power-domains
1165956d97fSEmmanuel Vadot  - '#address-cells'
1175956d97fSEmmanuel Vadot  - '#size-cells'
1185956d97fSEmmanuel Vadot
1195956d97fSEmmanuel VadotallOf:
1205956d97fSEmmanuel Vadot  - $ref: /schemas/i2c/i2c-controller.yaml#
1215956d97fSEmmanuel Vadot
1225956d97fSEmmanuel Vadot  - if:
1235956d97fSEmmanuel Vadot      properties:
1245956d97fSEmmanuel Vadot        compatible:
1255956d97fSEmmanuel Vadot          contains:
1265956d97fSEmmanuel Vadot            enum:
1275956d97fSEmmanuel Vadot              - renesas,rcar-gen1-i2c
1285956d97fSEmmanuel Vadot              - renesas,rcar-gen2-i2c
1295956d97fSEmmanuel Vadot    then:
1305956d97fSEmmanuel Vadot      properties:
1315956d97fSEmmanuel Vadot        dmas: false
1325956d97fSEmmanuel Vadot        dma-names: false
1335956d97fSEmmanuel Vadot
1345956d97fSEmmanuel Vadot  - if:
1355956d97fSEmmanuel Vadot      properties:
1365956d97fSEmmanuel Vadot        compatible:
1375956d97fSEmmanuel Vadot          contains:
1385956d97fSEmmanuel Vadot            enum:
1395956d97fSEmmanuel Vadot              - renesas,rcar-gen2-i2c
1405956d97fSEmmanuel Vadot              - renesas,rcar-gen3-i2c
141c9ccf3a3SEmmanuel Vadot              - renesas,rcar-gen4-i2c
1425956d97fSEmmanuel Vadot    then:
1435956d97fSEmmanuel Vadot      required:
1445956d97fSEmmanuel Vadot        - resets
1455956d97fSEmmanuel Vadot
1465956d97fSEmmanuel VadotunevaluatedProperties: false
1475956d97fSEmmanuel Vadot
1485956d97fSEmmanuel Vadotexamples:
1495956d97fSEmmanuel Vadot  - |
1505956d97fSEmmanuel Vadot    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
1515956d97fSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1525956d97fSEmmanuel Vadot    #include <dt-bindings/power/r8a7791-sysc.h>
1535956d97fSEmmanuel Vadot
1545956d97fSEmmanuel Vadot    i2c0: i2c@e6508000 {
1555956d97fSEmmanuel Vadot            #address-cells = <1>;
1565956d97fSEmmanuel Vadot            #size-cells = <0>;
1575956d97fSEmmanuel Vadot            compatible = "renesas,i2c-r8a7791", "renesas,rcar-gen2-i2c";
1585956d97fSEmmanuel Vadot            reg = <0xe6508000 0x40>;
1595956d97fSEmmanuel Vadot            interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
1605956d97fSEmmanuel Vadot            clock-frequency = <400000>;
1615956d97fSEmmanuel Vadot            clocks = <&cpg CPG_MOD 931>;
1625956d97fSEmmanuel Vadot            power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
1635956d97fSEmmanuel Vadot            resets = <&cpg 931>;
1645956d97fSEmmanuel Vadot            i2c-scl-internal-delay-ns = <6>;
1655956d97fSEmmanuel Vadot    };
166