]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
fsl_dspi: set scaler values for CS-SCK and SCK-CS delays
authorTomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Wed, 20 Aug 2025 08:17:19 +0000 (10:17 +0200)
committerPeng Fan <peng.fan@nxp.com>
Wed, 27 Aug 2025 07:53:25 +0000 (15:53 +0800)
These values were calculated but not set.
They are required for the calculation of the delays, as stated in the
"QorIQ LS1043A Reference Manual, Rev. 6, 07/2020" page 2172.

The delays are calculated as (1/freq)*PCSSCK*CSSCK and
(1/freq)*PASC*ASC.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/spi/fsl_dspi.c

index 545561ad116999ac2adad74c30111e849d130885..412993ad37780ff809c4196bbc9c82d5bf6d11b5 100644 (file)
@@ -473,7 +473,9 @@ static int fsl_dspi_child_pre_probe(struct udevice *dev)
 
        priv->ctar_val[slave_plat->cs[0]] = DSPI_CTAR_DEFAULT_VALUE |
                                         DSPI_CTAR_PCSSCK(pcssck) |
-                                        DSPI_CTAR_PASC(pasc);
+                                        DSPI_CTAR_CSSCK(cssck) |
+                                        DSPI_CTAR_PASC(pasc) |
+                                        DSPI_CTAR_ASC(asc);
 
        debug("DSPI pre_probe slave device on CS %u, max_hz %u, mode 0x%x.\n",
              slave_plat->cs[0], slave_plat->max_hz, slave_plat->mode);