socfpga-eccmgr.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  1. Altera SoCFPGA ECC Manager
  2. This driver uses the EDAC framework to implement the SOCFPGA ECC Manager.
  3. The ECC Manager counts and corrects single bit errors and counts/handles
  4. double bit errors which are uncorrectable.
  5. Cyclone5 and Arria5 ECC Manager
  6. Required Properties:
  7. - compatible : Should be "altr,socfpga-ecc-manager"
  8. - #address-cells: must be 1
  9. - #size-cells: must be 1
  10. - ranges : standard definition, should translate from local addresses
  11. Subcomponents:
  12. L2 Cache ECC
  13. Required Properties:
  14. - compatible : Should be "altr,socfpga-l2-ecc"
  15. - reg : Address and size for ECC error interrupt clear registers.
  16. - interrupts : Should be single bit error interrupt, then double bit error
  17. interrupt. Note the rising edge type.
  18. On Chip RAM ECC
  19. Required Properties:
  20. - compatible : Should be "altr,socfpga-ocram-ecc"
  21. - reg : Address and size for ECC error interrupt clear registers.
  22. - iram : phandle to On-Chip RAM definition.
  23. - interrupts : Should be single bit error interrupt, then double bit error
  24. interrupt. Note the rising edge type.
  25. Example:
  26. eccmgr: eccmgr@ffd08140 {
  27. compatible = "altr,socfpga-ecc-manager";
  28. #address-cells = <1>;
  29. #size-cells = <1>;
  30. ranges;
  31. l2-ecc@ffd08140 {
  32. compatible = "altr,socfpga-l2-ecc";
  33. reg = <0xffd08140 0x4>;
  34. interrupts = <0 36 1>, <0 37 1>;
  35. };
  36. ocram-ecc@ffd08144 {
  37. compatible = "altr,socfpga-ocram-ecc";
  38. reg = <0xffd08144 0x4>;
  39. iram = <&ocram>;
  40. interrupts = <0 178 1>, <0 179 1>;
  41. };
  42. };
  43. Arria10 SoCFPGA ECC Manager
  44. The Arria10 SoC ECC Manager handles the IRQs for each peripheral
  45. in a shared register instead of individual IRQs like the Cyclone5
  46. and Arria5. Therefore the device tree is different as well.
  47. Required Properties:
  48. - compatible : Should be "altr,socfpga-a10-ecc-manager"
  49. - altr,sysgr-syscon : phandle to Arria10 System Manager Block
  50. containing the ECC manager registers.
  51. - #address-cells: must be 1
  52. - #size-cells: must be 1
  53. - interrupts : Should be single bit error interrupt, then double bit error
  54. interrupt.
  55. - interrupt-controller : boolean indicator that ECC Manager is an interrupt controller
  56. - #interrupt-cells : must be set to 2.
  57. - ranges : standard definition, should translate from local addresses
  58. Subcomponents:
  59. L2 Cache ECC
  60. Required Properties:
  61. - compatible : Should be "altr,socfpga-a10-l2-ecc"
  62. - reg : Address and size for ECC error interrupt clear registers.
  63. - interrupts : Should be single bit error interrupt, then double bit error
  64. interrupt, in this order.
  65. On-Chip RAM ECC
  66. Required Properties:
  67. - compatible : Should be "altr,socfpga-a10-ocram-ecc"
  68. - reg : Address and size for ECC block registers.
  69. - interrupts : Should be single bit error interrupt, then double bit error
  70. interrupt, in this order.
  71. Ethernet FIFO ECC
  72. Required Properties:
  73. - compatible : Should be "altr,socfpga-eth-mac-ecc"
  74. - reg : Address and size for ECC block registers.
  75. - altr,ecc-parent : phandle to parent Ethernet node.
  76. - interrupts : Should be single bit error interrupt, then double bit error
  77. interrupt, in this order.
  78. NAND FIFO ECC
  79. Required Properties:
  80. - compatible : Should be "altr,socfpga-nand-ecc"
  81. - reg : Address and size for ECC block registers.
  82. - altr,ecc-parent : phandle to parent NAND node.
  83. - interrupts : Should be single bit error interrupt, then double bit error
  84. interrupt, in this order.
  85. DMA FIFO ECC
  86. Required Properties:
  87. - compatible : Should be "altr,socfpga-dma-ecc"
  88. - reg : Address and size for ECC block registers.
  89. - altr,ecc-parent : phandle to parent DMA node.
  90. - interrupts : Should be single bit error interrupt, then double bit error
  91. interrupt, in this order.
  92. USB FIFO ECC
  93. Required Properties:
  94. - compatible : Should be "altr,socfpga-usb-ecc"
  95. - reg : Address and size for ECC block registers.
  96. - altr,ecc-parent : phandle to parent USB node.
  97. - interrupts : Should be single bit error interrupt, then double bit error
  98. interrupt, in this order.
  99. QSPI FIFO ECC
  100. Required Properties:
  101. - compatible : Should be "altr,socfpga-qspi-ecc"
  102. - reg : Address and size for ECC block registers.
  103. - altr,ecc-parent : phandle to parent QSPI node.
  104. - interrupts : Should be single bit error interrupt, then double bit error
  105. interrupt, in this order.
  106. SDMMC FIFO ECC
  107. Required Properties:
  108. - compatible : Should be "altr,socfpga-sdmmc-ecc"
  109. - reg : Address and size for ECC block registers.
  110. - altr,ecc-parent : phandle to parent SD/MMC node.
  111. - interrupts : Should be single bit error interrupt, then double bit error
  112. interrupt, in this order for port A, and then single bit error interrupt,
  113. then double bit error interrupt in this order for port B.
  114. Example:
  115. eccmgr: eccmgr@ffd06000 {
  116. compatible = "altr,socfpga-a10-ecc-manager";
  117. altr,sysmgr-syscon = <&sysmgr>;
  118. #address-cells = <1>;
  119. #size-cells = <1>;
  120. interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>,
  121. <0 0 IRQ_TYPE_LEVEL_HIGH>;
  122. interrupt-controller;
  123. #interrupt-cells = <2>;
  124. ranges;
  125. l2-ecc@ffd06010 {
  126. compatible = "altr,socfpga-a10-l2-ecc";
  127. reg = <0xffd06010 0x4>;
  128. interrupts = <0 IRQ_TYPE_LEVEL_HIGH>,
  129. <32 IRQ_TYPE_LEVEL_HIGH>;
  130. };
  131. ocram-ecc@ff8c3000 {
  132. compatible = "altr,socfpga-a10-ocram-ecc";
  133. reg = <0xff8c3000 0x90>;
  134. interrupts = <1 IRQ_TYPE_LEVEL_HIGH>,
  135. <33 IRQ_TYPE_LEVEL_HIGH> ;
  136. };
  137. emac0-rx-ecc@ff8c0800 {
  138. compatible = "altr,socfpga-eth-mac-ecc";
  139. reg = <0xff8c0800 0x400>;
  140. altr,ecc-parent = <&gmac0>;
  141. interrupts = <4 IRQ_TYPE_LEVEL_HIGH>,
  142. <36 IRQ_TYPE_LEVEL_HIGH>;
  143. };
  144. emac0-tx-ecc@ff8c0c00 {
  145. compatible = "altr,socfpga-eth-mac-ecc";
  146. reg = <0xff8c0c00 0x400>;
  147. altr,ecc-parent = <&gmac0>;
  148. interrupts = <5 IRQ_TYPE_LEVEL_HIGH>,
  149. <37 IRQ_TYPE_LEVEL_HIGH>;
  150. };
  151. nand-buf-ecc@ff8c2000 {
  152. compatible = "altr,socfpga-nand-ecc";
  153. reg = <0xff8c2000 0x400>;
  154. altr,ecc-parent = <&nand>;
  155. interrupts = <11 IRQ_TYPE_LEVEL_HIGH>,
  156. <43 IRQ_TYPE_LEVEL_HIGH>;
  157. };
  158. nand-rd-ecc@ff8c2400 {
  159. compatible = "altr,socfpga-nand-ecc";
  160. reg = <0xff8c2400 0x400>;
  161. altr,ecc-parent = <&nand>;
  162. interrupts = <13 IRQ_TYPE_LEVEL_HIGH>,
  163. <45 IRQ_TYPE_LEVEL_HIGH>;
  164. };
  165. nand-wr-ecc@ff8c2800 {
  166. compatible = "altr,socfpga-nand-ecc";
  167. reg = <0xff8c2800 0x400>;
  168. altr,ecc-parent = <&nand>;
  169. interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
  170. <44 IRQ_TYPE_LEVEL_HIGH>;
  171. };
  172. dma-ecc@ff8c8000 {
  173. compatible = "altr,socfpga-dma-ecc";
  174. reg = <0xff8c8000 0x400>;
  175. altr,ecc-parent = <&pdma>;
  176. interrupts = <10 IRQ_TYPE_LEVEL_HIGH>,
  177. <42 IRQ_TYPE_LEVEL_HIGH>;
  178. usb0-ecc@ff8c8800 {
  179. compatible = "altr,socfpga-usb-ecc";
  180. reg = <0xff8c8800 0x400>;
  181. altr,ecc-parent = <&usb0>;
  182. interrupts = <2 IRQ_TYPE_LEVEL_HIGH>,
  183. <34 IRQ_TYPE_LEVEL_HIGH>;
  184. };
  185. qspi-ecc@ff8c8400 {
  186. compatible = "altr,socfpga-qspi-ecc";
  187. reg = <0xff8c8400 0x400>;
  188. altr,ecc-parent = <&qspi>;
  189. interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
  190. <46 IRQ_TYPE_LEVEL_HIGH>;
  191. };
  192. sdmmc-ecc@ff8c2c00 {
  193. compatible = "altr,socfpga-sdmmc-ecc";
  194. reg = <0xff8c2c00 0x400>;
  195. altr,ecc-parent = <&mmc>;
  196. interrupts = <15 IRQ_TYPE_LEVEL_HIGH>,
  197. <47 IRQ_TYPE_LEVEL_HIGH>,
  198. <16 IRQ_TYPE_LEVEL_HIGH>,
  199. <48 IRQ_TYPE_LEVEL_HIGH>;
  200. };
  201. };
  202. Stratix10 SoCFPGA ECC Manager (ARM64)
  203. The Stratix10 SoC ECC Manager handles the IRQs for each peripheral
  204. in a shared register similar to the Arria10. However, Stratix10 ECC
  205. requires access to registers that can only be read from Secure Monitor
  206. with SMC calls. Therefore the device tree is slightly different. Note
  207. that only 1 interrupt is sent in Stratix10 because the double bit errors
  208. are treated as SErrors in ARM64 instead of IRQs in ARM32.
  209. Required Properties:
  210. - compatible : Should be "altr,socfpga-s10-ecc-manager"
  211. - altr,sysgr-syscon : phandle to Stratix10 System Manager Block
  212. containing the ECC manager registers.
  213. - interrupts : Should be single bit error interrupt.
  214. - interrupt-controller : boolean indicator that ECC Manager is an interrupt controller
  215. - #interrupt-cells : must be set to 2.
  216. - #address-cells: must be 1
  217. - #size-cells: must be 1
  218. - ranges : standard definition, should translate from local addresses
  219. Subcomponents:
  220. SDRAM ECC
  221. Required Properties:
  222. - compatible : Should be "altr,sdram-edac-s10"
  223. - interrupts : Should be single bit error interrupt.
  224. On-Chip RAM ECC
  225. Required Properties:
  226. - compatible : Should be "altr,socfpga-s10-ocram-ecc"
  227. - reg : Address and size for ECC block registers.
  228. - altr,ecc-parent : phandle to parent OCRAM node.
  229. - interrupts : Should be single bit error interrupt.
  230. Ethernet FIFO ECC
  231. Required Properties:
  232. - compatible : Should be "altr,socfpga-s10-eth-mac-ecc"
  233. - reg : Address and size for ECC block registers.
  234. - altr,ecc-parent : phandle to parent Ethernet node.
  235. - interrupts : Should be single bit error interrupt.
  236. NAND FIFO ECC
  237. Required Properties:
  238. - compatible : Should be "altr,socfpga-s10-nand-ecc"
  239. - reg : Address and size for ECC block registers.
  240. - altr,ecc-parent : phandle to parent NAND node.
  241. - interrupts : Should be single bit error interrupt.
  242. DMA FIFO ECC
  243. Required Properties:
  244. - compatible : Should be "altr,socfpga-s10-dma-ecc"
  245. - reg : Address and size for ECC block registers.
  246. - altr,ecc-parent : phandle to parent DMA node.
  247. - interrupts : Should be single bit error interrupt.
  248. USB FIFO ECC
  249. Required Properties:
  250. - compatible : Should be "altr,socfpga-s10-usb-ecc"
  251. - reg : Address and size for ECC block registers.
  252. - altr,ecc-parent : phandle to parent USB node.
  253. - interrupts : Should be single bit error interrupt.
  254. SDMMC FIFO ECC
  255. Required Properties:
  256. - compatible : Should be "altr,socfpga-s10-sdmmc-ecc"
  257. - reg : Address and size for ECC block registers.
  258. - altr,ecc-parent : phandle to parent SD/MMC node.
  259. - interrupts : Should be single bit error interrupt for port A
  260. and then single bit error interrupt for port B.
  261. Example:
  262. eccmgr {
  263. compatible = "altr,socfpga-s10-ecc-manager";
  264. altr,sysmgr-syscon = <&sysmgr>;
  265. #address-cells = <1>;
  266. #size-cells = <1>;
  267. interrupts = <0 15 4>;
  268. interrupt-controller;
  269. #interrupt-cells = <2>;
  270. ranges;
  271. sdramedac {
  272. compatible = "altr,sdram-edac-s10";
  273. interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
  274. };
  275. ocram-ecc@ff8cc000 {
  276. compatible = "altr,socfpga-s10-ocram-ecc";
  277. reg = <ff8cc000 0x100>;
  278. altr,ecc-parent = <&ocram>;
  279. interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
  280. };
  281. emac0-rx-ecc@ff8c0000 {
  282. compatible = "altr,socfpga-s10-eth-mac-ecc";
  283. reg = <0xff8c0000 0x100>;
  284. altr,ecc-parent = <&gmac0>;
  285. interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
  286. };
  287. emac0-tx-ecc@ff8c0400 {
  288. compatible = "altr,socfpga-s10-eth-mac-ecc";
  289. reg = <0xff8c0400 0x100>;
  290. altr,ecc-parent = <&gmac0>;
  291. interrupts = <5 IRQ_TYPE_LEVEL_HIGH>'
  292. };
  293. nand-buf-ecc@ff8c8000 {
  294. compatible = "altr,socfpga-s10-nand-ecc";
  295. reg = <0xff8c8000 0x100>;
  296. altr,ecc-parent = <&nand>;
  297. interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
  298. };
  299. nand-rd-ecc@ff8c8400 {
  300. compatible = "altr,socfpga-s10-nand-ecc";
  301. reg = <0xff8c8400 0x100>;
  302. altr,ecc-parent = <&nand>;
  303. interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
  304. };
  305. nand-wr-ecc@ff8c8800 {
  306. compatible = "altr,socfpga-s10-nand-ecc";
  307. reg = <0xff8c8800 0x100>;
  308. altr,ecc-parent = <&nand>;
  309. interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
  310. };
  311. dma-ecc@ff8c9000 {
  312. compatible = "altr,socfpga-s10-dma-ecc";
  313. reg = <0xff8c9000 0x100>;
  314. altr,ecc-parent = <&pdma>;
  315. interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
  316. usb0-ecc@ff8c4000 {
  317. compatible = "altr,socfpga-s10-usb-ecc";
  318. reg = <0xff8c4000 0x100>;
  319. altr,ecc-parent = <&usb0>;
  320. interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
  321. };
  322. sdmmc-ecc@ff8c8c00 {
  323. compatible = "altr,socfpga-s10-sdmmc-ecc";
  324. reg = <0xff8c8c00 0x100>;
  325. altr,ecc-parent = <&mmc>;
  326. interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
  327. <15 IRQ_TYPE_LEVEL_HIGH>;
  328. };
  329. };