xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/marvell,mv64xxx-i2c.yaml (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/i2c/marvell,mv64xxx-i2c.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Marvell MV64XXX I2C Controller
8
9maintainers:
10  - Gregory CLEMENT <gregory.clement@bootlin.com>
11
12properties:
13  compatible:
14    oneOf:
15      - const: allwinner,sun4i-a10-i2c
16      - items:
17          - const: allwinner,sun7i-a20-i2c
18          - const: allwinner,sun4i-a10-i2c
19      - const: allwinner,sun6i-a31-i2c
20      - items:
21          - enum:
22              - allwinner,suniv-f1c100s-i2c
23              - allwinner,sun8i-a23-i2c
24              - allwinner,sun8i-a83t-i2c
25              - allwinner,sun8i-v536-i2c
26              - allwinner,sun50i-a64-i2c
27              - allwinner,sun50i-h6-i2c
28          - const: allwinner,sun6i-a31-i2c
29      - description: Allwinner SoCs with offload support
30        items:
31          - enum:
32              - allwinner,sun20i-d1-i2c
33              - allwinner,sun50i-a100-i2c
34              - allwinner,sun50i-h616-i2c
35              - allwinner,sun50i-r329-i2c
36          - const: allwinner,sun8i-v536-i2c
37          - const: allwinner,sun6i-a31-i2c
38      - const: marvell,mv64xxx-i2c
39      - const: marvell,mv78230-i2c
40      - const: marvell,mv78230-a0-i2c
41
42    description:
43      Only use "marvell,mv78230-a0-i2c" for a very rare, initial
44      version of the SoC which had broken offload support. Linux
45      auto-detects this and sets it appropriately.
46
47  reg:
48    maxItems: 1
49
50  interrupts:
51    maxItems: 1
52
53  clocks:
54    minItems: 1
55    items:
56      - description: Reference clock for the I2C bus
57      - description: Bus clock (Only for Armada 7K/8K)
58
59  clock-names:
60    minItems: 1
61    items:
62      - const: core
63      - const: reg
64    description:
65      Mandatory if two clocks are used (only for Armada 7k and 8k).
66
67  resets:
68    maxItems: 1
69
70  dmas:
71    items:
72      - description: RX DMA Channel
73      - description: TX DMA Channel
74
75  dma-names:
76    items:
77      - const: rx
78      - const: tx
79
80dependencies:
81  dmas: [ dma-names ]
82
83required:
84  - compatible
85  - reg
86  - interrupts
87
88allOf:
89  - $ref: /schemas/i2c/i2c-controller.yaml#
90  - if:
91      properties:
92        compatible:
93          contains:
94            enum:
95              - allwinner,sun4i-a10-i2c
96              - allwinner,sun6i-a31-i2c
97
98    then:
99      required:
100        - clocks
101
102  - if:
103      properties:
104        compatible:
105          contains:
106            const: allwinner,sun6i-a31-i2c
107
108    then:
109      required:
110        - resets
111
112unevaluatedProperties: false
113
114examples:
115  - |
116    i2c@11000 {
117        compatible = "marvell,mv64xxx-i2c";
118        reg = <0x11000 0x20>;
119        interrupts = <29>;
120        clock-frequency = <100000>;
121    };
122
123  - |
124    i2c@11000 {
125        compatible = "marvell,mv78230-i2c";
126        reg = <0x11000 0x100>;
127        interrupts = <29>;
128        clock-frequency = <100000>;
129    };
130
131  - |
132    i2c@701000 {
133        compatible = "marvell,mv78230-i2c";
134        reg = <0x701000 0x20>;
135        interrupts = <29>;
136        clock-frequency = <100000>;
137        clock-names = "core", "reg";
138        clocks = <&core_clock>, <&reg_clock>;
139    };
140
141...
142