064-ARM-BCM5301X-add-NAND-flash-chip-description.patch 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. From 9faa5960eef3204cae6637b530f5e23e53b5a9ef Mon Sep 17 00:00:00 2001
  2. From: Hauke Mehrtens <hauke@hauke-m.de>
  3. Date: Fri, 29 May 2015 23:39:47 +0200
  4. Subject: [PATCH] ARM: BCM5301X: add NAND flash chip description
  5. This adds the NAND flash chip description for a standard chip found
  6. connected to this SoC. This makes use of generic Broadcom NAND driver
  7. with the iProc interface.
  8. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  9. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
  10. ---
  11. arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts | 1 +
  12. arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts | 1 +
  13. arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 1 +
  14. arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 9 +++-----
  15. arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 1 +
  16. arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts | 1 +
  17. arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 1 +
  18. arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts | 1 +
  19. arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 1 +
  20. arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts | 1 +
  21. arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts | 1 +
  22. arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 1 +
  23. arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi | 24 ++++++++++++++++++++++
  24. arch/arm/boot/dts/bcm5301x.dtsi | 12 +++++++++++
  25. 14 files changed, 50 insertions(+), 6 deletions(-)
  26. create mode 100644 arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi
  27. --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
  28. +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dts
  29. @@ -10,6 +10,7 @@
  30. /dts-v1/;
  31. #include "bcm4708.dtsi"
  32. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  33. / {
  34. compatible = "asus,rt-ac56u", "brcm,bcm4708";
  35. --- a/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
  36. +++ b/arch/arm/boot/dts/bcm4708-asus-rt-ac68u.dts
  37. @@ -10,6 +10,7 @@
  38. /dts-v1/;
  39. #include "bcm4708.dtsi"
  40. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  41. / {
  42. compatible = "asus,rt-ac68u", "brcm,bcm4708";
  43. --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
  44. +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
  45. @@ -10,6 +10,7 @@
  46. /dts-v1/;
  47. #include "bcm4708.dtsi"
  48. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  49. / {
  50. compatible = "buffalo,wzr-1750dhp", "brcm,bcm4708";
  51. --- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
  52. +++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
  53. @@ -10,6 +10,7 @@
  54. /dts-v1/;
  55. #include "bcm4708.dtsi"
  56. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  57. / {
  58. compatible = "luxul,xwc-1000", "brcm,bcm4708";
  59. @@ -23,12 +24,8 @@
  60. reg = <0x00000000 0x08000000>;
  61. };
  62. - axi@18000000 {
  63. - nand@28000 {
  64. - reg = <0x00028000 0x1000>;
  65. - #address-cells = <1>;
  66. - #size-cells = <1>;
  67. -
  68. + nand: nand@18028000 {
  69. + nandcs@0 {
  70. partition@0 {
  71. label = "ubi";
  72. reg = <0x00000000 0x08000000>;
  73. --- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
  74. +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
  75. @@ -10,6 +10,7 @@
  76. /dts-v1/;
  77. #include "bcm4708.dtsi"
  78. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  79. / {
  80. compatible = "netgear,r6250v1", "brcm,bcm4708";
  81. --- a/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
  82. +++ b/arch/arm/boot/dts/bcm4708-netgear-r6300-v2.dts
  83. @@ -10,6 +10,7 @@
  84. /dts-v1/;
  85. #include "bcm4708.dtsi"
  86. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  87. / {
  88. compatible = "netgear,r6300v2", "brcm,bcm4708";
  89. --- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
  90. +++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
  91. @@ -10,6 +10,7 @@
  92. /dts-v1/;
  93. #include "bcm4708.dtsi"
  94. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  95. / {
  96. compatible = "smartrg,sr400ac", "brcm,bcm4708";
  97. --- a/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
  98. +++ b/arch/arm/boot/dts/bcm47081-asus-rt-n18u.dts
  99. @@ -10,6 +10,7 @@
  100. /dts-v1/;
  101. #include "bcm47081.dtsi"
  102. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  103. / {
  104. compatible = "asus,rt-n18u", "brcm,bcm47081", "brcm,bcm4708";
  105. --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
  106. +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
  107. @@ -10,6 +10,7 @@
  108. /dts-v1/;
  109. #include "bcm47081.dtsi"
  110. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  111. / {
  112. compatible = "buffalo,wzr-600dhp2", "brcm,bcm47081", "brcm,bcm4708";
  113. --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
  114. +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-900dhp.dts
  115. @@ -10,6 +10,7 @@
  116. /dts-v1/;
  117. #include "bcm47081.dtsi"
  118. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  119. / {
  120. compatible = "buffalo,wzr-900dhp", "brcm,bcm47081", "brcm,bcm4708";
  121. --- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
  122. +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
  123. @@ -10,6 +10,7 @@
  124. /dts-v1/;
  125. #include "bcm4708.dtsi"
  126. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  127. / {
  128. compatible = "buffalo,wxr-1900dhp", "brcm,bcm4709", "brcm,bcm4708";
  129. --- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
  130. +++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
  131. @@ -10,6 +10,7 @@
  132. /dts-v1/;
  133. #include "bcm4708.dtsi"
  134. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  135. / {
  136. compatible = "netgear,r8000", "brcm,bcm4709", "brcm,bcm4708";
  137. --- /dev/null
  138. +++ b/arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi
  139. @@ -0,0 +1,24 @@
  140. +/*
  141. + * Broadcom BCM470X / BCM5301X Nand chip defaults.
  142. + *
  143. + * This should be included if the NAND controller is on chip select 0
  144. + * and uses 8 bit ECC.
  145. + *
  146. + * Copyright (C) 2015 Hauke Mehrtens <hauke@hauke-m.de>
  147. + *
  148. + * Licensed under the GNU/GPL. See COPYING for details.
  149. + */
  150. +
  151. +/ {
  152. + nand@18028000 {
  153. + nandcs@0 {
  154. + compatible = "brcm,nandcs";
  155. + reg = <0>;
  156. + #address-cells = <1>;
  157. + #size-cells = <1>;
  158. +
  159. + nand-ecc-strength = <8>;
  160. + nand-ecc-step-size = <512>;
  161. + };
  162. + };
  163. +};
  164. --- a/arch/arm/boot/dts/bcm5301x.dtsi
  165. +++ b/arch/arm/boot/dts/bcm5301x.dtsi
  166. @@ -143,4 +143,16 @@
  167. #gpio-cells = <2>;
  168. };
  169. };
  170. +
  171. + nand: nand@18028000 {
  172. + compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand";
  173. + reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>;
  174. + reg-names = "nand", "iproc-idm", "iproc-ext";
  175. + interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
  176. +
  177. + #address-cells = <1>;
  178. + #size-cells = <0>;
  179. +
  180. + brcm,nand-has-wp;
  181. + };
  182. };