030-v4.20-0001-ARM-dts-BCM5301X-Specify-flash-partitions.patch 3.8 KB

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