108-dts-arm64-mt7981-rfb-add-mtd-partitions.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. --- a/arch/arm/dts/mt7981-rfb.dts
  2. +++ b/arch/arm/dts/mt7981-rfb.dts
  3. @@ -143,6 +143,37 @@
  4. compatible = "spi-nand";
  5. reg = <0>;
  6. spi-max-frequency = <52000000>;
  7. +
  8. + partitions {
  9. + compatible = "fixed-partitions";
  10. + #address-cells = <1>;
  11. + #size-cells = <1>;
  12. +
  13. + partition@0 {
  14. + label = "BL2";
  15. + reg = <0x00000 0x0100000>;
  16. + };
  17. +
  18. + partition@100000 {
  19. + label = "u-boot-env";
  20. + reg = <0x0100000 0x0080000>;
  21. + };
  22. +
  23. + factory: partition@180000 {
  24. + label = "Factory";
  25. + reg = <0x180000 0x0200000>;
  26. + };
  27. +
  28. + partition@380000 {
  29. + label = "FIP";
  30. + reg = <0x380000 0x0200000>;
  31. + };
  32. +
  33. + partition@580000 {
  34. + label = "ubi";
  35. + reg = <0x580000 0x4000000>;
  36. + };
  37. + };
  38. };
  39. };
  40. @@ -164,6 +195,37 @@
  41. compatible = "jedec,spi-nor";
  42. reg = <0>;
  43. spi-max-frequency = <52000000>;
  44. +
  45. + partitions {
  46. + compatible = "fixed-partitions";
  47. + #address-cells = <1>;
  48. + #size-cells = <1>;
  49. +
  50. + partition@00000 {
  51. + label = "BL2";
  52. + reg = <0x00000 0x0040000>;
  53. + };
  54. +
  55. + partition@40000 {
  56. + label = "u-boot-env";
  57. + reg = <0x40000 0x0010000>;
  58. + };
  59. +
  60. + partition@50000 {
  61. + label = "Factory";
  62. + reg = <0x50000 0x00B0000>;
  63. + };
  64. +
  65. + partition@100000 {
  66. + label = "FIP";
  67. + reg = <0x100000 0x0080000>;
  68. + };
  69. +
  70. + partition@180000 {
  71. + label = "firmware";
  72. + reg = <0x180000 0xE00000>;
  73. + };
  74. + };
  75. };
  76. };
  77. --- a/arch/arm/dts/mt7981-snfi-nand-rfb.dts
  78. +++ b/arch/arm/dts/mt7981-snfi-nand-rfb.dts
  79. @@ -107,11 +107,11 @@
  80. };
  81. mmc0_pins_default: mmc0default {
  82. - mux {
  83. - function = "flash";
  84. - groups = "emmc_45";
  85. - };
  86. - };
  87. + mux {
  88. + function = "flash";
  89. + groups = "emmc_45";
  90. + };
  91. + };
  92. };
  93. &snand {
  94. @@ -119,6 +119,42 @@
  95. pinctrl-0 = <&snfi_pins>;
  96. status = "okay";
  97. quad-spi;
  98. +
  99. + spi_nand@0 {
  100. + compatible = "spi-nand";
  101. + reg = <0>;
  102. +
  103. + partitions {
  104. + compatible = "fixed-partitions";
  105. + #address-cells = <1>;
  106. + #size-cells = <1>;
  107. +
  108. + partition@0 {
  109. + label = "BL2";
  110. + reg = <0x00000 0x0100000>;
  111. + };
  112. +
  113. + partition@100000 {
  114. + label = "u-boot-env";
  115. + reg = <0x0100000 0x0080000>;
  116. + };
  117. +
  118. + factory: partition@180000 {
  119. + label = "Factory";
  120. + reg = <0x180000 0x0200000>;
  121. + };
  122. +
  123. + partition@380000 {
  124. + label = "FIP";
  125. + reg = <0x380000 0x0200000>;
  126. + };
  127. +
  128. + partition@580000 {
  129. + label = "ubi";
  130. + reg = <0x580000 0x4000000>;
  131. + };
  132. + };
  133. + };
  134. };
  135. &pwm {