Linux-i3c Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i3c: master: dw-i3c-master: Add HDR-DDR support to Designware Controller.
@ 2026-10-13  7:31 Dineshkumar Parameswaran
  2026-10-13  7:42 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Dineshkumar Parameswaran @ 2026-10-13  7:31 UTC (permalink / raw)
  To: linux-i3c
  Cc: alexandre.belloni, Frank.Li, linux-kernel,
	Dineshkumar Parameswaran

Implement HDR-DDR transfer support for the DesignWare Controller.
Only support for private transfers and does not support sending CCC
commands in HDR mode.

Key differences:
- Sends ENTHDR CCC for entering to HDR-DDR mode before sending data.
To do that we are setting the ENTHDR in controller cmd. Sets the speed
to HDR_DDR_SPEED(6) to do data transfer in HDR-DDR mode.
- HDR exit pattern must be sent instead of send a stop after transfer
completion.

Signed-off-by: Dineshkumar Parameswaran <parame@synopsys.com>
---
 drivers/i3c/master/dw-i3c-master.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c
index 05584ddaf104..58c54746bbe5 100644
--- a/drivers/i3c/master/dw-i3c-master.c
+++ b/drivers/i3c/master/dw-i3c-master.c
@@ -232,6 +232,8 @@
 #define I3C_BUS_I2C_FMP_TLOW_MIN_NS	500
 #define I3C_BUS_THIGH_MAX_NS		41
 
+#define DW_I3C_HDR_DDR_SPEED	6
+
 #define XFER_TIMEOUT (msecs_to_jiffies(1000))
 #define RPM_AUTOSUSPEND_TIMEOUT 1000 /* ms */
 
@@ -1017,6 +1019,11 @@ static int dw_i3c_master_i3c_xfers(struct i3c_dev_desc *dev,
 			       COMMAND_PORT_DEV_INDEX(data->index) |
 			       COMMAND_PORT_ROC;
 
+		if (mode == I3C_HDR_DDR)
+			cmd->cmd_lo |= COMMAND_PORT_CP |
+				COMMAND_PORT_CMD(I3C_CCC_ENTHDR(0)) |
+				COMMAND_PORT_SPEED(DW_I3C_HDR_DDR_SPEED);
+
 		if (i == (i3c_nxfers - 1))
 			cmd->cmd_lo |= COMMAND_PORT_TOC;
 	}
-- 
2.34.1


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

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

end of thread, other threads:[~2026-10-13  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13  7:31 [PATCH] i3c: master: dw-i3c-master: Add HDR-DDR support to Designware Controller Dineshkumar Parameswaran
2026-10-13  7:42 ` sashiko-bot

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