All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] aspeed: Add SPI support to the ast2500 Eval Board
Date: Mon, 10 Sep 2018 16:16:55 +0200	[thread overview]
Message-ID: <20180910141655.20944-4-clg@kaod.org> (raw)
In-Reply-To: <20180910141655.20944-1-clg@kaod.org>

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 arch/arm/dts/ast2500-evb.dts     | 17 ++++++++
 arch/arm/dts/ast2500-u-boot.dtsi | 12 ++++++
 arch/arm/dts/ast2500.dtsi        | 71 ++++++++++++++++++++++++++++++++
 configs/evb-ast2500_defconfig    | 10 +++++
 4 files changed, 110 insertions(+)

diff --git a/arch/arm/dts/ast2500-evb.dts b/arch/arm/dts/ast2500-evb.dts
index 723941ac0bee..609678ff7989 100644
--- a/arch/arm/dts/ast2500-evb.dts
+++ b/arch/arm/dts/ast2500-evb.dts
@@ -11,6 +11,10 @@
 	chosen {
 		stdout-path = &uart5;
 	};
+
+	aliases {
+		spi0 = &fmc;
+	};
 };
 
 &uart5 {
@@ -36,3 +40,16 @@
 	u-boot,dm-pre-reloc;
 	status = "okay";
 };
+
+&fmc {
+	status = "okay";
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-flash", "sst,w25q256";
+		status = "okay";
+		spi-max-frequency = <50000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+	};
+};
diff --git a/arch/arm/dts/ast2500-u-boot.dtsi b/arch/arm/dts/ast2500-u-boot.dtsi
index 7f80bad7d050..6cfdf3ba5413 100644
--- a/arch/arm/dts/ast2500-u-boot.dtsi
+++ b/arch/arm/dts/ast2500-u-boot.dtsi
@@ -70,3 +70,15 @@
 &mac1 {
 	clocks = <&scu PCLK_MAC2>, <&scu PLL_D2PLL>;
 };
+
+&fmc {
+	clocks = <&scu BCLK_HCLK>;
+};
+
+&spi1 {
+	clocks = <&scu BCLK_HCLK>;
+};
+
+&spi2 {
+	clocks = <&scu BCLK_HCLK>;
+};
diff --git a/arch/arm/dts/ast2500.dtsi b/arch/arm/dts/ast2500.dtsi
index 7e0ad3a41ac5..de7607aaafff 100644
--- a/arch/arm/dts/ast2500.dtsi
+++ b/arch/arm/dts/ast2500.dtsi
@@ -28,6 +28,77 @@
 		#size-cells = <1>;
 		ranges;
 
+		fmc: flash-controller at 1e620000 {
+			reg = < 0x1e620000 0xc4
+				0x20000000 0x10000000 >;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "aspeed,ast2500-fmc";
+			status = "disabled";
+			interrupts = <19>;
+			spi-max-frequency = <100000000>;
+			flash at 0 {
+				reg = < 0 >;
+				compatible = "jedec,spi-nor";
+				spi-max-frequency = <50000000>;
+				status = "disabled";
+			};
+			flash at 1 {
+				reg = < 1 >;
+				compatible = "jedec,spi-nor";
+				spi-max-frequency = <50000000>;
+				status = "disabled";
+			};
+			flash at 2 {
+				reg = < 2 >;
+				compatible = "jedec,spi-nor";
+				spi-max-frequency = <50000000>;
+				status = "disabled";
+			};
+		};
+
+		spi1: flash-controller at 1e630000 {
+			reg = < 0x1e630000 0xc4
+				0x30000000 0x08000000 >;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "aspeed,ast2500-spi";
+			status = "disabled";
+			flash at 0 {
+				reg = < 0 >;
+				compatible = "jedec,spi-nor";
+				spi-max-frequency = <50000000>;
+				status = "disabled";
+			};
+			flash at 1 {
+				reg = < 1 >;
+				compatible = "jedec,spi-nor";
+				spi-max-frequency = <50000000>;
+				status = "disabled";
+			};
+		};
+
+		spi2: flash-controller at 1e631000 {
+			reg = < 0x1e631000 0xc4
+				0x38000000 0x08000000 >;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "aspeed,ast2500-spi";
+			status = "disabled";
+			flash at 0 {
+				reg = < 0 >;
+				compatible = "jedec,spi-nor";
+				spi-max-frequency = <50000000>;
+				status = "disabled";
+			};
+			flash at 1 {
+				reg = < 1 >;
+				compatible = "jedec,spi-nor";
+				spi-max-frequency = <50000000>;
+				status = "disabled";
+			};
+		};
+
 		vic: interrupt-controller at 1e6c0080 {
 			compatible = "aspeed,ast2400-vic";
 			interrupt-controller;
diff --git a/configs/evb-ast2500_defconfig b/configs/evb-ast2500_defconfig
index 88230f4a12db..a418ff0e9e01 100644
--- a/configs/evb-ast2500_defconfig
+++ b/configs/evb-ast2500_defconfig
@@ -25,3 +25,13 @@ CONFIG_SYS_NS16550=y
 CONFIG_SYSRESET=y
 CONFIG_TIMER=y
 CONFIG_WDT=y
+CONFIG_SPI=y
+CONFIG_ASPEED_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_CMD_SF=y
-- 
2.17.1

  parent reply	other threads:[~2018-09-10 14:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 14:16 [U-Boot] [PATCH 0/3] Support for the Aspeed ast2500 FMC/SPI controllers Cédric Le Goater
2018-09-10 14:16 ` [U-Boot] [PATCH 1/3] aspeed: ast2500: Add AHB clock Cédric Le Goater
2018-09-11  7:35   ` Joel Stanley
2018-09-11 16:42     ` Maxim Sloyko
2018-09-11 17:43       ` Cédric Le Goater
2018-09-11 22:39         ` Joel Stanley
2018-09-27 13:41   ` Simon Glass
2018-09-10 14:16 ` [U-Boot] [PATCH 2/3] spi: Add support for the Aspeed ast2500 SPI controllers Cédric Le Goater
2018-09-11 22:38   ` Joel Stanley
2018-09-12  6:03     ` Cédric Le Goater
2018-09-27 13:41   ` Simon Glass
2018-09-28 11:42     ` Cédric Le Goater
2018-10-02 11:22       ` Simon Glass
2018-10-08  6:29         ` Cédric Le Goater
2018-10-04 15:57       ` Jagan Teki
2018-10-08  6:02         ` Cédric Le Goater
2018-10-10  6:16           ` Jagan Teki
2018-10-10  7:32             ` Boris Brezillon
2018-10-10 12:02               ` Cédric Le Goater
2019-01-25 17:28                 ` Cédric Le Goater
2019-01-25 18:00                   ` Boris Brezillon
2019-01-26 10:42                     ` Vignesh R
2018-09-10 14:16 ` Cédric Le Goater [this message]
2018-09-12  9:28   ` [U-Boot] [PATCH 3/3] aspeed: Add SPI support to the ast2500 Eval Board Joel Stanley
2018-09-20 14:53   ` Jagan Teki
2018-09-20 15:56     ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180910141655.20944-4-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.