]> Git Repo - J-u-boot.git/commitdiff
spi: octeon_spi: Use a fixed 100MHz input clock on Octeon TX2
authorStefan Roese <[email protected]>
Wed, 5 Aug 2020 13:07:30 +0000 (15:07 +0200)
committerStefan Roese <[email protected]>
Fri, 16 Oct 2020 11:55:04 +0000 (13:55 +0200)
Octeon TX2 sets the TB100_EN bit in the config register. We need to use
a fixed 100MHz clock for this as well to work properly.

Signed-off-by: Stefan Roese <[email protected]>
Cc: Aaron Williams <[email protected]>
Cc: Suneel Garapati <[email protected]>
Cc: Chandrakala Chavva <[email protected]>
Cc: Jagan Teki <[email protected]>
drivers/spi/octeon_spi.c

index 83fe6330a128fc26b09c0e3b5a8439cad43a3238..7e88e5580f79340cf1f50dbec2bbd30ce2fe5473 100644 (file)
@@ -519,7 +519,10 @@ static int octeon_spi_set_speed(struct udevice *bus, uint max_hz)
        if (max_hz > OCTEON_SPI_MAX_CLOCK_HZ)
                max_hz = OCTEON_SPI_MAX_CLOCK_HZ;
 
-       clk_rate = clk_get_rate(&priv->clk);
+       if (device_is_compatible(bus, "cavium,thunderx-spi"))
+               clk_rate = 100000000;
+       else
+               clk_rate = clk_get_rate(&priv->clk);
        if (IS_ERR_VALUE(clk_rate))
                return -EINVAL;
 
This page took 0.035077 seconds and 4 git commands to generate.