xref: /linux/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml (revision 7f71507851fc7764b36a3221839607d3a45c2025)
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  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
17properties:
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
37patternProperties:
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
50required:
51  - compatible
52  - reg
53
54additionalProperties: false
55
56examples:
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    };
70