From: Manikandan Muralidharan <manikandan.m@microchip.com>
To: <alexandre.belloni@bootlin.com>, <Frank.Li@nxp.com>,
<adrian.hunter@intel.com>, <Jm_Liao@asmedia.com.tw>,
<Patrick_Yen@asmedia.com.tw>, <linux-kernel@vger.kernel.org>,
<linux-i3c@lists.infradead.org>
Cc: <manikandan.m@microchip.com>
Subject: [PATCH 0/3] i3c: mipi-i3c-hci: derive SAMA7D65 SCL timings from gclk
Date: Fri, 4 Dec 2026 14:04:46 +0530 [thread overview]
Message-ID: <20261204083449.933526-1-manikandan.m@microchip.com> (raw)
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
next reply other threads:[~2026-12-04 8:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 8:34 Manikandan Muralidharan [this message]
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 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 20:34 ` Frank Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204083449.933526-1-manikandan.m@microchip.com \
--to=manikandan.m@microchip.com \
--cc=Frank.Li@nxp.com \
--cc=Jm_Liao@asmedia.com.tw \
--cc=Patrick_Yen@asmedia.com.tw \
--cc=adrian.hunter@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®