[PATCH 4/4] configs: roc-pc-rk3399:Set the maximum slave SPI speed to 30MHz

Manoj Sai abbaraju.manojsai at amarulasolutions.com
Fri Sep 2 10:24:44 CEST 2022


-While the SPI controller speed is defined by DTS, the maximum
slave speed (connected devices) is limited by the pre-defined
configuration value CONFIG_SF_DEFAULT_SPEED from 10 MHz to 30Mhz.

-set the Value of SPI flash max frequency for environment to 30Mhz.

This patch increases this maximum SPI slave device speed and
SPI flash max frequency for environment  to 30MHz .

difference in time of erase and update a region of SPI flash from memory
with 10Mhz and 30Mhz frequencey range updation  :

=> sf update 0x300000 0x800000 0x400000

with 10 Mhz frequency updation :-
4194304 bytes written, 0 bytes skipped in 36.819s, speed 119837 B/s

with 30Mhz frequency updation  :-
4194304 bytes written, 0 bytes skipped in 20.319s, speed 220752 B/s

Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
Signed-off-by: Da Xue <da.xue at libretech.co>
Signed-off-by: dsx724 <da at lessconfused.com>
---
 configs/roc-pc-rk3399_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig
index 84e72e8b60..7754cb8388 100644
--- a/configs/roc-pc-rk3399_defconfig
+++ b/configs/roc-pc-rk3399_defconfig
@@ -45,6 +45,7 @@ CONFIG_CMD_TIME=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_ENV_SPI_MAX_HZ=30000000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ROCKCHIP_GPIO=y
@@ -55,6 +56,7 @@ CONFIG_MMC_DW_ROCKCHIP=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ROCKCHIP=y
 CONFIG_SF_DEFAULT_BUS=1
+CONFIG_SF_DEFAULT_SPEED=30000000
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_GMAC_ROCKCHIP=y
-- 
2.25.1



More information about the U-Boot mailing list