bcm53xx: backport BCM5301X/BCM53573 dts commits from 4.19+
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-4.14 / 130-ARM-dts-BCM5301X-Specify-flash-partitions.patch
1 From ed4728d9fa0b19687caa964cf5c2082b80208167 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Sat, 28 Jul 2018 13:25:48 +0200
4 Subject: [PATCH] ARM: dts: BCM5301X: Specify flash partitions
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Most devices use Broadcom standard partitions which allows them to be
10 described with the "brcm,bcm947xx-cfe-partitions". Exceptions are:
11 1) TP-LINK devices which use "os-image" partition with TRX containing
12 kernel only + separated rootfs partition.
13 2) Asus RT-AC87U with custom "asus" partition.
14
15 This commit also removes undocumented and unsupported linux,part-probe
16 binding which got accidentally upstreamed while describing SPI
17 controller.
18
19 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
20 ---
21 arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 28 +++++++++++++++++++
22 arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts | 31 ++++++++++++++++++++++
23 arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts | 28 +++++++++++++++++++
24 arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi | 4 +++
25 arch/arm/boot/dts/bcm5301x.dtsi | 5 +++-
26 5 files changed, 95 insertions(+), 1 deletion(-)
27
28 --- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
29 +++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
30 @@ -94,6 +94,34 @@
31
32 &spi_nor {
33 status = "okay";
34 +
35 + partitions {
36 + compatible = "fixed-partitions";
37 + #address-cells = <1>;
38 + #size-cells = <1>;
39 +
40 + boot@0 {
41 + label = "boot";
42 + reg = <0x000000 0x040000>;
43 + read-only;
44 + };
45 +
46 + os-image@100000 {
47 + label = "os-image";
48 + reg = <0x040000 0x200000>;
49 + compatible = "brcm,trx";
50 + };
51 +
52 + rootfs@240000 {
53 + label = "rootfs";
54 + reg = <0x240000 0xc00000>;
55 + };
56 +
57 + nvram@ff0000 {
58 + label = "nvram";
59 + reg = <0xff0000 0x010000>;
60 + };
61 + };
62 };
63
64 &usb2 {
65 --- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
66 +++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
67 @@ -66,3 +66,34 @@
68 &usb3_phy {
69 status = "okay";
70 };
71 +
72 +&nandcs {
73 + partitions {
74 + compatible = "fixed-partitions";
75 + #address-cells = <1>;
76 + #size-cells = <1>;
77 +
78 + boot@0 {
79 + label = "boot";
80 + reg = <0x00000000 0x00080000>;
81 + read-only;
82 + };
83 +
84 + nvram@80000 {
85 + label = "nvram";
86 + reg = <0x00080000 0x00180000>;
87 + };
88 +
89 + firmware@200000 {
90 + label = "firmware";
91 + reg = <0x00200000 0x07cc0000>;
92 + compatible = "brcm,trx";
93 + };
94 +
95 + asus@7ec0000 {
96 + label = "asus";
97 + reg = <0x07ec0000 0x00140000>;
98 + read-only;
99 + };
100 + };
101 +};
102 --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
103 +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
104 @@ -103,6 +103,34 @@
105
106 &spi_nor {
107 status = "okay";
108 +
109 + partitions {
110 + compatible = "fixed-partitions";
111 + #address-cells = <1>;
112 + #size-cells = <1>;
113 +
114 + boot@0 {
115 + label = "boot";
116 + reg = <0x000000 0x040000>;
117 + read-only;
118 + };
119 +
120 + os-image@100000 {
121 + label = "os-image";
122 + reg = <0x040000 0x200000>;
123 + compatible = "brcm,trx";
124 + };
125 +
126 + rootfs@240000 {
127 + label = "rootfs";
128 + reg = <0x240000 0xc00000>;
129 + };
130 +
131 + nvram@ff0000 {
132 + label = "nvram";
133 + reg = <0xff0000 0x010000>;
134 + };
135 + };
136 };
137
138 &usb3_phy {
139 --- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
140 +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
141 @@ -12,6 +12,10 @@
142 reg = <0>;
143 #address-cells = <1>;
144 #size-cells = <1>;
145 +
146 + partitions {
147 + compatible = "brcm,bcm947xx-cfe-partitions";
148 + };
149 };
150 };
151 };
152 --- a/arch/arm/boot/dts/bcm5301x.dtsi
153 +++ b/arch/arm/boot/dts/bcm5301x.dtsi
154 @@ -475,8 +475,11 @@
155 compatible = "jedec,spi-nor";
156 reg = <0>;
157 spi-max-frequency = <20000000>;
158 - linux,part-probe = "ofpart", "bcm47xxpart";
159 status = "disabled";
160 +
161 + partitions {
162 + compatible = "brcm,bcm947xx-cfe-partitions";
163 + };
164 };
165 };
166