@@ -477,7 +477,7 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
477
477
struct i3c_device_info info = {};
478
478
unsigned long fclk_rate , fclk_period_ns ;
479
479
unsigned int high_period_ns , od_low_period_ns ;
480
- u32 ppbaud , pplow , odhpp , odbaud , i2cbaud , reg ;
480
+ u32 ppbaud , pplow , odhpp , odbaud , odstop , i2cbaud , reg ;
481
481
int ret ;
482
482
483
483
/* Timings derivation */
@@ -507,6 +507,7 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
507
507
switch (bus -> mode ) {
508
508
case I3C_BUS_MODE_PURE :
509
509
i2cbaud = 0 ;
510
+ odstop = 0 ;
510
511
break ;
511
512
case I3C_BUS_MODE_MIXED_FAST :
512
513
case I3C_BUS_MODE_MIXED_LIMITED :
@@ -515,13 +516,15 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
515
516
* between the high and low period does not really matter.
516
517
*/
517
518
i2cbaud = DIV_ROUND_UP (1000 , od_low_period_ns ) - 2 ;
519
+ odstop = 1 ;
518
520
break ;
519
521
case I3C_BUS_MODE_MIXED_SLOW :
520
522
/*
521
523
* Using I2C Fm mode, target is 0.4MHz/2500ns, with the same
522
524
* constraints as the FM+ mode.
523
525
*/
524
526
i2cbaud = DIV_ROUND_UP (2500 , od_low_period_ns ) - 2 ;
527
+ odstop = 1 ;
525
528
break ;
526
529
default :
527
530
return - EINVAL ;
@@ -530,7 +533,7 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
530
533
reg = SVC_I3C_MCONFIG_MASTER_EN |
531
534
SVC_I3C_MCONFIG_DISTO (0 ) |
532
535
SVC_I3C_MCONFIG_HKEEP (0 ) |
533
- SVC_I3C_MCONFIG_ODSTOP (0 ) |
536
+ SVC_I3C_MCONFIG_ODSTOP (odstop ) |
534
537
SVC_I3C_MCONFIG_PPBAUD (ppbaud ) |
535
538
SVC_I3C_MCONFIG_PPLOW (pplow ) |
536
539
SVC_I3C_MCONFIG_ODBAUD (odbaud ) |
0 commit comments