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 Device Tree Bindings
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          - const: allwinner,sun8i-a23-i2c
22          - const: allwinner,sun6i-a31-i2c
23      - items:
24          - const: allwinner,sun8i-a83t-i2c
25          - const: allwinner,sun6i-a31-i2c
26      - items:
27          - const: allwinner,sun50i-a64-i2c
28          - const: allwinner,sun6i-a31-i2c
29
30      - const: marvell,mv64xxx-i2c
31      - const: marvell,mv78230-i2c
32      - const: marvell,mv78230-a0-i2c
33
34    description:
35      Only use "marvell,mv78230-a0-i2c" for a very rare, initial
36      version of the SoC which had broken offload support. Linux
37      auto-detects this and sets it appropriately.
38
39  reg:
40    maxItems: 1
41
42  interrupts:
43    maxItems: 1
44
45  clocks:
46    minItems: 1
47    maxItems: 2
48    items:
49      - description: Reference clock for the I2C bus
50      - description: Bus clock (Only for Armada 7K/8K)
51
52  clock-names:
53    minItems: 1
54    maxItems: 2
55    items:
56      - const: core
57      - const: reg
58    description:
59      Mandatory if two clocks are used (only for Armada 7k and 8k).
60
61  resets:
62    maxItems: 1
63
64required:
65  - compatible
66  - reg
67  - interrupts
68
69allOf:
70  - $ref: /schemas/i2c/i2c-controller.yaml#
71  - if:
72      properties:
73        compatible:
74          contains:
75            enum:
76              - allwinner,sun4i-a10-i2c
77              - allwinner,sun6i-a31-i2c
78
79    then:
80      required:
81        - clocks
82
83  - if:
84      properties:
85        compatible:
86          contains:
87            const: allwinner,sun6i-a31-i2c
88
89    then:
90      required:
91        - resets
92
93# FIXME: We should set it, but it would report all the generic
94# properties as additional properties.
95# additionalProperties: false
96
97examples:
98  - |
99    i2c@11000 {
100        compatible = "marvell,mv64xxx-i2c";
101        reg = <0x11000 0x20>;
102        interrupts = <29>;
103        clock-frequency = <100000>;
104    };
105
106  - |
107    i2c@11000 {
108        compatible = "marvell,mv78230-i2c";
109        reg = <0x11000 0x100>;
110        interrupts = <29>;
111        clock-frequency = <100000>;
112    };
113
114  - |
115    i2c@701000 {
116        compatible = "marvell,mv78230-i2c";
117        reg = <0x701000 0x20>;
118        interrupts = <29>;
119        clock-frequency = <100000>;
120        clock-names = "core", "reg";
121        clocks = <&core_clock>, <&reg_clock>;
122    };
123
124...
125