[source] brcm63xx: probe SPI flash through DT

LEDE Commits lede-commits at lists.infradead.org
Sun Jun 4 02:35:42 PDT 2017


jogo pushed a commit to source.git, branch master:
https://git.lede-project.org/474cde61234c1191e1caeff01a41c324eda4d28d

commit 474cde61234c1191e1caeff01a41c324eda4d28d
Author: Jonas Gorski <jonas.gorski at gmail.com>
AuthorDate: Tue Feb 7 14:24:31 2017 +0100

    brcm63xx: probe SPI flash through DT
    
    Now that we support problem the SPI controllers through DT, we can also
    probe flash through DT.
    
    Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
---
 target/linux/brcm63xx/dts/a4001n.dts           | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/a4001n1.dts          | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/ar-5381u.dts         | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/ar-5387un.dts        | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/bcm96318ref.dts      | 17 +++++++++++
 target/linux/brcm63xx/dts/bcm96318ref_p300.dts | 17 +++++++++++
 target/linux/brcm63xx/dts/bcm963268bu_p300.dts | 17 +++++++++++
 target/linux/brcm63xx/dts/bcm963269bhr.dts     | 17 +++++++++++
 target/linux/brcm63xx/dts/bcm963281TAN.dts     | 17 +++++++++++
 target/linux/brcm63xx/dts/bcm96328avng.dts     | 17 +++++++++++
 target/linux/brcm63xx/dts/dsl-274xb-f.dts      | 39 ++++++++++++++++++++++++++
 target/linux/brcm63xx/dts/dsl-275xb-d.dts      | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/fast2504n.dts        | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/fast2704n.dts        | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/fast2704v2.dts       | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/nb6-ser-r0.dts       | 33 ++++++++++++++++++++++
 target/linux/brcm63xx/dts/r5010unv2.dts        | 32 +++++++++++++++++++++
 target/linux/brcm63xx/dts/vg50.dts             | 17 +++++++++++
 18 files changed, 487 insertions(+)

diff --git a/target/linux/brcm63xx/dts/a4001n.dts b/target/linux/brcm63xx/dts/a4001n.dts
index c71e285..70eb8ce 100644
--- a/target/linux/brcm63xx/dts/a4001n.dts
+++ b/target/linux/brcm63xx/dts/a4001n.dts
@@ -57,3 +57,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0x7e0000>;
+			label = "linux";
+		};
+
+		nvram at 7f0000 {
+			reg = <0x7f0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/a4001n1.dts b/target/linux/brcm63xx/dts/a4001n1.dts
index 2806bb4..8e20686 100644
--- a/target/linux/brcm63xx/dts/a4001n1.dts
+++ b/target/linux/brcm63xx/dts/a4001n1.dts
@@ -85,3 +85,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0xfe0000>;
+			label = "linux";
+		};
+
+		nvram at ff0000 {
+			reg = <0xff0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/ar-5381u.dts b/target/linux/brcm63xx/dts/ar-5381u.dts
index ecdf618..1912fca 100644
--- a/target/linux/brcm63xx/dts/ar-5381u.dts
+++ b/target/linux/brcm63xx/dts/ar-5381u.dts
@@ -44,3 +44,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0xfe0000>;
+			label = "linux";
+		};
+
+		nvram at ff0000 {
+			reg = <0xff0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/ar-5387un.dts b/target/linux/brcm63xx/dts/ar-5387un.dts
index b7b3a95..bfcd71e 100644
--- a/target/linux/brcm63xx/dts/ar-5387un.dts
+++ b/target/linux/brcm63xx/dts/ar-5387un.dts
@@ -52,3 +52,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0xfe0000>;
+			label = "linux";
+		};
+
+		nvram at ff0000 {
+			reg = <0xff0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/bcm96318ref.dts b/target/linux/brcm63xx/dts/bcm96318ref.dts
index 4f5049c..11d67fa 100644
--- a/target/linux/brcm63xx/dts/bcm96318ref.dts
+++ b/target/linux/brcm63xx/dts/bcm96318ref.dts
@@ -51,3 +51,20 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <62500000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+	};
+};
diff --git a/target/linux/brcm63xx/dts/bcm96318ref_p300.dts b/target/linux/brcm63xx/dts/bcm96318ref_p300.dts
index 5f37a44..cb648a3 100644
--- a/target/linux/brcm63xx/dts/bcm96318ref_p300.dts
+++ b/target/linux/brcm63xx/dts/bcm96318ref_p300.dts
@@ -57,3 +57,20 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <62500000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+	};
+};
diff --git a/target/linux/brcm63xx/dts/bcm963268bu_p300.dts b/target/linux/brcm63xx/dts/bcm963268bu_p300.dts
index d332e3d..eba47d7 100644
--- a/target/linux/brcm63xx/dts/bcm963268bu_p300.dts
+++ b/target/linux/brcm63xx/dts/bcm963268bu_p300.dts
@@ -32,3 +32,20 @@
 		};
         };
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <20000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+	};
+};
diff --git a/target/linux/brcm63xx/dts/bcm963269bhr.dts b/target/linux/brcm63xx/dts/bcm963269bhr.dts
index bf4168a..68c17eb 100644
--- a/target/linux/brcm63xx/dts/bcm963269bhr.dts
+++ b/target/linux/brcm63xx/dts/bcm963269bhr.dts
@@ -40,3 +40,20 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <20000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+	};
+};
diff --git a/target/linux/brcm63xx/dts/bcm963281TAN.dts b/target/linux/brcm63xx/dts/bcm963281TAN.dts
index 71354db..468a855 100644
--- a/target/linux/brcm63xx/dts/bcm963281TAN.dts
+++ b/target/linux/brcm63xx/dts/bcm963281TAN.dts
@@ -42,3 +42,20 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+	};
+};
diff --git a/target/linux/brcm63xx/dts/bcm96328avng.dts b/target/linux/brcm63xx/dts/bcm96328avng.dts
index 4c8e319..37f289b 100644
--- a/target/linux/brcm63xx/dts/bcm96328avng.dts
+++ b/target/linux/brcm63xx/dts/bcm96328avng.dts
@@ -42,3 +42,20 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+	};
+};
diff --git a/target/linux/brcm63xx/dts/dsl-274xb-f.dts b/target/linux/brcm63xx/dts/dsl-274xb-f.dts
index 9ce2e98..08a5592 100644
--- a/target/linux/brcm63xx/dts/dsl-274xb-f.dts
+++ b/target/linux/brcm63xx/dts/dsl-274xb-f.dts
@@ -66,3 +66,42 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0x7c0000>;
+			label = "linux";
+		};
+
+		cal_data at 7d0000 {
+			reg = <0x7d0000 0x010000>;
+			label = "cal_data";
+			read-only;
+		};
+
+		nvram at 7e0000 {
+			reg = <0x7e0000 0x020000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/dsl-275xb-d.dts b/target/linux/brcm63xx/dts/dsl-275xb-d.dts
index b78ec54..cae6f37 100644
--- a/target/linux/brcm63xx/dts/dsl-275xb-d.dts
+++ b/target/linux/brcm63xx/dts/dsl-275xb-d.dts
@@ -79,3 +79,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <62500000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0x7e0000>;
+			label = "linux";
+		};
+
+		nvram at 7f0000 {
+			reg = <0x7f0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/fast2504n.dts b/target/linux/brcm63xx/dts/fast2504n.dts
index 4bc06c1..5492338 100644
--- a/target/linux/brcm63xx/dts/fast2504n.dts
+++ b/target/linux/brcm63xx/dts/fast2504n.dts
@@ -61,3 +61,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <20000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0x7e0000>;
+			label = "linux";
+		};
+
+		nvram at 7f0000 {
+			reg = <0x7f0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/fast2704n.dts b/target/linux/brcm63xx/dts/fast2704n.dts
index 8756ca0..8a3c05b 100644
--- a/target/linux/brcm63xx/dts/fast2704n.dts
+++ b/target/linux/brcm63xx/dts/fast2704n.dts
@@ -86,3 +86,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <62500000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0x7e0000>;
+			label = "linux";
+		};
+
+		nvram at 7f0000 {
+			reg = <0x7f0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/fast2704v2.dts b/target/linux/brcm63xx/dts/fast2704v2.dts
index 7611bf4..617b1ed 100644
--- a/target/linux/brcm63xx/dts/fast2704v2.dts
+++ b/target/linux/brcm63xx/dts/fast2704v2.dts
@@ -70,3 +70,36 @@
 		};
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0x7e0000>;
+			label = "linux";
+		};
+
+		nvram at 7f0000 {
+			reg = <0x7f0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/nb6-ser-r0.dts b/target/linux/brcm63xx/dts/nb6-ser-r0.dts
index 78c17dd..c0182f3 100644
--- a/target/linux/brcm63xx/dts/nb6-ser-r0.dts
+++ b/target/linux/brcm63xx/dts/nb6-ser-r0.dts
@@ -49,3 +49,36 @@
 		realtek,extif0 = <1 5 1 1 1 1 1 1 2>;
 	};
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <20000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0xfe0000>;
+			label = "linux";
+		};
+
+		nvram at ff0000 {
+			reg = <0xff0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/r5010unv2.dts b/target/linux/brcm63xx/dts/r5010unv2.dts
index 0d91d84..cce861b 100644
--- a/target/linux/brcm63xx/dts/r5010unv2.dts
+++ b/target/linux/brcm63xx/dts/r5010unv2.dts
@@ -67,3 +67,35 @@
 	};
 };
 
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <16666667>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+
+		cfe at 0 {
+			reg = <0x000000 0x010000>;
+			label = "cfe";
+			read-only;
+		};
+
+		linux at 10000 {
+			reg = <0x010000 0x7e0000>;
+			label = "linux";
+		};
+
+		nvram at 7f0000 {
+			reg = <0x7f0000 0x010000>;
+			label = "nvram";
+		};
+	};
+};
diff --git a/target/linux/brcm63xx/dts/vg50.dts b/target/linux/brcm63xx/dts/vg50.dts
index 1bf79fb..0eb7eb6 100644
--- a/target/linux/brcm63xx/dts/vg50.dts
+++ b/target/linux/brcm63xx/dts/vg50.dts
@@ -32,3 +32,20 @@
 		};
         };
 };
+
+&hsspi {
+	status = "ok";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <20000000>;
+		spi-tx-bus-width = <2>;
+		spi-rx-bus-width = <2>;
+		reg = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		linux,part-probe = "bcm63xxpart";
+	};
+};



More information about the lede-commits mailing list