030-v6.2-0003-ARM-dts-BCM5301X-Correct-description-of-TP-Link-part.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. From c8ee9f119bfb4244f76c9971c341ec06b49332cd Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  3. Date: Tue, 8 Nov 2022 12:07:08 +0100
  4. Subject: [PATCH] ARM: dts: BCM5301X: Correct description of TP-Link partitions
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. TP-Link routers have flash space partitioned according to the partitions
  9. table. It may look like fixed partitioning but those partitions can be
  10. actually reorganized. New can be added (or some removed), offsets and
  11. sizes may change.
  12. Fix DT to use binding for the TP-Link SafeLoader partitioning method.
  13. Signed-off-by: Rafał Miłecki <[email protected]>
  14. Link: https://lore.kernel.org/r/[email protected]
  15. Signed-off-by: Florian Fainelli <[email protected]>
  16. ---
  17. .../boot/dts/bcm47081-tplink-archer-c5-v2.dts | 25 ++++---------------
  18. .../boot/dts/bcm4709-tplink-archer-c9-v1.dts | 25 ++++---------------
  19. 2 files changed, 10 insertions(+), 40 deletions(-)
  20. --- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
  21. +++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
  22. @@ -95,30 +95,15 @@
  23. status = "okay";
  24. partitions {
  25. - compatible = "fixed-partitions";
  26. - #address-cells = <1>;
  27. - #size-cells = <1>;
  28. + compatible = "tplink,safeloader-partitions";
  29. + partitions-table-offset = <0xe50000>;
  30. - boot@0 {
  31. - label = "boot";
  32. - reg = <0x000000 0x040000>;
  33. - read-only;
  34. - };
  35. -
  36. - os-image@100000 {
  37. - label = "os-image";
  38. - reg = <0x040000 0x200000>;
  39. + partition-os-image {
  40. compatible = "brcm,trx";
  41. };
  42. - rootfs@240000 {
  43. - label = "rootfs";
  44. - reg = <0x240000 0xc00000>;
  45. - };
  46. -
  47. - nvram@ff0000 {
  48. - label = "nvram";
  49. - reg = <0xff0000 0x010000>;
  50. + partition-file-system {
  51. + linux,rootfs;
  52. };
  53. };
  54. };
  55. --- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
  56. +++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
  57. @@ -104,30 +104,15 @@
  58. status = "okay";
  59. partitions {
  60. - compatible = "fixed-partitions";
  61. - #address-cells = <1>;
  62. - #size-cells = <1>;
  63. + compatible = "tplink,safeloader-partitions";
  64. + partitions-table-offset = <0xe50000>;
  65. - boot@0 {
  66. - label = "boot";
  67. - reg = <0x000000 0x040000>;
  68. - read-only;
  69. - };
  70. -
  71. - os-image@100000 {
  72. - label = "os-image";
  73. - reg = <0x040000 0x200000>;
  74. + partition-os-image {
  75. compatible = "brcm,trx";
  76. };
  77. - rootfs@240000 {
  78. - label = "rootfs";
  79. - reg = <0x240000 0xc00000>;
  80. - };
  81. -
  82. - nvram@ff0000 {
  83. - label = "nvram";
  84. - reg = <0xff0000 0x010000>;
  85. + partition-file-system {
  86. + linux,rootfs;
  87. };
  88. };
  89. };