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