mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] i3c: hub: p3h2x4x: add debugfs, i2c-tools, bus rate and GPIO mode support
@ 2026-10-16 16:46 Lakshay Piplani
  2026-10-16 16:46 ` [RFC PATCH 1/7] i3c: hub: p3h2x4x: Add support for debugfs Lakshay Piplani
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Lakshay Piplani @ 2026-10-16 16:46 UTC (permalink / raw)
  To: linux-kernel, linux-i3c, alexandre.belloni, krzk+dt, robh,
	conor+dt, devicetree, broonie, mfd, lee, Frank.Li, lgirdwood,
	linux-gpio, linusw, brgl
  Cc: vikash.bansal, priyanka.jain, aman.kumarpandey, Lakshay Piplani

This patchset adds a debugfs interface for hub inspection and register
access, SMBus transfer support enabling standard i2c-tools on SMBus target
ports, per-port bus rate configuration through the standard
'clock-frequency' property for ports operating in SMBus mode, and GPIO mode
support for target ports whose pins are used as general-purpose I/O.

This RFC is being posted for early feedback, particularly on the DT
representation and GPIO interface. It is not standalone and is not
intended to be applied before its base-series dependencies are available.

This series was developed on top of the complete v20 P3H2x4x I3C hub
series:

https://lore.kernel.org/linux-i3c/20260922103551.2754613-1-lakshay.piplani@nxp.com/T/#u

At the time of posting, v20 patches 1/8, 2/8, 3/8 and 6/8 have been applied
to the I3C maintainer tree. The remaining device-specific patches 4/8, 5/8,
7/8 and 8/8 are still pending.

The implementation in this series builds on the MFD core from v20 patch
4/8 and the target-port and SMBus support from v20 patches 7/8 and 8/8.
The binding extensions build on v20 patch 3/8.

The series should therefore be reviewed against the complete v20 series.
A subsequent non-RFC version will be rebased onto the upstream base once
the remaining dependencies have landed.

The dependency order within this patchset is:

- Patch 1 adds a debugfs interface exposing the hub, control port and
  target port configuration, and raw register read/write access
- Patch 2 implements .smbus_xfer for the I2C adapters created for the SMBus
  target ports, so i2cdetect, i2cget and i2cset can be used
- Patch 3 describes the standard 'clock-frequency' property for the smbus@
  target port nodes, restricted to the four rates the hardware implements
- Patch 4 programs the port rate from that property and derives the status
  poll interval from it, and depends on patch 3
- Patch 5 describes the new "gpio@N" target port node and marks the hub as
  a gpio-controller
- Patch 6 programs the target port GPIO mode register from that node and
  depends on patch 5
- Patch 7 exposes the pins of those ports as a gpio_chip and depends on
  patch 6

Lakshay Piplani (7):
  i3c: hub: p3h2x4x: Add support for debugfs
  i3c: hub: add i2c-tools support for SMBus-configured target ports
  dt-bindings: i3c: nxp,p3h2840: add clock-frequency for SMBus target
    ports
  i3c: hub: p3h2x4x: add clock-frequency DTS support
  dt-bindings: i3c: nxp,p3h2840: add GPIO mode target ports
  i3c: hub: p3h2x4x: configure target ports placed in GPIO mode
  gpio: p3h2x4x: add GPIO expander for the NXP P3H2x4x I3C hub

 .../devicetree/bindings/i3c/nxp,p3h2840.yaml  |  72 +++++
 MAINTAINERS                                   |   1 +
 drivers/gpio/Kconfig                          |  11 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-p3h2x4x.c                   | 294 ++++++++++++++++++
 drivers/i3c/hub/p3h2840_i3c_hub.h             |  48 ++-
 drivers/i3c/hub/p3h2840_i3c_hub_common.c      | 218 ++++++++++++-
 drivers/i3c/hub/p3h2840_i3c_hub_smbus.c       | 272 +++++++++++++++-
 drivers/mfd/p3h2840.c                         |   5 +
 include/linux/mfd/p3h2840.h                   |   8 +
 10 files changed, 905 insertions(+), 25 deletions(-)
 create mode 100644 drivers/gpio/gpio-p3h2x4x.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-10-19 14:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 16:46 [RFC PATCH 0/7] i3c: hub: p3h2x4x: add debugfs, i2c-tools, bus rate and GPIO mode support Lakshay Piplani
2026-10-16 16:46 ` [RFC PATCH 1/7] i3c: hub: p3h2x4x: Add support for debugfs Lakshay Piplani
2026-10-16 16:46 ` [RFC PATCH 2/7] i3c: hub: add i2c-tools support for SMBus-configured target ports Lakshay Piplani
2026-10-16 16:46 ` [RFC PATCH 3/7] dt-bindings: i3c: nxp,p3h2840: add clock-frequency for SMBus " Lakshay Piplani
2026-10-16 16:46 ` [RFC PATCH 4/7] i3c: hub: p3h2x4x: add clock-frequency DTS support Lakshay Piplani
2026-10-16 16:46 ` [RFC PATCH 5/7] dt-bindings: i3c: nxp,p3h2840: add GPIO mode target ports Lakshay Piplani
2026-10-16 16:46 ` [RFC PATCH 6/7] i3c: hub: p3h2x4x: configure target ports placed in GPIO mode Lakshay Piplani
2026-10-16 16:46 ` [RFC PATCH 7/7] gpio: p3h2x4x: add GPIO expander for the NXP P3H2x4x I3C hub Lakshay Piplani
2026-10-19  6:53   ` Uwe Kleine-König
2026-10-19 14:25   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®