diff options
author | Shelley Chen <shchen@google.com> | 2022-05-11 18:29:19 -0700 |
---|---|---|
committer | Shelley Chen <shchen@google.com> | 2022-05-31 22:19:02 +0000 |
commit | 363202b43589ec240c4a0c8f5b449fbd5c1333f8 (patch) | |
tree | 100b1fce60d7bc89ef6d0240c4fc45144ae12af5 /src/soc/qualcomm/common/include | |
parent | 84d54d40b8b54ec036c2e597c404aaeb98746e63 (diff) |
soc/qualcomm: Increase SPI frequency to 75 MHz
Increase frequency of sc7280 to 75 MHz. Setting the delay to 1/8 of
a cycle as a result of experimentation.
BUG=b:190231148
BRANCH=None
TEST=Make sure that herobrine board boots
HW Engineer measured SPI frequency and verified running at 75 MHz
Signed-off-by: Shelley Chen <shchen@google.com>
Change-Id: I3cf5a7c85f12800a11ece397a354349f2a0a235f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64673
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm/common/include')
-rw-r--r-- | src/soc/qualcomm/common/include/soc/qspi_common.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/soc/qualcomm/common/include/soc/qspi_common.h b/src/soc/qualcomm/common/include/soc/qspi_common.h index a0f612c04f..6a1496aed1 100644 --- a/src/soc/qualcomm/common/include/soc/qspi_common.h +++ b/src/soc/qualcomm/common/include/soc/qspi_common.h @@ -26,6 +26,7 @@ struct qcom_qspi_regs { u32 current_mem_addr; u32 hw_version; u32 rd_fifo[16]; + u32 sampling_clk_cfg; }; check_member(qcom_qspi_regs, rd_fifo, 0x50); @@ -97,7 +98,16 @@ static struct qcom_qspi_regs * const qcom_qspi = (void *) QSPI_BASE; #define QSPI_MAX_PACKET_COUNT 0xFFC0 -void quadspi_init(uint32_t hz); +/* + * quadspi_init(): Configure SPI + * + * @param hz: SPI frequency in Hz + * @param sdelay: sampling delay in sdelay/8 cycle units example, if sdelay=1, + * then will delay sampling clock by 1/8 cycle. Note that + * setting sdelay to 4-7 would result in a negative sampling + * delay compared to 0. + */ +void quadspi_init(uint32_t hz, uint32_t sdelay); int qspi_claim_bus(const struct spi_slave *slave); int qspi_setup_bus(const struct spi_slave *slave); void qspi_release_bus(const struct spi_slave *slave); |