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