diff options
author | Shelley Chen <shchen@google.com> | 2023-02-23 22:40:42 +0000 |
---|---|---|
committer | Shelley Chen <shchen@google.com> | 2023-02-24 19:28:24 +0000 |
commit | 1720ba5e6bb70f76542420cd1d5633ea142db12a (patch) | |
tree | 07524cd9b921e8b4350bcdd690300fdf2117e9c5 /src/soc/qualcomm/common/qspi.c | |
parent | a0473c3be68d689e728542b3036d4e751439c36c (diff) |
Revert "soc/qualcomm: Increase SPI frequency to 75 MHz"
This reverts commit 363202b43589ec240c4a0c8f5b449fbd5c1333f8.
Reason for revert: Seeing some bit flips on the SPI bus, but cannot
repro reliably on local builds. Going to downgrade back to 50 MHz
to see if builder builds are more stable on each variant as a result.
Signed-off-by: Shelley Chen <shchen@google.com>
Change-Id: I4fe76bac915e3b3c794821cd160a66824e38ea83
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73214
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm/common/qspi.c')
-rw-r--r-- | src/soc/qualcomm/common/qspi.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/soc/qualcomm/common/qspi.c b/src/soc/qualcomm/common/qspi.c index eb0c062a81..3340c00dd6 100644 --- a/src/soc/qualcomm/common/qspi.c +++ b/src/soc/qualcomm/common/qspi.c @@ -221,26 +221,11 @@ static void queue_data(uint8_t *data, uint32_t data_bytes, queue_bounce_data(epilog_ptr, epilog_bytes, data_mode, write); } -/* - * The way to encode the sampling delay is: - * - * QSPI_SAMPLE_CLK_CONFIG delay (cycle) - * ---------------------------------------- - * 0xFFFh = 1111 1111 1111b 7/8 - * 0xDB6h = 1101 1011 0110b 6/8 - * 0xB6Dh = 1011 0110 1101b 5/8 - * 0x924h = 1001 0010 0100b 4/8 - * 0x6DBh = 0110 1101 1011b 3/8 - * 0x492h = 0100 1001 0010b 2/8 - * 0x249h = 0010 0100 1001b 1/8 - * 0x000h = 0000 0000 0000b None - */ -static void reg_init(uint32_t sdelay) +static void reg_init(void) { uint32_t spi_mode; uint32_t tx_data_oe_delay, tx_data_delay; uint32_t mstr_config; - uint32_t sampling_delay; spi_mode = 0; @@ -251,6 +236,7 @@ static void reg_init(uint32_t sdelay) (tx_data_delay << TX_DATA_DELAY_SHIFT) | (SBL_EN) | (spi_mode << SPI_MODE_SHIFT) | (PIN_HOLDN) | + (FB_CLK_EN) | (DMA_ENABLE) | (FULL_CYCLE_MODE); @@ -260,16 +246,14 @@ static void reg_init(uint32_t sdelay) write32(&qcom_qspi->mstr_int_sts, 0xFFFFFFFF); write32(&qcom_qspi->rd_fifo_cfg, 0x0); write32(&qcom_qspi->rd_fifo_rst, RESET_FIFO); - sampling_delay = sdelay << 9 | sdelay << 6 | sdelay << 3 | sdelay << 0; - write32(&qcom_qspi->sampling_clk_cfg, sampling_delay); } -void quadspi_init(uint32_t hz, uint32_t sdelay) +void quadspi_init(uint32_t hz) { assert(dcache_line_bytes() == CACHE_LINE_SIZE); clock_configure_qspi(hz * 4); configure_gpios(); - reg_init(sdelay); + reg_init(); } int qspi_claim_bus(const struct spi_slave *slave) |