From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DEF43C3C06; Wed, 26 Aug 2026 10:38:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.121.34.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787740725; cv=none; b=Vkki6fjfvWT1qZi8B83Muofhv8nGoqJwjhMQSVh8FCtZkuamqM7dYrqBSSyjum+pjnNPHOtYxQCJRp9PB8ULlAiawxPNzwWDL3uZsYXNrBicwBzqP+CnLQaDgqi/fWkfXqjs/vJvEpcUnqiaJLlslFhpU8HsQJPzxaQ0e6UxWCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787740725; c=relaxed/simple; bh=YbZVpmGK4gEgCiC+i8qFLeFcUigX4JW0qAqxRI6Yl+s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uucX8b0axQaQ5hszqU7G3snlAqLr4KjG5GiSTEJoFf7IFv4/sMrcZwbLip5s+NXQ+bz+ygecQbjq7RpU5xmcI+iGvd3Tv4sBSg1B2YtjL/id1Ob5pkZLWPimu9vLsbfHjBf3E76Zlp1ZNor1wHMYVCqk1g/In4RHbOxlEy4MH8o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; arc=none smtp.client-ip=92.121.34.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1CB3B2000B1; Wed, 26 Aug 2026 12:38:34 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BA5EA2002D1; Wed, 26 Aug 2026 12:38:33 +0200 (CEST) Received: from lsv03900.swis.in-blr01.nxp.com (lsv03900.swis.in-blr01.nxp.com [10.12.177.15]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id B60C2180022D; Wed, 26 Aug 2026 18:38:32 +0800 (+08) From: Lakshay Piplani To: linux-kernel@vger.kernel.org, linux-i3c@lists.infradead.org, alexandre.belloni@bootlin.com, krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, broonie@kernel.org, lee@kernel.org, Frank.Li@nxp.com, lgirdwood@gmail.com Cc: vikash.bansal@nxp.com, priyanka.jain@nxp.com, aman.kumarpandey@nxp.com, Lakshay Piplani Subject: [PATCH v16 3/8] dt-bindings: i3c: Add NXP P3H2x4x i3c-hub support Date: Wed, 26 Aug 2026 16:08:14 +0530 Message-Id: <20260826103819.1614843-4-lakshay.piplani@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260826103819.1614843-1-lakshay.piplani@nxp.com> References: <20260826103819.1614843-1-lakshay.piplani@nxp.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP From: Aman Kumar Pandey Add bindings for the NXP P3H2x4x (P3H2440/P3H2441/P3H2840/P3H2841) multiport I3C hub family. These devices connect to a host via I3C/I2C/SMBus and allow communication with multiple downstream peripherals. Signed-off-by: Aman Kumar Pandey Signed-off-by: Vikash Bansal Signed-off-by: Lakshay Piplani Reviewed-by: Rob Herring (Arm) Reviewed-by: Frank Li --- Changes in v16: - Add an allOf/if-then block for the 4-port variants (nxp,p3h2440 and nxp,p3h2441) that limits i3c@[0-3]/smbus@[0-3] and disallows target ports [4-7], so DTs describing nonexistent ports fail validation - Add #address-cells and #size-cells to the required list, since the hub is a parent bus to the target-port child node - Add an explicit minimum of 0 to the target-port reg constraints, retain the maximum of 7, and restrict the maximum to 3 for four-port variants Changes in v15: - Add compatible strings for the P3H2440, P3H2441, P3H2840 and P3H2841 variants - Fix the target-port reg schema to describe the single-cell port index Changes in v14: - No change Changes in v13: - Fix mismatch between example unit-address and reg property by correcting the reg value to match the node name Changes in v12: - No change, added Reviewed-By tag Changes in v11: - No change Changes in v10: - No change, added Reviewed-By tag Changes in v9: - Referenced i3c.yaml and i2c-controller.yaml for child nodes - Dropped unnecessary #address-cells and #size-cells from child nodes Changes in v8: - Add compatible in i3c example Changes in v7: - Fix schema validation issues - Adjust required properties - Add I2C example Changes in v6: - Use a vendor prefix for the attributes Changes in v5: - Removed SW properties: cp0-ldo-microvolt,cp1-ldo-microvolt, tp0145-ldo-microvolt, tp2367-ldo-microvolt - Changed supply entries and its descriptions Changes in v4: - Fixed DT binding check warning - Removed SW properties: ibi-enable, local-dev, and always-enable Changes in v3: - Added MFD (Multi-Function Device) support for I3C hub and on-die regulator - Added Regulator supply node Changes in v2: - Fixed DT binding check warning - Revised logic for parsing DTS nodes --- --- .../devicetree/bindings/i3c/nxp,p3h2840.yaml | 324 ++++++++++++++++++ MAINTAINERS | 9 + 2 files changed, 333 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml diff --git a/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml b/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml new file mode 100644 index 000000000000..3fa0b417a6c4 --- /dev/null +++ b/Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml @@ -0,0 +1,324 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2025-2026 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i3c/nxp,p3h2840.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP P3H2X4X I3C HUB + +maintainers: + - Aman Kumar Pandey + - Vikash Bansal + - Lakshay Piplani + +description: | + P3H2x4x (P3H2440/P3H2441/P3H2840/P3H2841) is a family of multiport I3C + hub devices that connect to:- + 1. A host CPU via I3C/I2C/SMBus bus on upstream side and connect to multiple + peripheral devices on the downstream side. + 2. Have two Controller Ports which can support either + I2C/SMBus or I3C buses and connect to a CPU, BMC or SOC. + 3. P3H2840/ P3H2841 are 8 port I3C hub with eight Target Ports. + 4. P3H2440/ P3H2441 are 4 port I3C hub with four Target Ports. + Target ports can be configured as SMBus or I3C and connect to + peripherals. + +properties: + compatible: + enum: + - nxp,p3h2440 + - nxp,p3h2441 + - nxp,p3h2840 + - nxp,p3h2841 + + reg: + maxItems: 1 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + assigned-address: + maximum: 0x7f + + nxp,tp0145-pullup-ohms: + description: + Selects the pull up resistance for target Port 0/1/4/5, in ohms. + enum: [250, 500, 1000, 2000] + default: 500 + + nxp,tp2367-pullup-ohms: + description: + Selects the pull up resistance for target Port 2/3/6/7, in ohms. + enum: [250, 500, 1000, 2000] + default: 500 + + nxp,cp0-io-strength-ohms: + description: + Selects the IO drive strength for controller Port 0, in ohms. + enum: [20, 30, 40, 50] + default: 20 + + nxp,cp1-io-strength-ohms: + description: + Selects the IO drive strength for controller Port 1, in ohms. + enum: [20, 30, 40, 50] + default: 20 + + nxp,tp0145-io-strength-ohms: + description: + Selects the IO drive strength for target port 0/1/4/5, in ohms. + enum: [20, 30, 40, 50] + default: 20 + + nxp,tp2367-io-strength-ohms: + description: + Selects the IO drive strength for target port 2/3/6/7, in ohms. + enum: [20, 30, 40, 50] + default: 20 + + vcc1-supply: + description: Controller port 0 power supply. + + vcc2-supply: + description: Controller port 1 power supply. + + vcc3-supply: + description: Target port 0/1/4/5 power supply. + + vcc4-supply: + description: Target port 2/3/6/7 power supply. + + regulators: + type: object + 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-tpg0: + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + + ldo-tpg1: + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false + +required: + - reg + - '#address-cells' + - '#size-cells' + +patternProperties: + "^i3c@[0-7]$": + type: object + $ref: /schemas/i3c/i3c.yaml# + unevaluatedProperties: false + + 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# + unevaluatedProperties: false + + 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 + +allOf: + - if: + properties: + compatible: + contains: + enum: + - nxp,p3h2440 + - nxp,p3h2441 + 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,236153000c2 { + reg = <0x70 0x236 0x153000c2>; + compatible = "nxp,p3h2840"; + #address-cells = <1>; + #size-cells = <0>; + assigned-address = <0x50>; + + nxp,tp0145-pullup-ohms = <1000>; + nxp,tp2367-pullup-ohms = <1000>; + nxp,cp0-io-strength-ohms = <50>; + nxp,cp1-io-strength-ohms = <50>; + nxp,tp0145-io-strength-ohms = <50>; + nxp,tp2367-io-strength-ohms = <50>; + vcc3-supply = <®_tpg0>; + vcc4-supply = <®_tpg1>; + + regulators { + reg_cp0: ldo-cp0 { + regulator-name = "ldo-cp0"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_cp1: ldo-cp1 { + regulator-name = "ldo-cp1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_tpg0: ldo-tpg0 { + regulator-name = "ldo-tpg0"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_tpg1: ldo-tpg1 { + regulator-name = "ldo-tpg1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + + smbus@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + nxp,pullup-enable; + }; + + smbus@1 { + reg = <0x1>; + #address-cells = <1>; + #size-cells = <0>; + nxp,pullup-enable; + }; + + i3c@2 { + reg = <0x2>; + #address-cells = <3>; + #size-cells = <0>; + nxp,pullup-enable; + }; + }; + }; + + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + hub@70 { + reg = <0x70>; + compatible = "nxp,p3h2840"; + #address-cells = <1>; + #size-cells = <0>; + + nxp,tp0145-pullup-ohms = <1000>; + nxp,tp2367-pullup-ohms = <1000>; + nxp,cp0-io-strength-ohms = <50>; + nxp,cp1-io-strength-ohms = <50>; + nxp,tp0145-io-strength-ohms = <50>; + nxp,tp2367-io-strength-ohms = <50>; + vcc3-supply = <®_tpg0_i2c>; + vcc4-supply = <®_tpg1_i2c>; + + regulators { + reg_cp0_i2c: ldo-cp0 { + regulator-name = "ldo-cp0"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_cp1_i2c: ldo-cp1 { + regulator-name = "ldo-cp1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_tpg0_i2c: ldo-tpg0 { + regulator-name = "ldo-tpg0"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_tpg1_i2c: ldo-tpg1 { + regulator-name = "ldo-tpg1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + + smbus@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + nxp,pullup-enable; + }; + + smbus@1 { + reg = <0x1>; + #address-cells = <1>; + #size-cells = <0>; + nxp,pullup-enable; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 8014b9f8253e..955b6d0c843d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19544,6 +19544,15 @@ S: Maintained F: Documentation/devicetree/bindings/ptp/nxp,ptp-netc.yaml F: drivers/ptp/ptp_netc.c +NXP P3H2X4X I3C-HUB DRIVER +M: Vikash Bansal +M: Aman Kumar Pandey +M: Lakshay Piplani +L: linux-kernel@vger.kernel.org +L: linux-i3c@lists.infradead.org +S: Maintained +F: Documentation/devicetree/bindings/i3c/nxp,p3h2840.yaml + NXP PF5300/PF5301/PF5302 PMIC REGULATOR DEVICE DRIVER M: Woodrow Douglass S: Maintained -- 2.25.1