[PATCH v21 0/4] Add support for NXP P3H2x4x I3C hub driver

From: Lakshay Piplani

Date: Thu Nov 12 2026 - 07:45:32 EST


This series adds the MFD parent, regulator and hub drivers for NXP's
four-port and eight-port P3H2x4x I3C hubs. With an I3C host, the hub
driver exposes I3C ports as virtual controllers. SMBus ports appear
as I2C adapters with either an I2C or an I3C host.

The I3C core helpers, DT binding and generic hub support from v20
(patches 1-3 and 6) are in mainline. This revision rebases the four
device-specific patches onto v7.4-rc2.

Sashiko flagged the location of p3h2840.h in both the MFD and regulator
patches (v20 4/8 and 5/8). Both reports appear to be false positives.
The MFD parent and its regulator and hub children share struct p3h2x4x,
so the header stays in include/linux/mfd/.

Changes since v20

Fixes for the three Sashiko findings

- Close the I3C registration race by keeping routing callbacks active
until all virtual controllers are registered. Under the routing mutex,
write the route mask and mark the ports permanently connected only if
the write succeeds.
- Apply the same "i3c" and "smbus" node filter in both DT parsers so
an unrelated child with a "reg" property cannot claim a target port.
- Service each pending SMBus receive buffer independently. Acknowledge
overflow by writing only bit 3, so a refilled buffer keeps its new
receive flag.

Additional fixes

- Reject duplicate target-port numbers in DT.
- Reserve DT-assigned addresses for all I3C ports before the first
virtual controller runs dynamic address assignment (DAA).
- Clear only the transaction-finish flag when starting an SMBus
controller transfer, preserving pending target RX and overflow flags.
- Set up the optional IBI before taking the routing mutex so a probe
error during setup cannot leave the mutex held.

Previous posting (v20)
https://lore.kernel.org/linux-i3c/20260922103551.2754613-1-lakshay.piplani@xxxxxxx/

Mainline merge
https://git.kernel.org/linus/3ad1536d831a104b4134924d418b072b3f175e81

Aman Kumar Pandey (3):
mfd: p3h2x4x: Add driver for NXP P3H2x4x i3c hub and on-die regulator
regulator: p3h2x4x: Add driver for on-die regulators in NXP P3H2x4x
i3c hub
i3c: hub: p3h2x4x: Add support for NXP P3H2x4x I3C hub functionality

Lakshay Piplani (1):
i3c: hub: p3h2x4x: Add SMBus slave mode support

MAINTAINERS | 6 +
drivers/i3c/Kconfig | 1 +
drivers/i3c/Makefile | 1 +
drivers/i3c/hub/Kconfig | 11 +
drivers/i3c/hub/Makefile | 4 +
drivers/i3c/hub/p3h2840_i3c_hub.h | 356 ++++++++++
drivers/i3c/hub/p3h2840_i3c_hub_common.c | 432 ++++++++++++
drivers/i3c/hub/p3h2840_i3c_hub_i3c.c | 213 ++++++
drivers/i3c/hub/p3h2840_i3c_hub_smbus.c | 648 ++++++++++++++++++
drivers/mfd/Kconfig | 13 +
drivers/mfd/Makefile | 1 +
drivers/mfd/p3h2840.c | 164 +++++
drivers/regulator/Kconfig | 10 +
drivers/regulator/Makefile | 1 +
drivers/regulator/p3h2840_i3c_hub_regulator.c | 289 ++++++++
include/linux/i3c/device.h | 2 +
include/linux/mfd/p3h2840.h | 41 ++
17 files changed, 2193 insertions(+)
create mode 100644 drivers/i3c/hub/Kconfig
create mode 100644 drivers/i3c/hub/Makefile
create mode 100644 drivers/i3c/hub/p3h2840_i3c_hub.h
create mode 100644 drivers/i3c/hub/p3h2840_i3c_hub_common.c
create mode 100644 drivers/i3c/hub/p3h2840_i3c_hub_i3c.c
create mode 100644 drivers/i3c/hub/p3h2840_i3c_hub_smbus.c
create mode 100644 drivers/mfd/p3h2840.c
create mode 100644 drivers/regulator/p3h2840_i3c_hub_regulator.c
create mode 100644 include/linux/mfd/p3h2840.h

--
2.25.1