[U-Boot] [PATCH v2 09/10] mips: bmips: enable the SPI flash on the Sagem F at ST1704

Álvaro Fernández Rojas noltari at gmail.com
Mon May 22 18:21:36 UTC 2017


It's a Winbond (w25x32) 4 MB SPI flash.

Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 v2: remove spi alias

 arch/mips/dts/sagem,f at st1704.dts     | 12 ++++++++++++
 configs/sagem_f at st1704_ram_defconfig |  8 ++++++++
 2 files changed, 20 insertions(+)

diff --git a/arch/mips/dts/sagem,f at st1704.dts b/arch/mips/dts/sagem,f at st1704.dts
index be15fe5..dd0e5b8 100644
--- a/arch/mips/dts/sagem,f at st1704.dts
+++ b/arch/mips/dts/sagem,f at st1704.dts
@@ -44,6 +44,18 @@
 	status = "okay";
 };
 
+&spi {
+	status = "okay";
+
+	spi-flash at 0 {
+		compatible = "spi-flash";
+		reg = <0>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		spi-max-frequency = <20000000>;
+	};
+};
+
 &uart0 {
 	u-boot,dm-pre-reloc;
 	status = "okay";
diff --git a/configs/sagem_f at st1704_ram_defconfig b/configs/sagem_f at st1704_ram_defconfig
index 8e89c15..d20f95c 100644
--- a/configs/sagem_f at st1704_ram_defconfig
+++ b/configs/sagem_f at st1704_ram_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_BMIPS=y
 CONFIG_BAUDRATE=115200
+CONFIG_BCM6338_SPI=y
 CONFIG_BCM6345_CLK=y
 CONFIG_BCM6345_GPIO=y
 CONFIG_BCM6345_SERIAL=y
@@ -27,6 +28,8 @@ CONFIG_CMD_MEMINFO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_SAVEENV is not set
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
 # CONFIG_CMD_XIMG is not set
 CONFIG_DEFAULT_DEVICE_TREE="sagem,f at st1704"
 CONFIG_DISPLAY_CPUINFO=y
@@ -34,6 +37,8 @@ CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_RESET=y
 CONFIG_DM_SERIAL=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_HUSH_PARSER=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
@@ -45,6 +50,9 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_RESET=y
 CONFIG_RESET_BCM6345=y
 CONFIG_SOC_BMIPS_BCM6338=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPL_SERIAL_PRESENT is not set
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SYS_NO_FLASH=y
-- 
2.1.4



More information about the U-Boot mailing list