difos/target/linux/realtek/files-6.12/Documentation/devicetree/bindings/i2c/i2c-gpio-shared.yaml
Markus Stockhausen acd7ecc9ed realtek: add new i2c-gpio-shared driver for shared SCL lines
Some Realtek switches have been designed with I2C busses that share a
single SCL line. The clock line is used for 2 or more busses. This cannot
be used with the standard i2c-gpio driver that relies on distinct SDA
and SCL pairs.

Provide a derived i2c-gpio-shared driver that can be used instead. This
driver can handle up to 4 busses with only a single clock line.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18737
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-17 10:52:42 +02:00

51 lines
No EOL
1.2 KiB
YAML

# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/i2c-gpio-shared.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: mulitple GPIO bitbanged I2C busses with shared SCL
maintainers:
- Markus Stockhausen <markus.stockhausen@gmx.de>
allOf:
- $ref: /schemas/i2c/i2c-controller.yaml#
properties:
compatible:
items:
- const: i2c-gpio-shared
scl-gpios:
description:
gpio used for the shared scl signal, this should be flagged as
active high using open drain with (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)
from <dt-bindings/gpio/gpio.h> since the signal is by definition
open drain.
maxItems: 1
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c-gpio-shared {
compatible = "i2c-gpio-shared";
scl-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
#address-cells = <1>;
#size-cells = <0>;
i2c0: i2c@0 {
sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <2>;
};
i2c1: i2c@1 {
sda-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
i2c-gpio,delay-us = <2>;
};
};
required:
- compatible
- scl-gpios