@@ -297,7 +297,7 @@ static int cmd_i3c_info(const struct shell *sh, size_t argc, char **argv)
297
297
return 0 ;
298
298
}
299
299
300
- /* i3c speed <device> <speed> */
300
+ /* i3c speed <device> <speed> [<od_min high_ns>] [<od_min low_ns>] */
301
301
static int cmd_i3c_speed (const struct shell * sh , size_t argc , char * * argv )
302
302
{
303
303
const struct device * dev ;
@@ -321,6 +321,12 @@ static int cmd_i3c_speed(const struct shell *sh, size_t argc, char **argv)
321
321
322
322
config .scl .i3c = speed ;
323
323
324
+ if (argc == 5 ) {
325
+ /* This sets open-drain SCL high and low periods */
326
+ config .scl_od_min .high_ns = strtol (argv [ARGV_DEV + 2 ], NULL , 10 );
327
+ config .scl_od_min .low_ns = strtol (argv [ARGV_DEV + 3 ], NULL , 10 );
328
+ }
329
+
324
330
ret = i3c_configure (dev , I3C_CONFIG_CONTROLLER , & config );
325
331
if (ret != 0 ) {
326
332
shell_error (sh , "I3C: Failed to configure device" );
@@ -2390,8 +2396,8 @@ SHELL_STATIC_SUBCMD_SET_CREATE(
2390
2396
cmd_i3c_info , 2 , 1 ),
2391
2397
SHELL_CMD_ARG (speed , & dsub_i3c_device_name ,
2392
2398
"Set I3C device speed\n"
2393
- "Usage: speed <device> <speed>" ,
2394
- cmd_i3c_speed , 3 , 0 ),
2399
+ "Usage: speed <device> <speed> [<od_min high_ns>] [<od_min low_ns>] " ,
2400
+ cmd_i3c_speed , 3 , 2 ),
2395
2401
SHELL_CMD_ARG (recover , & dsub_i3c_device_name ,
2396
2402
"Recover I3C bus\n"
2397
2403
"Usage: recover <device>" ,
0 commit comments