i3c: mipi-i3c-hci: derive SAMA7D65 SCL timings from gclk
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | i3c: mipi-i3c-hci: move shared SCL timing register offsets to hci.hdrivers/ drivers/ | +4 | 1 reply | |
| 2/3 | i3c: mipi-i3c-hci: add Microchip quirk to derive SCL timings from gclkdrivers/ drivers/ drivers/ +1 more | +147 | 2 replies | |
| 3/3 | i3c: mipi-i3c-hci: add Microchip quirk to set response buffer thresholddrivers/ drivers/ drivers/ | +8 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Frank Li |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] i3c: mipi-i3c-hci: derive SAMA7D65 SCL timings from gclk
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/[email protected]/
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
Signature · 1 line
2.43.0