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