From: Jon Nettleton <j...@solid-run.com>

The production variant of the SPI flash used by the clearfog
devices are based on winbond chips.  Additionally enable
SPI_FLASH_BAR since some variants will have 16MB of flash
that requires this to be enabled.

Remove the default speed and mode; these values are taken from the
device tree when CONFIG_DM_SPI_FLASH is enabled.

Add default bus, so that 'sf' detects the SPI flash by default.

Signed-off-by: Jon Nettleton <j...@solid-run.com>
[baruch: remove speed/mode; add bus]
Signed-off-by: Baruch Siach <bar...@tkos.co.il>
---
 configs/clearfog_defconfig | 2 ++
 include/configs/clearfog.h | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 3de204346d88..726c444f6042 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -46,3 +46,5 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_MVEBU=y
 CONFIG_USB_STORAGE=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_MTD=y
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 5061f6c6fd16..f6b442b9461f 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -33,9 +33,8 @@
 #define CONFIG_SYS_I2C_SPEED           100000
 
 /* SPI NOR flash default params, used by sf commands */
-#define CONFIG_SF_DEFAULT_SPEED                1000000
-#define CONFIG_SF_DEFAULT_MODE         SPI_MODE_3
-#define CONFIG_SPI_FLASH_STMICRO
+#define CONFIG_SF_DEFAULT_BUS          1
+#define CONFIG_SPI_FLASH_WINBOND
 
 /*
  * SDIO/MMC Card Configuration
-- 
2.14.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to