3132-dts-ls1046a-add-LS1046ARDB-board-support.patch 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. From feb12cb699adbac2d4619401c7ff4fcc2fc97b6c Mon Sep 17 00:00:00 2001
  2. From: Mingkai Hu <mingkai.hu@nxp.com>
  3. Date: Mon, 26 Sep 2016 12:33:42 +0800
  4. Subject: [PATCH 132/141] dts/ls1046a: add LS1046ARDB board support
  5. commit e95a28cfd9a392fe5dc189a9ae097bbaaccd1228
  6. [context adjustment]
  7. Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
  8. Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
  9. ---
  10. arch/arm64/boot/dts/freescale/Makefile | 1 +
  11. arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts | 198 +++++++++++++++++++++
  12. arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 178 +++++++++++++-----
  13. 3 files changed, 328 insertions(+), 49 deletions(-)
  14. create mode 100644 arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts
  15. --- a/arch/arm64/boot/dts/freescale/Makefile
  16. +++ b/arch/arm64/boot/dts/freescale/Makefile
  17. @@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls2
  18. dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1043a-rdb.dtb
  19. dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-rdb.dtb
  20. dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1012a-frdm.dtb
  21. +dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-ls1046a-rdb.dtb
  22. always := $(dtb-y)
  23. subdir-y := $(dts-dirs)
  24. --- /dev/null
  25. +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts
  26. @@ -0,0 +1,198 @@
  27. +/*
  28. + * Device Tree Include file for Freescale Layerscape-1046A family SoC.
  29. + *
  30. + * Copyright 2016, Freescale Semiconductor
  31. + *
  32. + * Mingkai Hu <mingkai.hu@nxp.com>
  33. + *
  34. + * This file is dual-licensed: you can use it either under the terms
  35. + * of the GPLv2 or the X11 license, at your option. Note that this dual
  36. + * licensing only applies to this file, and not this project as a
  37. + * whole.
  38. + *
  39. + * a) This library is free software; you can redistribute it and/or
  40. + * modify it under the terms of the GNU General Public License as
  41. + * published by the Free Software Foundation; either version 2 of the
  42. + * License, or (at your option) any later version.
  43. + *
  44. + * This library is distributed in the hope that it will be useful,
  45. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  46. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  47. + * GNU General Public License for more details.
  48. + *
  49. + * Or, alternatively,
  50. + *
  51. + * b) Permission is hereby granted, free of charge, to any person
  52. + * obtaining a copy of this software and associated documentation
  53. + * files (the "Software"), to deal in the Software without
  54. + * restriction, including without limitation the rights to use,
  55. + * copy, modify, merge, publish, distribute, sublicense, and/or
  56. + * sell copies of the Software, and to permit persons to whom the
  57. + * Software is furnished to do so, subject to the following
  58. + * conditions:
  59. + *
  60. + * The above copyright notice and this permission notice shall be
  61. + * included in all copies or substantial portions of the Software.
  62. + *
  63. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  64. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  65. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  66. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  67. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  68. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  69. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  70. + * OTHER DEALINGS IN THE SOFTWARE.
  71. + */
  72. +
  73. +/dts-v1/;
  74. +#include "fsl-ls1046a.dtsi"
  75. +
  76. +/ {
  77. + model = "LS1046A RDB Board";
  78. + compatible = "fsl,ls1046a-rdb", "fsl,ls1046a";
  79. +
  80. + aliases {
  81. + ethernet0 = &fm1mac3;
  82. + ethernet1 = &fm1mac4;
  83. + ethernet2 = &fm1mac5;
  84. + ethernet3 = &fm1mac6;
  85. + ethernet4 = &fm1mac9;
  86. + ethernet5 = &fm1mac10;
  87. + };
  88. +};
  89. +
  90. +&i2c0 {
  91. + status = "okay";
  92. + ina220@40 {
  93. + compatible = "ti,ina220";
  94. + reg = <0x40>;
  95. + shunt-resistor = <1000>;
  96. + };
  97. + adt7461a@4c {
  98. + compatible = "adi,adt7461";
  99. + reg = <0x4c>;
  100. + };
  101. + eeprom@56 {
  102. + compatible = "at24,24c512";
  103. + reg = <0x52>;
  104. + };
  105. + eeprom@57 {
  106. + compatible = "at24,24c512";
  107. + reg = <0x53>;
  108. + };
  109. +};
  110. +
  111. +&i2c3 {
  112. + status = "okay";
  113. + rtc@51 {
  114. + compatible = "nxp,pcf2129";
  115. + reg = <0x51>;
  116. + };
  117. +};
  118. +
  119. +&ifc {
  120. + status = "okay";
  121. + #address-cells = <2>;
  122. + #size-cells = <1>;
  123. + /* NAND Flashe and CPLD on board */
  124. + ranges = <0x0 0x0 0x0 0x7e800000 0x00010000
  125. + 0x2 0x0 0x0 0x7fb00000 0x00000100>;
  126. +
  127. + nand@0,0 {
  128. + compatible = "fsl,ifc-nand";
  129. + #address-cells = <1>;
  130. + #size-cells = <1>;
  131. + reg = <0x0 0x0 0x10000>;
  132. + };
  133. +
  134. + cpld: board-control@2,0 {
  135. + compatible = "fsl,ls1046ardb-cpld";
  136. + reg = <0x2 0x0 0x0000100>;
  137. + };
  138. +};
  139. +
  140. +&qspi {
  141. + num-cs = <2>;
  142. + bus-num = <0>;
  143. + status = "okay";
  144. +
  145. + qflash0: s25fs128s@0 {
  146. + compatible = "spansion,m25p80";
  147. + #address-cells = <1>;
  148. + #size-cells = <1>;
  149. + spi-max-frequency = <20000000>;
  150. + reg = <0>;
  151. + };
  152. +
  153. + qflash1: s25fs128s@1 {
  154. + compatible = "spansion,m25p80";
  155. + #address-cells = <1>;
  156. + #size-cells = <1>;
  157. + spi-max-frequency = <20000000>;
  158. + reg = <1>;
  159. + };
  160. +
  161. +};
  162. +
  163. +&duart0 {
  164. + status = "okay";
  165. +};
  166. +
  167. +&duart1 {
  168. + status = "okay";
  169. +};
  170. +
  171. +&fman0 {
  172. + ethernet@e4000 {
  173. + phy-handle = <&rgmii_phy1>;
  174. + phy-connection-type = "rgmii";
  175. + };
  176. +
  177. + ethernet@e6000 {
  178. + phy-handle = <&rgmii_phy2>;
  179. + phy-connection-type = "rgmii";
  180. + };
  181. +
  182. + ethernet@e8000 {
  183. + phy-handle = <&sgmii_phy1>;
  184. + phy-connection-type = "sgmii";
  185. + };
  186. +
  187. + ethernet@ea000 {
  188. + phy-handle = <&sgmii_phy2>;
  189. + phy-connection-type = "sgmii";
  190. + };
  191. +
  192. + ethernet@f0000 { /* 10GEC1 */
  193. + phy-handle = <&aqr106_phy>;
  194. + phy-connection-type = "xgmii";
  195. + };
  196. +
  197. + ethernet@f2000 { /* 10GEC2 */
  198. + fixed-link = <0 1 10000 0 0>;
  199. + phy-connection-type = "xgmii";
  200. + };
  201. +
  202. + mdio@fc000 {
  203. + rgmii_phy1: ethernet-phy@1 {
  204. + reg = <0x1>;
  205. + };
  206. + rgmii_phy2: ethernet-phy@2 {
  207. + reg = <0x2>;
  208. + };
  209. + sgmii_phy1: ethernet-phy@3 {
  210. + reg = <0x3>;
  211. + };
  212. + sgmii_phy2: ethernet-phy@4 {
  213. + reg = <0x4>;
  214. + };
  215. + };
  216. +
  217. + mdio@fd000 {
  218. + aqr106_phy: ethernet-phy@1 {
  219. + compatible = "ethernet-phy-ieee802.3-c45";
  220. + interrupts = <0 131 4>;
  221. + reg = <0x0>;
  222. + };
  223. + };
  224. +};
  225. --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
  226. +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
  227. @@ -51,13 +51,7 @@
  228. #size-cells = <2>;
  229. aliases {
  230. - ethernet0 = &fm1mac1;
  231. - ethernet1 = &fm1mac2;
  232. - ethernet2 = &fm1mac3;
  233. - ethernet3 = &fm1mac4;
  234. - ethernet4 = &fm1mac5;
  235. - ethernet5 = &fm1mac6;
  236. - ethernet6 = &fm1mac9;
  237. + crypto = &crypto;
  238. };
  239. cpus {
  240. @@ -70,6 +64,7 @@
  241. reg = <0x0>;
  242. clocks = <&clockgen 1 0>;
  243. next-level-cache = <&l2>;
  244. + cpu-idle-states = <&CPU_PH20>;
  245. };
  246. cpu1: cpu@1 {
  247. @@ -78,6 +73,7 @@
  248. reg = <0x1>;
  249. clocks = <&clockgen 1 0>;
  250. next-level-cache = <&l2>;
  251. + cpu-idle-states = <&CPU_PH20>;
  252. };
  253. cpu2: cpu@2 {
  254. @@ -86,6 +82,7 @@
  255. reg = <0x2>;
  256. clocks = <&clockgen 1 0>;
  257. next-level-cache = <&l2>;
  258. + cpu-idle-states = <&CPU_PH20>;
  259. };
  260. cpu3: cpu@3 {
  261. @@ -94,6 +91,7 @@
  262. reg = <0x3>;
  263. clocks = <&clockgen 1 0>;
  264. next-level-cache = <&l2>;
  265. + cpu-idle-states = <&CPU_PH20>;
  266. };
  267. l2: l2-cache {
  268. @@ -101,6 +99,19 @@
  269. };
  270. };
  271. + idle-states {
  272. + entry-method = "arm,psci";
  273. +
  274. + CPU_PH20: cpu-ph20 {
  275. + compatible = "arm,idle-state";
  276. + idle-state-name = "PH20";
  277. + arm,psci-suspend-param = <0x00010000>;
  278. + entry-latency-us = <1000>;
  279. + exit-latency-us = <1000>;
  280. + min-residency-us = <3000>;
  281. + };
  282. + };
  283. +
  284. memory@80000000 {
  285. device_type = "memory";
  286. reg = <0x0 0x80000000 0 0x80000000>;
  287. @@ -193,6 +204,49 @@
  288. bus-width = <4>;
  289. };
  290. + crypto: crypto@1700000 {
  291. + compatible = "fsl,sec-v5.4", "fsl,sec-v5.0",
  292. + "fsl,sec-v4.0";
  293. + fsl,sec-era = <8>;
  294. + #address-cells = <1>;
  295. + #size-cells = <1>;
  296. + ranges = <0x0 0x00 0x1700000 0x100000>;
  297. + reg = <0x00 0x1700000 0x0 0x100000>;
  298. + interrupts = <0 75 0x4>;
  299. +
  300. + sec_jr0: jr@10000 {
  301. + compatible = "fsl,sec-v5.4-job-ring",
  302. + "fsl,sec-v5.0-job-ring",
  303. + "fsl,sec-v4.0-job-ring";
  304. + reg = <0x10000 0x10000>;
  305. + interrupts = <0 71 0x4>;
  306. + };
  307. +
  308. + sec_jr1: jr@20000 {
  309. + compatible = "fsl,sec-v5.4-job-ring",
  310. + "fsl,sec-v5.0-job-ring",
  311. + "fsl,sec-v4.0-job-ring";
  312. + reg = <0x20000 0x10000>;
  313. + interrupts = <0 72 0x4>;
  314. + };
  315. +
  316. + sec_jr2: jr@30000 {
  317. + compatible = "fsl,sec-v5.4-job-ring",
  318. + "fsl,sec-v5.0-job-ring",
  319. + "fsl,sec-v4.0-job-ring";
  320. + reg = <0x30000 0x10000>;
  321. + interrupts = <0 73 0x4>;
  322. + };
  323. +
  324. + sec_jr3: jr@40000 {
  325. + compatible = "fsl,sec-v5.4-job-ring",
  326. + "fsl,sec-v5.0-job-ring",
  327. + "fsl,sec-v4.0-job-ring";
  328. + reg = <0x40000 0x10000>;
  329. + interrupts = <0 74 0x4>;
  330. + };
  331. + };
  332. +
  333. qman: qman@1880000 {
  334. compatible = "fsl,qman";
  335. reg = <0x00 0x1880000 0x0 0x10000>;
  336. @@ -490,6 +544,19 @@
  337. fsl,qman-channel-id = <0x800>;
  338. };
  339. + fman0_10g_rx1: port@91000 {
  340. + cell-index = <1>;
  341. + compatible = "fsl,fman-port-10g-rx";
  342. + reg = <0x91000 0x1000>;
  343. + };
  344. +
  345. + fman0_10g_tx1: port@b1000 {
  346. + cell-index = <1>;
  347. + compatible = "fsl,fman-port-10g-tx";
  348. + reg = <0xb1000 0x1000>;
  349. + fsl,qman-channel-id = <0x801>;
  350. + };
  351. +
  352. fm1mac9: ethernet@f0000 {
  353. cell-index = <0>;
  354. compatible = "fsl,fman-memac";
  355. @@ -497,6 +564,13 @@
  356. fsl,port-handles = <&fman0_10g_rx0 &fman0_10g_tx0>;
  357. };
  358. + fm1mac10: ethernet@f2000 {
  359. + cell-index = <1>;
  360. + compatible = "fsl,fman-memac";
  361. + reg = <0xf2000 0x1000>;
  362. + fsl,port-handles = <&fman0_10g_rx1 &fman0_10g_tx1>;
  363. + };
  364. +
  365. mdio@f1000 {
  366. #address-cells = <1>;
  367. #size-cells = <0>;
  368. @@ -504,6 +578,13 @@
  369. reg = <0xf1000 0x1000>;
  370. };
  371. + mdio@f3000 {
  372. + #address-cells = <1>;
  373. + #size-cells = <0>;
  374. + compatible = "fsl,fman-memac-mdio";
  375. + reg = <0xf3000 0x1000>;
  376. + };
  377. +
  378. ptp_timer0: rtc@fe000 {
  379. compatible = "fsl,fman-rtc";
  380. reg = <0xfe000 0x1000>;
  381. @@ -657,7 +738,7 @@
  382. compatible = "fsl,ls1021a-lpuart";
  383. reg = <0x0 0x2950000 0x0 0x1000>;
  384. interrupts = <0 48 0x4>;
  385. - clocks = <&clockgen 0 0>;
  386. + clocks = <&clockgen 4 0>;
  387. clock-names = "ipg";
  388. status = "disabled";
  389. };
  390. @@ -712,7 +793,7 @@
  391. reg = <0x0 0x29d0000 0x0 0x10000>;
  392. interrupts = <0 86 0x4>;
  393. big-endian;
  394. - rcpm-wakeup = <&rcpm 0x0 0x20000000>;
  395. + rcpm-wakeup = <&rcpm 0x00020000 0x0>;
  396. status = "okay";
  397. };
  398. @@ -789,34 +870,34 @@
  399. big-endian;
  400. };
  401. - msi1: msi-controller@1580000 {
  402. - compatible = "fsl,1s1046a-msi";
  403. - reg = <0x0 0x1580000 0x0 0x10000>;
  404. + msi: msi-controller@1580000 {
  405. + compatible = "fsl,ls1046a-msi";
  406. + #address-cells = <2>;
  407. + #size-cells = <2>;
  408. + ranges;
  409. msi-controller;
  410. - interrupts = <0 116 0x4>,
  411. - <0 111 0x4>,
  412. - <0 112 0x4>,
  413. - <0 113 0x4>;
  414. - };
  415. - msi2: msi-controller@1590000 {
  416. - compatible = "fsl,1s1046a-msi";
  417. - reg = <0x0 0x1590000 0x0 0x10000>;
  418. - msi-controller;
  419. - interrupts = <0 126 0x4>,
  420. - <0 121 0x4>,
  421. - <0 122 0x4>,
  422. - <0 123 0x4>;
  423. - };
  424. -
  425. - msi3: msi-controller@15a0000 {
  426. - compatible = "fsl,1s1046a-msi";
  427. - reg = <0x0 0x15a0000 0x0 0x10000>;
  428. - msi-controller;
  429. - interrupts = <0 160 0x4>,
  430. - <0 155 0x4>,
  431. - <0 156 0x4>,
  432. - <0 157 0x4>;
  433. + msi-bank@1580000 {
  434. + reg = <0x0 0x1580000 0x0 0x10000>;
  435. + interrupts = <0 116 0x4>,
  436. + <0 111 0x4>,
  437. + <0 112 0x4>,
  438. + <0 113 0x4>;
  439. + };
  440. + msi-bank@1590000 {
  441. + reg = <0x0 0x1590000 0x0 0x10000>;
  442. + interrupts = <0 126 0x4>,
  443. + <0 121 0x4>,
  444. + <0 122 0x4>,
  445. + <0 123 0x4>;
  446. + };
  447. + msi-bank@15a0000 {
  448. + reg = <0x0 0x15a0000 0x0 0x10000>;
  449. + interrupts = <0 160 0x4>,
  450. + <0 155 0x4>,
  451. + <0 156 0x4>,
  452. + <0 157 0x4>;
  453. + };
  454. };
  455. pcie@3400000 {
  456. @@ -826,15 +907,16 @@
  457. reg-names = "regs", "config";
  458. interrupts = <0 118 0x4>, /* controller interrupt */
  459. <0 117 0x4>; /* PME interrupt */
  460. - interrupt-names = "intr", "pme";
  461. + interrupt-names = "aer";
  462. #address-cells = <3>;
  463. #size-cells = <2>;
  464. device_type = "pci";
  465. + dma-coherent;
  466. num-lanes = <4>;
  467. bus-range = <0x0 0xff>;
  468. ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */
  469. 0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
  470. - msi-parent = <&msi1>;
  471. + msi-parent = <&msi>;
  472. #interrupt-cells = <1>;
  473. interrupt-map-mask = <0 0 0 7>;
  474. interrupt-map = <0000 0 0 1 &gic 0 110 0x4>,
  475. @@ -850,15 +932,16 @@
  476. reg-names = "regs", "config";
  477. interrupts = <0 128 0x4>,
  478. <0 127 0x4>;
  479. - interrupt-names = "intr", "pme";
  480. + interrupt-names = "aer";
  481. #address-cells = <3>;
  482. #size-cells = <2>;
  483. device_type = "pci";
  484. + dma-coherent;
  485. num-lanes = <2>;
  486. bus-range = <0x0 0xff>;
  487. ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000 /* downstream I/O */
  488. 0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
  489. - msi-parent = <&msi2>;
  490. + msi-parent = <&msi>;
  491. #interrupt-cells = <1>;
  492. interrupt-map-mask = <0 0 0 7>;
  493. interrupt-map = <0000 0 0 1 &gic 0 120 0x4>,
  494. @@ -874,15 +957,16 @@
  495. reg-names = "regs", "config";
  496. interrupts = <0 162 0x4>,
  497. <0 161 0x4>;
  498. - interrupt-names = "intr", "pme";
  499. + interrupt-names = "aer";
  500. #address-cells = <3>;
  501. #size-cells = <2>;
  502. device_type = "pci";
  503. + dma-coherent;
  504. num-lanes = <2>;
  505. bus-range = <0x0 0xff>;
  506. ranges = <0x81000000 0x0 0x00000000 0x50 0x00010000 0x0 0x00010000 /* downstream I/O */
  507. 0x82000000 0x0 0x40000000 0x50 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
  508. - msi-parent = <&msi3>;
  509. + msi-parent = <&msi>;
  510. #interrupt-cells = <1>;
  511. interrupt-map-mask = <0 0 0 7>;
  512. interrupt-map = <0000 0 0 1 &gic 0 154 0x4>,
  513. @@ -894,14 +978,6 @@
  514. fsl,dpaa {
  515. compatible = "fsl,ls1046a-dpaa", "simple-bus", "fsl,dpaa";
  516. - ethernet@0 {
  517. - compatible = "fsl,dpa-ethernet";
  518. - fsl,fman-mac = <&fm1mac1>;
  519. - };
  520. - ethernet@1 {
  521. - compatible = "fsl,dpa-ethernet";
  522. - fsl,fman-mac = <&fm1mac2>;
  523. - };
  524. ethernet@2 {
  525. compatible = "fsl,dpa-ethernet";
  526. fsl,fman-mac = <&fm1mac3>;
  527. @@ -922,6 +998,10 @@
  528. compatible = "fsl,dpa-ethernet";
  529. fsl,fman-mac = <&fm1mac9>;
  530. };
  531. + ethernet@9 {
  532. + compatible = "fsl,dpa-ethernet";
  533. + fsl,fman-mac = <&fm1mac10>;
  534. + };
  535. };
  536. qportals: qman-portals@500000000 {