Devicetree
 help / color / mirror / Atom feed
From: <zain_zhou@realsil.com.cn>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Frank Li <Frank.Li@nxp.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Vikash Bansal <vikash.bansal@nxp.com>,
	Aman Kumar Pandey <aman.kumarpandey@nxp.com>,
	Lakshay Piplani <lakshay.piplani@nxp.com>
Cc: <devicetree@vger.kernel.org>, <linux-i3c@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <mfd@lists.linux.dev>,
	Wei Wang <wei_wang@realsil.com.cn>,
	Yin Zhou <zain_zhou@realsil.com.cn>
Subject: [RFC PATCH 1/4] dt-bindings: i3c: Add Realtek RTS490x I3C hub support
Date: Sun, 20 Sep 2026 18:04:58 +0800	[thread overview]
Message-ID: <20260920100501.4091351-2-zain_zhou@realsil.com.cn> (raw)
In-Reply-To: <20260920100501.4091351-1-zain_zhou@realsil.com.cn>

From: Yin Zhou <zain_zhou@realsil.com.cn>

Add the device tree binding for the Realtek RTS490x family of I3C
hubs. The hubs provide four or eight downstream target ports that can
operate as I3C buses or SMBus controller and target interfaces, along
with programmable LDO outputs for the controller and target-port
power domains.

Signed-off-by: Yin Zhou <zain_zhou@realsil.com.cn>
---
 .../bindings/i3c/realtek,rts490x.yaml         | 266 ++++++++++++++++++
 MAINTAINERS                                   |   7 +
 2 files changed, 273 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i3c/realtek,rts490x.yaml

diff --git a/Documentation/devicetree/bindings/i3c/realtek,rts490x.yaml b/Documentation/devicetree/bindings/i3c/realtek,rts490x.yaml
new file mode 100644
index 000000000000..92d5d73db435
--- /dev/null
+++ b/Documentation/devicetree/bindings/i3c/realtek,rts490x.yaml
@@ -0,0 +1,266 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2025-2026 Realtek Semiconductor Corp.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i3c/realtek,rts490x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RTS490x I3C hub
+
+maintainers:
+  - Yin Zhou <zain_zhou@realsil.com.cn>
+
+description: |
+  The Realtek RTS490x family provides four or eight downstream target ports.
+  The hub is an I3C target and is accessed through an upstream I3C controller.
+  Each target port can operate as an I3C bus or as an SMBus controller and
+  target interface. The hub also provides four programmable LDO outputs for
+  its controller and target-port power domains.
+
+properties:
+  compatible:
+    enum:
+      - realtek,rts4900
+      - realtek,rts4901
+      - realtek,rts4902
+      - realtek,rts4903
+      - realtek,rts4904
+      - realtek,rts4906
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  assigned-address:
+    maximum: 0x7f
+
+  realtek,tp0145-pullup-ohms:
+    description:
+      Pull-up resistance for target ports 0, 1, 4 and 5, in ohms. If omitted,
+      the driver retains the current hardware setting.
+    enum: [250, 500, 1000, 2000]
+
+  realtek,tp2367-pullup-ohms:
+    description:
+      Pull-up resistance for target ports 2, 3, 6 and 7, in ohms. If omitted,
+      the driver retains the current hardware setting.
+    enum: [250, 500, 1000, 2000]
+
+  realtek,cp0-io-strength-ohms:
+    description:
+      IO drive strength for controller port 0, in ohms. If omitted, the driver
+      retains the current hardware setting.
+    enum: [20, 30, 40, 50]
+
+  realtek,cp1-io-strength-ohms:
+    description:
+      IO drive strength for controller port 1, in ohms. If omitted, the driver
+      retains the current hardware setting.
+    enum: [20, 30, 40, 50]
+
+  realtek,tp0145-io-strength-ohms:
+    description:
+      IO drive strength for target ports 0, 1, 4 and 5, in ohms. If omitted,
+      the driver retains the current hardware setting.
+    enum: [20, 30, 40, 50]
+
+  realtek,tp2367-io-strength-ohms:
+    description:
+      IO drive strength for target ports 2, 3, 6 and 7, in ohms. If omitted,
+      the driver retains the current hardware setting.
+    enum: [20, 30, 40, 50]
+
+  vcc-cp0-supply:
+    description:
+      Optional external power supply for controller port 0. If omitted, the
+      driver does not request or enable this supply.
+
+  vcc-cp1-supply:
+    description:
+      Optional external power supply for controller port 1. If omitted, the
+      driver does not request or enable this supply.
+
+  vcc-tp0145-supply:
+    description:
+      Optional external power supply for target ports 0, 1, 4 and 5. If
+      omitted, the driver does not request or enable this supply.
+
+  vcc-tp2367-supply:
+    description:
+      Optional external power supply for target ports 2, 3, 6 and 7. If
+      omitted, the driver does not request or enable this supply.
+
+  regulators:
+    type: object
+    description:
+      Optional container for the hub's programmable LDOs. Only enabled LDO
+      child nodes are registered by the driver. An omitted or disabled LDO
+      child is not registered and its hardware state is left unchanged.
+    additionalProperties: false
+
+    properties:
+      ldo-cp0:
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+      ldo-cp1:
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+      ldo-tp0145:
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+      ldo-tp2367:
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+        unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+
+patternProperties:
+  '^i3c@[0-7]$':
+    type: object
+    $ref: /schemas/i3c/i3c.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      reg:
+        description: Target-port number.
+        items:
+          - minimum: 0
+            maximum: 7
+
+      realtek,pullup-enable:
+        type: boolean
+        description:
+          Enable the on-chip pull-up for this target port. If omitted, the
+          on-chip pull-up is disabled.
+
+    required:
+      - reg
+
+  '^smbus@[0-7]$':
+    type: object
+    $ref: /schemas/i2c/i2c-controller.yaml#
+    unevaluatedProperties: false
+
+    properties:
+      reg:
+        description: Target-port number.
+        items:
+          - minimum: 0
+            maximum: 7
+
+      realtek,pullup-enable:
+        type: boolean
+        description:
+          Enable the on-chip pull-up for this target port. If omitted, the
+          on-chip pull-up is disabled.
+
+      clock-frequency:
+        description:
+          SMBus controller-agent clock frequency for this target port, in Hz.
+          If omitted, the driver uses 400 kHz.
+        enum: [100000, 200000, 400000, 1000000]
+        default: 400000
+
+    required:
+      - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - realtek,rts4900
+              - realtek,rts4901
+              - realtek,rts4904
+    then:
+      patternProperties:
+        '^i3c@[0-3]$':
+          properties:
+            reg:
+              items:
+                - maximum: 3
+        '^smbus@[0-3]$':
+          properties:
+            reg:
+              items:
+                - maximum: 3
+        '^i3c@[4-7]$': false
+        '^smbus@[4-7]$': false
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i3c {
+        #address-cells = <3>;
+        #size-cells = <0>;
+
+        hub@70,4ba00000000 {
+            compatible = "realtek,rts4900";
+            reg = <0x70 0x4ba 0x00000000>;
+            assigned-address = <0x70>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            realtek,tp0145-pullup-ohms = <1000>;
+            realtek,cp0-io-strength-ohms = <20>;
+            realtek,cp1-io-strength-ohms = <20>;
+            realtek,tp0145-io-strength-ohms = <30>;
+
+            vcc-cp0-supply = <&ldo_cp0>;
+            vcc-cp1-supply = <&ldo_cp1>;
+            vcc-tp0145-supply = <&ldo_tp0145>;
+
+            regulators {
+                ldo_cp0: ldo-cp0 {
+                    regulator-name = "ldo-cp0";
+                    regulator-min-microvolt = <1000000>;
+                    regulator-max-microvolt = <1000000>;
+                };
+
+                ldo_cp1: ldo-cp1 {
+                    regulator-name = "ldo-cp1";
+                    regulator-min-microvolt = <1000000>;
+                    regulator-max-microvolt = <1000000>;
+                };
+
+                ldo_tp0145: ldo-tp0145 {
+                    regulator-name = "ldo-tp0145";
+                    regulator-min-microvolt = <1800000>;
+                    regulator-max-microvolt = <1800000>;
+                };
+            };
+
+            i3c@0 {
+                reg = <0>;
+                #address-cells = <3>;
+                #size-cells = <0>;
+                realtek,pullup-enable;
+            };
+
+            smbus@1 {
+                reg = <1>;
+                #address-cells = <1>;
+                #size-cells = <0>;
+                clock-frequency = <400000>;
+                realtek,pullup-enable;
+            };
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index f76359fdebbf..a2c171a28cd2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22992,6 +22992,13 @@ S:	Maintained
 F:	include/sound/rt*.h
 F:	sound/soc/codecs/rt*
 
+REALTEK RTS490X I3C HUB DRIVER
+M:	Yin Zhou <zain_zhou@realsil.com.cn>
+L:	linux-i3c@lists.infradead.org
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/i3c/realtek,rts490x.yaml
+
 REALTEK OTTO WATCHDOG
 M:	Sander Vanheule <sander@svanheule.net>
 L:	linux-watchdog@vger.kernel.org
-- 
2.34.1


  reply	other threads:[~2026-09-20 10:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20 10:04 [RFC PATCH 0/4] Add support for Realtek RTS490x I3C hub zain_zhou
2026-09-20 10:04 ` zain_zhou [this message]
2026-09-20 10:04 ` [RFC PATCH 2/4] mfd: Add driver " zain_zhou
2026-09-20 10:05 ` [RFC PATCH 3/4] regulator: rts490x: Add driver for on-die regulators zain_zhou
2026-09-20 13:05   ` Krzysztof Kozlowski
2026-09-21  3:46     ` 回复: " 周寅
2026-09-21 14:07       ` Krzysztof Kozlowski
2026-09-22  9:16         ` 回复: " 周寅
2026-09-21 10:23   ` Mark Brown
2026-09-20 10:05 ` [RFC PATCH 4/4] i3c: hub: Add Realtek RTS490x I3C hub support zain_zhou
2026-09-21 18:42   ` Frank Li
2026-09-22 11:17     ` 回复: " 周寅
2026-09-22 18:37       ` Frank Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260920100501.4091351-2-zain_zhou@realsil.com.cn \
    --to=zain_zhou@realsil.com.cn \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aman.kumarpandey@nxp.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lakshay.piplani@nxp.com \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=vikash.bansal@nxp.com \
    --cc=wei_wang@realsil.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox