[U-Boot] [PATCH v2 4/4] aspeed: Activate SPI support on the ast2500 Eval Board

Cédric Le Goater clg at kaod.org
Fri Sep 21 06:39:15 UTC 2018


Signed-off-by: Cédric Le Goater <clg at kaod.org>
Reviewed-by: Jagan Teki <jagan at openedev.com>
---

 Changes since v1:

 - moved the update of the ast2500 SoC DTS file in another patch

 arch/arm/dts/ast2500-evb.dts     | 15 +++++++++++++++
 arch/arm/dts/ast2500-u-boot.dtsi | 12 ++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/arch/arm/dts/ast2500-evb.dts b/arch/arm/dts/ast2500-evb.dts
index 723941ac0bee..4d891b55391b 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,14 @@
 	u-boot,dm-pre-reloc;
 	status = "okay";
 };
+
+&fmc {
+	status = "okay";
+	flash at 0 {
+		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>;
+};
-- 
2.17.1



More information about the U-Boot mailing list