[U-Boot] [PATCH 10/10] mips: bmips: enable the SPI flash on the Netgear CG3100D
Álvaro Fernández Rojas
noltari at gmail.com
Thu May 18 19:29:48 UTC 2017
It's a Spansion (s25fl064a) 8 MB SPI flash.
Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
arch/mips/dts/netgear,cg3100d.dts | 13 +++++++++++++
configs/netgear_cg3100d_ram_defconfig | 8 ++++++++
2 files changed, 21 insertions(+)
diff --git a/arch/mips/dts/netgear,cg3100d.dts b/arch/mips/dts/netgear,cg3100d.dts
index db1e2e7..8112c3d 100644
--- a/arch/mips/dts/netgear,cg3100d.dts
+++ b/arch/mips/dts/netgear,cg3100d.dts
@@ -14,6 +14,7 @@
aliases {
serial0 = &uart0;
+ spi0 = &spi;
};
chosen {
@@ -90,6 +91,18 @@
status = "okay";
};
+&spi {
+ status = "okay";
+
+ spi-flash at 0 {
+ compatible = "spi-flash";
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ spi-max-frequency = <25000000>;
+ };
+};
+
&uart0 {
u-boot,dm-pre-reloc;
status = "okay";
diff --git a/configs/netgear_cg3100d_ram_defconfig b/configs/netgear_cg3100d_ram_defconfig
index a6eff10..da2426b 100644
--- a/configs/netgear_cg3100d_ram_defconfig
+++ b/configs/netgear_cg3100d_ram_defconfig
@@ -3,6 +3,7 @@ CONFIG_BAUDRATE=115200
CONFIG_BCM6345_CLK=y
CONFIG_BCM6345_GPIO=y
CONFIG_BCM6345_SERIAL=y
+CONFIG_BCM6358_SPI=y
CONFIG_BMIPS_BOOT_RAM=y
CONFIG_BOARD_NETGEAR_CG3100D=y
# CONFIG_CMD_BOOTD is not set
@@ -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="netgear,cg3100d"
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_BCM6328=y
@@ -47,6 +52,9 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
CONFIG_RESET=y
CONFIG_RESET_BCM6345=y
CONFIG_SOC_BMIPS_BCM3380=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_SPI_FLASH_SPANSION=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