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 19properties: 20 compatible: 21 oneOf: 22 - items: 23 - enum: 24 - realtek,rtl9302b-i2c 25 - realtek,rtl9302c-i2c 26 - realtek,rtl9303-i2c 27 - const: realtek,rtl9301-i2c 28 - items: 29 - enum: 30 - realtek,rtl9311-i2c 31 - realtek,rtl9312-i2c 32 - realtek,rtl9313-i2c 33 - const: realtek,rtl9310-i2c 34 - enum: 35 - realtek,rtl9301-i2c 36 - realtek,rtl9310-i2c 37 38 reg: 39 items: 40 - description: Register offset and size of this I2C controller. 41 42 "#address-cells": 43 const: 1 44 45 "#size-cells": 46 const: 0 47 48 realtek,scl: 49 $ref: /schemas/types.yaml#/definitions/uint32 50 description: 51 The SCL line number of this I2C controller. 52 enum: [ 0, 1 ] 53 54patternProperties: 55 '^i2c@[0-9ab]$': 56 $ref: /schemas/i2c/i2c-controller.yaml 57 unevaluatedProperties: false 58 59 properties: 60 reg: 61 description: The SDA line number associated with the I2C bus. 62 maxItems: 1 63 64 required: 65 - reg 66 67 68allOf: 69 - if: 70 properties: 71 compatible: 72 contains: 73 const: realtek,rtl9310-i2c 74 then: 75 required: 76 - realtek,scl 77 - if: 78 properties: 79 compatible: 80 contains: 81 const: realtek,rtl9301-i2c 82 then: 83 patternProperties: 84 '^i2c@[89ab]$': false 85 86required: 87 - compatible 88 - reg 89 90additionalProperties: false 91 92examples: 93 - | 94 i2c@36c { 95 compatible = "realtek,rtl9301-i2c"; 96 reg = <0x36c 0x14>; 97 #address-cells = <1>; 98 #size-cells = <0>; 99 100 i2c@2 { 101 reg = <2>; 102 #address-cells = <1>; 103 #size-cells = <0>; 104 }; 105 }; 106