[RFC PATCH 5/7] dt-bindings: i3c: nxp,p3h2840: add GPIO mode target ports

Lakshay Piplani lakshay.piplani at nxp.com
Fri Oct 16 09:46:23 PDT 2026


Add a "gpio at N" child node for target ports whose SCL and SDA pins are used
as general purpose IOs instead of carrying bus traffic, and mark the hub as
a gpio-controller.

GPIO mode has higher priority than the other port functions and leaves the
port disconnected from the Hub Network, so a port is either a bus port or a
GPIO port. Each port contributes two lines, the SCL pin first, so target
port N owns the lines 2 * N and 2 * N + 1.

Signed-off-by: Lakshay Piplani <lakshay.piplani at nxp.com>
Signed-off-by: Aman Kumar Pandey <aman.kumarpandey at nxp.com>
Signed-off-by: Vikash Bansal <vikash.bansal at nxp.com>
---
 .../devicetree/bindings/i3c/nxp,p3h2840.yaml  | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml b/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml
index 66f9e2b982b1..2cd52d142a17 100644
--- a/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml
+++ b/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml
@@ -47,6 +47,19 @@ properties:
   '#size-cells':
     const: 0
 
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  gpio-line-names:
+    description:
+      Names for the lines exposed by Target Ports placed in GPIO mode. Target
+      Port N owns the lines 2 * N (SCL pin) and 2 * N + 1 (SDA pin), so the
+      list covers up to two lines per Target Port the variant provides.
+    minItems: 1
+    maxItems: 16
+
   assigned-address:
     maximum: 0x7f
 
@@ -150,6 +163,34 @@ patternProperties:
     required:
       - reg
 
+  "^gpio@[0-7]$":
+    type: object
+    additionalProperties: false
+    description:
+      A Target Port whose SCL and SDA pins are used as general purpose IOs
+      instead of carrying bus traffic. GPIO mode takes priority over the other
+      port functions and leaves the port disconnected from the Hub Network.
+
+      The two pins of the port are exposed by the hub gpio-controller as two
+      consecutive lines, the SCL pin first. Target Port N therefore owns the
+      lines numbered 2 * N and 2 * N + 1.
+
+    properties:
+      reg:
+        description:
+          The I3C HUB Target Port number.
+        items:
+          - minimum: 0
+            maximum: 7
+
+      nxp,pullup-enable:
+        type: boolean
+        description:
+          Enables the on-die pull-up for Target Port.
+
+    required:
+      - reg
+
   "^smbus@[0-7]$":
     type: object
     $ref: /schemas/i2c/i2c-controller.yaml#
@@ -199,8 +240,14 @@ allOf:
             reg:
               items:
                 - maximum: 3
+        "^gpio@[0-3]$":
+          properties:
+            reg:
+              items:
+                - maximum: 3
         "^i3c@[4-7]$": false
         "^smbus@[4-7]$": false
+        "^gpio@[4-7]$": false
 
 unevaluatedProperties: false
 
@@ -216,6 +263,8 @@ examples:
             #address-cells = <1>;
             #size-cells = <0>;
             assigned-address = <0x50>;
+            gpio-controller;
+            #gpio-cells = <2>;
 
             nxp,tp0145-pullup-ohms = <1000>;
             nxp,tp2367-pullup-ohms = <1000>;
@@ -274,6 +323,11 @@ examples:
                 #size-cells = <0>;
                 nxp,pullup-enable;
             };
+
+            gpio at 3 {
+                reg = <0x3>;
+                nxp,pullup-enable;
+            };
         };
     };
 
@@ -287,6 +341,8 @@ examples:
             compatible = "nxp,p3h2840";
             #address-cells = <1>;
             #size-cells = <0>;
+            gpio-controller;
+            #gpio-cells = <2>;
 
             nxp,tp0145-pullup-ohms = <1000>;
             nxp,tp2367-pullup-ohms = <1000>;
@@ -337,5 +393,10 @@ examples:
                 #size-cells = <0>;
                 nxp,pullup-enable;
             };
+
+            gpio at 4 {
+                reg = <0x4>;
+                nxp,pullup-enable;
+            };
         };
     };
-- 
2.25.1




More information about the linux-i3c mailing list