[U-Boot,v8,12/12] mips: bmips: enable the SPI flash on the Netgear CG3100D

Message ID 20180111171133.22779-13-noltari@gmail.com
State Superseded, archived
Delegated to: Daniel Schwierzeck
Headers show
Series
  • mips: bmips: add SPI support
Related show

Commit Message

Álvaro Fernández Rojas Jan. 11, 2018, 5:11 p.m.
It's a Spansion (s25fl064a) 8 MB SPI flash.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
---
 v8: no changes
 v7: no changes
 v6: no changes
 v5: sync with master
 v4: switch to CONFIG_BCM63XX_SPI
 v3: no changes
 v2: remove spi alias

 arch/mips/dts/netgear,cg3100d.dts     | 12 ++++++++++++
 configs/netgear_cg3100d_ram_defconfig |  8 ++++++++
 2 files changed, 20 insertions(+)

Comments

Simon Glass Jan. 16, 2018, 2:57 p.m. | #1
On 11 January 2018 at 09:11, Álvaro Fernández Rojas <noltari@gmail.com> wrote:
> It's a Spansion (s25fl064a) 8 MB SPI flash.
>
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> Reviewed-by: Jagan Teki <jagan@openedev.com>
> ---
>  v8: no changes
>  v7: no changes
>  v6: no changes
>  v5: sync with master
>  v4: switch to CONFIG_BCM63XX_SPI
>  v3: no changes
>  v2: remove spi alias
>
>  arch/mips/dts/netgear,cg3100d.dts     | 12 ++++++++++++
>  configs/netgear_cg3100d_ram_defconfig |  8 ++++++++
>  2 files changed, 20 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Patch

diff --git a/arch/mips/dts/netgear,cg3100d.dts b/arch/mips/dts/netgear,cg3100d.dts
index db1e2e7616..5f85c7346f 100644
--- a/arch/mips/dts/netgear,cg3100d.dts
+++ b/arch/mips/dts/netgear,cg3100d.dts
@@ -90,6 +90,18 @@ 
 	status = "okay";
 };
 
+&spi {
+	status = "okay";
+
+	spi-flash@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 7665c78d3f..369c919ac7 100644
--- a/configs/netgear_cg3100d_ram_defconfig
+++ b/configs/netgear_cg3100d_ram_defconfig
@@ -41,3 +41,11 @@  CONFIG_RESET_BCM6345=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_WDT_BCM6345=y
+CONFIG_BCM63XX_SPI=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_SPI_FLASH_SPANSION=y