[PATCH 02/12] i3c: mipi-i3c-hci: Fix Hot-Join NACK
Frank Li
Frank.li at nxp.com
Fri Feb 27 08:03:26 PST 2026
On Fri, Feb 27, 2026 at 04:11:39PM +0200, Adrian Hunter wrote:
> The MIPI I3C HCI host controller driver does not implement Hot-Join
> handling, yet Hot-Join response control defaults to allowing devices to
> Hot‑Join the bus. Configure HC_CONTROL_HOT_JOIN_CTRL to NACK all Hot‑Join
> attempts.
>
> Fixes: 9ad9a52cce282 ("i3c/master: introduce the mipi-i3c-hci driver")
> Cc: stable at vger.kernel.org
> Signed-off-by: Adrian Hunter <adrian.hunter at intel.com>
> ---
> drivers/i3c/master/mipi-i3c-hci/core.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
> index dbe93df0c70e..4877a321edf9 100644
> --- a/drivers/i3c/master/mipi-i3c-hci/core.c
> +++ b/drivers/i3c/master/mipi-i3c-hci/core.c
> @@ -152,7 +152,8 @@ static int i3c_hci_bus_init(struct i3c_master_controller *m)
> if (hci->quirks & HCI_QUIRK_RESP_BUF_THLD)
> amd_set_resp_buf_thld(hci);
>
> - reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE);
> + /* Enable bus with Hot-Join disabled */
> + reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE | HC_CONTROL_HOT_JOIN_CTRL);
Can you check varible master->hotjoin? so needn't change it when anable HJ
in future?
Frank
> dev_dbg(&hci->master.dev, "HC_CONTROL = %#x", reg_read(HC_CONTROL));
>
> return 0;
> @@ -764,7 +765,8 @@ static int i3c_hci_runtime_resume(struct device *dev)
>
> hci->io->resume(hci);
>
> - reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE);
> + /* Enable bus with Hot-Join disabled */
> + reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE | HC_CONTROL_HOT_JOIN_CTRL);
>
> return 0;
> }
> --
> 2.51.0
>
>
> --
> linux-i3c mailing list
> linux-i3c at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-i3c
More information about the linux-i3c
mailing list