Skip to content

Commit c5eda03

Browse files
cpackham-atlnzAndi Shyti
authored andcommitted
dt-bindings: i2c: Add Realtek RTL I2C Controller
Add dt-schema for the I2C controller on the RTL9300 Ethernet switch with integrated SoC. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
1 parent 51616b0 commit c5eda03

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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+
7+
title: Realtek RTL I2C Controller
8+
9+
maintainers:
10+
- Chris Packham <chris.packham@alliedtelesis.co.nz>
11+
12+
description:
13+
The RTL9300 SoC has 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+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- items:
21+
- enum:
22+
- realtek,rtl9302b-i2c
23+
- realtek,rtl9302c-i2c
24+
- realtek,rtl9303-i2c
25+
- const: realtek,rtl9301-i2c
26+
- const: realtek,rtl9301-i2c
27+
28+
reg:
29+
description: Register offset and size this I2C controller.
30+
31+
"#address-cells":
32+
const: 1
33+
34+
"#size-cells":
35+
const: 0
36+
37+
patternProperties:
38+
'^i2c@[0-7]$':
39+
$ref: /schemas/i2c/i2c-controller.yaml
40+
unevaluatedProperties: false
41+
42+
properties:
43+
reg:
44+
description: The SDA pin associated with the I2C bus.
45+
maxItems: 1
46+
47+
required:
48+
- reg
49+
50+
required:
51+
- compatible
52+
- reg
53+
54+
additionalProperties: false
55+
56+
examples:
57+
- |
58+
i2c@36c {
59+
compatible = "realtek,rtl9301-i2c";
60+
reg = <0x36c 0x14>;
61+
#address-cells = <1>;
62+
#size-cells = <0>;
63+
64+
i2c@2 {
65+
reg = <2>;
66+
#address-cells = <1>;
67+
#size-cells = <0>;
68+
};
69+
};

0 commit comments

Comments
 (0)