Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/i2c/realtek,rtl9301-i2c.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Realtek RTL I2C Controller
8
9maintainers:
10 - Chris Packham <chris.packham@alliedtelesis.co.nz>
11
12description:
13 RTL9300 SoCs have two I2C controllers. Each of these has an SCL line (which
14 if not-used for SCL can be a GPIO). There are 8 common SDA lines that can be
15 assigned to either I2C controller.
16 RTL9310 SoCs have equal capabilities but support 12 common SDA lines which
17 can be assigned to either I2C controller.
18 RTL9607C SoCs have equal capabilities but each controller only supports 1
19 SCL/SDA line.
20
21properties:
22 compatible:
23 oneOf:
24 - items:
25 - enum:
26 - realtek,rtl9302b-i2c
27 - realtek,rtl9302c-i2c
28 - realtek,rtl9303-i2c
29 - const: realtek,rtl9301-i2c
30 - items:
31 - enum:
32 - realtek,rtl9311-i2c
33 - realtek,rtl9312-i2c
34 - realtek,rtl9313-i2c
35 - const: realtek,rtl9310-i2c
36 - enum:
37 - realtek,rtl9301-i2c
38 - realtek,rtl9310-i2c
39 - realtek,rtl9607-i2c
40
41 reg:
42 items:
43 - description: Register offset and size of this I2C controller.
44
45 "#address-cells":
46 const: 1
47
48 "#size-cells":
49 const: 0
50
51 realtek,scl:
52 $ref: /schemas/types.yaml#/definitions/uint32
53 description:
54 The SCL line number of this I2C controller.
55 enum: [ 0, 1 ]
56
57 clocks:
58 maxItems: 1
59
60patternProperties:
61 '^i2c@[0-9ab]$':
62 $ref: /schemas/i2c/i2c-controller.yaml
63 unevaluatedProperties: false
64
65 properties:
66 reg:
67 description: The SDA line number associated with the I2C bus.
68 maxItems: 1
69
70 required:
71 - reg
72
73allOf:
74 - if:
75 properties:
76 compatible:
77 contains:
78 const: realtek,rtl9310-i2c
79 then:
80 required:
81 - realtek,scl
82 - if:
83 properties:
84 compatible:
85 contains:
86 const: realtek,rtl9301-i2c
87 then:
88 patternProperties:
89 '^i2c@[89ab]$': false
90 - if:
91 properties:
92 compatible:
93 contains:
94 const: realtek,rtl9607-i2c
95 then:
96 required:
97 - realtek,scl
98 - clocks
99
100required:
101 - compatible
102 - reg
103
104additionalProperties: false
105
106examples:
107 - |
108 i2c@36c {
109 compatible = "realtek,rtl9301-i2c";
110 reg = <0x36c 0x14>;
111 #address-cells = <1>;
112 #size-cells = <0>;
113
114 i2c@2 {
115 reg = <2>;
116 #address-cells = <1>;
117 #size-cells = <0>;
118 };
119 };