[PATCH v20 4/8] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator

Lakshay Piplani lakshay.piplani at nxp.com
Fri Oct 23 04:04:12 PDT 2026


NXP Confidential
> -----Original Message-----
> From: Lakshay Piplani <lakshay.piplani at nxp.com>
> Sent: Tuesday, September 22, 2026 4:06 PM
> To: linux-kernel at vger.kernel.org; linux-i3c at lists.infradead.org;
> alexandre.belloni at bootlin.com; krzk+dt at kernel.org; robh at kernel.org;
> conor+dt at kernel.org; devicetree at vger.kernel.org; broonie at kernel.org;
> mfd at lists.linux.dev; lee at kernel.org; Frank Li <frank.li at nxp.com>;
> lgirdwood at gmail.com
> Cc: Vikash Bansal <vikash.bansal at nxp.com>; Priyanka Jain
> <priyanka.jain at nxp.com>; Aman Kumar Pandey
> <aman.kumarpandey at nxp.com>; Lakshay Piplani
> <lakshay.piplani at nxp.com>
> Subject: [PATCH v20 4/8] mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub
> and on-die regulator
>
> From: Aman Kumar Pandey <aman.kumarpandey at nxp.com>
>
> Add core MFD support for the NXP P3H2x4x
> (P3H2440/P3H2441/P3H2840/P3H2841) family of multiport I3C hub devices.
> These devices connect to a host via I3C/I2C/SMBus and expose multiple
> downstream target ports.
>
> All variants share the same register interface. Read the implemented target-
> port count from DEV_CAPAB, so no per-compatible driver data is required.
>
> Signed-off-by: Aman Kumar Pandey <aman.kumarpandey at nxp.com>
> Signed-off-by: Vikash Bansal <vikash.bansal at nxp.com>
> Signed-off-by: Lakshay Piplani <lakshay.piplani at nxp.com>
> Reviewed-by: Frank Li <Frank.Li at nxp.com>
>
> ---
> Changes in v20:
>  - No change
>
> Changes in v19:
>  - Retain only nxp,p3h2840 in the OF match table because the other
>    variants use it as their fallback compatible
>
> Changes in v18:
>  - Rebased onto v7.3-rc1; no intended driver behaviour changes
>
> Changes in v17:
>  - No change
>
> Changes in v16:
>  - Use a named initializer for struct i2c_device_id
>   ({ .name = "nxp-i3c-hub" })
>  - Keep the shared header in include/linux/mfd/ (struct p3h2x4x is shared by
>    the mfd parent and its regulator/i3c-hub children). The i3c_hub_priv
>    back-pointer is retained for IBI routing, with documented publish/clear
>    ordering
>
> Changes in v15:
>  - Read the device capability register to determine whether the device has
>    four or eight target ports
>  - Store the detected target-port count in the shared MFD data
>  - Add OF match entries for all P3H2440, P3H2441, P3H2840 and P3H2841
>    variants
>  - Add a shared hub-context pointer for use by the IBI handler without
>    overwriting the MFD parent's driver data
>
> Changes in v14:
>  - Clean up MFD driver comments, formatting, variable names and author
>    information
>  - Define and document the I3C hub DCR value in hexadecimal form
>  - Use direct regmap bit-width values instead of local macros
>  - Add a shared protected_reg_lock for protected register accesses across
>    P3H2X4X child drivers
>
> Changes in v13:
>  - Use i3c_device helpers (i3cdev_to_dev()) instead of direct struct access
>    to maintain API abstraction
>  - Avoid including internal I3C headers and use public device headers instead
>  - Ensure proper device matching by relying on manufacturer ID checks in
> probe
>
> Changes in v12:
>  - No change, added Reviewed-By tag
>
> Changes in v11:
>  - Use MFD_CELL_NAME() for child device registration
>  - Rename local variables for consistency
>  - Rename driver names to follow subsystem conventions:
>    - Use '-' instead of '_' in driver names
>    - Drop the "_drv" suffix from driver names
>
> Changes in v10:
>  - Drop redundant is_p3h2x4x_in_i3c flag
>
> Changes in v9:
>  - Renamed macros to follow consistent uppercase naming conventions
>  - Made REGMAP selects in the P3H2X4X MFD Kconfig conditional,
>    to avoid I3C/I2C dependency issues
>
> Changes in v8:
>  - No change
>
> Changes in v7:
>  - Use new config I3C_OR_I2C
>
> Changes in v6:
>  - No change
>
> Changes in v5:
>  - Corrected the ordering in the Makefile and Kconfig for MFD_P3H2X4X
>  - Updated dev_err_probe() for regmap_init failure.
>  - Updated module description
>
> Changes in v4:
>  - Split the driver into three separate patches(mfd, regulator and I3C hub)
>  - Added support for NXP P3H2x4x MFD functionality
> ---
> ---
>  MAINTAINERS                 |   2 +
>  drivers/mfd/Kconfig         |  13 +++
>  drivers/mfd/Makefile        |   1 +
>  drivers/mfd/p3h2840.c       | 164 ++++++++++++++++++++++++++++++++++++
>  include/linux/i3c/device.h  |   2 +
>  include/linux/mfd/p3h2840.h |  41 +++++++++
>  6 files changed, 223 insertions(+)
>  create mode 100644 drivers/mfd/p3h2840.c  create mode 100644
> include/linux/mfd/p3h2840.h
>

Hi Lee,

Alexandre has already applied patches 1/8, 2/8, 3/8 and 6/8 from the v20 series.

Patches 4/8, 5/8, 7/8 and 8/8 remain outstanding, with patch 4/8 providing the MFD core required by the remaining patches.

Do you plan to pick patch 4/8 through the MFD tree, or would you prefer it to go through the I3C tree with your Reviewed-by?

Thanks
Lakshay


More information about the linux-i3c mailing list