mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
Add the "realtek,rtl9607-i2c" compatible for i2c controller on the RTL9607C SoC series. Add a clocks property to the properties to describe the i2c reference clock and make it available for all the compatibles. This i2c reference clock is assumed to be coming from switchcore region via Lexra bus as the other SoC peripherals. According to the info available about the existing devices, they also have the i2c master controller clocks. RTL9607C requires the "realtek,scl" and "clocks" to be specified and so handle it under separate if check for "realtek,rtl9607-i2c". Signed-off-by: Rustam Adilov <adilov@disroot.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260401180648.337834-6-adilov@disroot.org
120 lines
2.6 KiB
YAML
120 lines
2.6 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/i2c/realtek,rtl9301-i2c.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Realtek RTL I2C Controller
|
|
|
|
maintainers:
|
|
- Chris Packham <chris.packham@alliedtelesis.co.nz>
|
|
|
|
description:
|
|
RTL9300 SoCs have two I2C controllers. Each of these has an SCL line (which
|
|
if not-used for SCL can be a GPIO). There are 8 common SDA lines that can be
|
|
assigned to either I2C controller.
|
|
RTL9310 SoCs have equal capabilities but support 12 common SDA lines which
|
|
can be assigned to either I2C controller.
|
|
RTL9607C SoCs have equal capabilities but each controller only supports 1
|
|
SCL/SDA line.
|
|
|
|
properties:
|
|
compatible:
|
|
oneOf:
|
|
- items:
|
|
- enum:
|
|
- realtek,rtl9302b-i2c
|
|
- realtek,rtl9302c-i2c
|
|
- realtek,rtl9303-i2c
|
|
- const: realtek,rtl9301-i2c
|
|
- items:
|
|
- enum:
|
|
- realtek,rtl9311-i2c
|
|
- realtek,rtl9312-i2c
|
|
- realtek,rtl9313-i2c
|
|
- const: realtek,rtl9310-i2c
|
|
- enum:
|
|
- realtek,rtl9301-i2c
|
|
- realtek,rtl9310-i2c
|
|
- realtek,rtl9607-i2c
|
|
|
|
reg:
|
|
items:
|
|
- description: Register offset and size of this I2C controller.
|
|
|
|
"#address-cells":
|
|
const: 1
|
|
|
|
"#size-cells":
|
|
const: 0
|
|
|
|
realtek,scl:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description:
|
|
The SCL line number of this I2C controller.
|
|
enum: [ 0, 1 ]
|
|
|
|
clocks:
|
|
maxItems: 1
|
|
|
|
patternProperties:
|
|
'^i2c@[0-9ab]$':
|
|
$ref: /schemas/i2c/i2c-controller.yaml
|
|
unevaluatedProperties: false
|
|
|
|
properties:
|
|
reg:
|
|
description: The SDA line number associated with the I2C bus.
|
|
maxItems: 1
|
|
|
|
required:
|
|
- reg
|
|
|
|
allOf:
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: realtek,rtl9310-i2c
|
|
then:
|
|
required:
|
|
- realtek,scl
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: realtek,rtl9301-i2c
|
|
then:
|
|
patternProperties:
|
|
'^i2c@[89ab]$': false
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: realtek,rtl9607-i2c
|
|
then:
|
|
required:
|
|
- realtek,scl
|
|
- clocks
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
|
|
additionalProperties: false
|
|
|
|
examples:
|
|
- |
|
|
i2c@36c {
|
|
compatible = "realtek,rtl9301-i2c";
|
|
reg = <0x36c 0x14>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
i2c@2 {
|
|
reg = <2>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
};
|
|
};
|