Linux-i3c Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] i3c: mipi-i3c-hci: derive SAMA7D65 SCL timings from gclk
@ 2026-12-04  8:34 Manikandan Muralidharan
  2026-12-04  8:34 ` [PATCH 1/3] i3c: mipi-i3c-hci: move shared SCL timing register offsets to hci.h Manikandan Muralidharan
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Manikandan Muralidharan @ 2026-12-04  8:34 UTC (permalink / raw)
  To: alexandre.belloni, Frank.Li, adrian.hunter, Jm_Liao, Patrick_Yen,
	linux-kernel, linux-i3c
  Cc: manikandan.m

The Microchip SAMA7D65 I3C controller support merged in v7.2 [1] relies
on two AMD quirks: HCI_QUIRK_OD_PP_TIMING, which programs fixed OD/PP
timing values tuned for the AMD core clock, and HCI_QUIRK_RESP_BUF_THLD,
which clears the response buffer threshold once after the PIO init.

This series replaces both with Microchip specific handling:

- Patch 1 moves the OD/PP timing register offsets to hci.h so that both
  vendor quirk files can use them. No functional change.

- Patch 2 adds hci_quirks_mchp.c, which derives the push-pull,
  open-drain, SDR1..SDR4 extended low count and bus free timings from
  the gclk rate and the configured I3C/I2C SCL rates. The gclk is the
  second clock of the existing binding, taken from the clocks already
  acquired in probe, so the device tree ABI is unchanged. The timings
  are programmed in bus_init() and restored whenever the controller is
  reset.

- Patch 3 selects the response buffer threshold in __hci_pio_init(), so
  that it stays in sync with the cached QUEUE_THLD_CTRL value and is not
  reverted by IBI threshold updates or a controller reset and restore.

Tested on the SAMA7D65 Curiosity board with an LSM6DSV IMU on the I3C
bus (SETDASA, private transfers through the IIO driver). With the
125 MHz gclk, the controller runs push-pull at 12.5 MHz and open-drain
at 1 MHz, and the bus keeps working after standby and suspend-to-RAM.

[1] https://lore.kernel.org/all/20260525092405.1514213-1-manikandan.m@microchip.com/

Manikandan Muralidharan (3):
  i3c: mipi-i3c-hci: move shared SCL timing register offsets to hci.h
  i3c: mipi-i3c-hci: add Microchip quirk to derive SCL timings from gclk
  i3c: mipi-i3c-hci: add Microchip quirk to set response buffer
    threshold

 drivers/i3c/master/mipi-i3c-hci/Makefile      |   2 +-
 drivers/i3c/master/mipi-i3c-hci/core.c        |  23 +++-
 drivers/i3c/master/mipi-i3c-hci/hci.h         |   9 ++
 drivers/i3c/master/mipi-i3c-hci/hci_quirks.c  |   3 -
 .../i3c/master/mipi-i3c-hci/hci_quirks_mchp.c | 124 ++++++++++++++++++
 drivers/i3c/master/mipi-i3c-hci/pio.c         |   8 +-
 6 files changed, 159 insertions(+), 10 deletions(-)
 create mode 100644 drivers/i3c/master/mipi-i3c-hci/hci_quirks_mchp.c


base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.43.0


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

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

end of thread, other threads:[~2026-12-04 20:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  8:34 [PATCH 0/3] i3c: mipi-i3c-hci: derive SAMA7D65 SCL timings from gclk Manikandan Muralidharan
2026-12-04  8:34 ` [PATCH 1/3] i3c: mipi-i3c-hci: move shared SCL timing register offsets to hci.h Manikandan Muralidharan
2026-12-04 20:22   ` Frank Li
2026-12-04  8:34 ` [PATCH 2/3] i3c: mipi-i3c-hci: add Microchip quirk to derive SCL timings from gclk Manikandan Muralidharan
2026-12-04  8:57   ` sashiko-bot
2026-12-04 20:30     ` Frank Li
2026-12-04 20:29   ` Frank Li
2026-12-04  8:34 ` [PATCH 3/3] i3c: mipi-i3c-hci: add Microchip quirk to set response buffer threshold Manikandan Muralidharan
2026-12-04  8:48   ` sashiko-bot
2026-12-04 20:34   ` Frank Li

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