cn9131-puzzle-m901.dts 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
  2. /*
  3. * Copyright (C) 2019 Marvell International Ltd.
  4. *
  5. * Device tree for the CN9131-DB board.
  6. */
  7. #include "cn9130.dtsi"
  8. #include "puzzle-thermal.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. / {
  12. model = "iEi Puzzle-M901";
  13. compatible = "iei,puzzle-m901",
  14. "marvell,armada-ap807-quad", "marvell,armada-ap807";
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. aliases {
  19. i2c0 = &cp1_i2c0;
  20. i2c1 = &cp0_i2c0;
  21. ethernet0 = &cp0_eth0;
  22. ethernet1 = &cp0_eth1;
  23. ethernet2 = &cp0_eth2;
  24. ethernet3 = &cp1_eth0;
  25. ethernet4 = &cp1_eth1;
  26. ethernet5 = &cp1_eth2;
  27. gpio1 = &cp0_gpio1;
  28. gpio2 = &cp0_gpio2;
  29. gpio3 = &cp1_gpio1;
  30. gpio4 = &cp1_gpio2;
  31. led-boot = &led_power;
  32. led-failsafe = &led_info;
  33. led-running = &led_power;
  34. led-upgrade = &led_info;
  35. };
  36. memory@00000000 {
  37. device_type = "memory";
  38. reg = <0x0 0x0 0x0 0x80000000>;
  39. };
  40. gpio_keys {
  41. compatible = "gpio-keys";
  42. reset {
  43. label = "Reset";
  44. linux,code = <KEY_RESTART>;
  45. gpios = <&cp0_gpio2 4 GPIO_ACTIVE_LOW>;
  46. };
  47. };
  48. };
  49. &uart0 {
  50. status = "okay";
  51. };
  52. &cp0_uart0 {
  53. status = "okay";
  54. puzzle-mcu {
  55. compatible = "iei,wt61p803-puzzle";
  56. #address-cells = <1>;
  57. #size-cells = <1>;
  58. current-speed = <115200>;
  59. enable-beep;
  60. status = "okay";
  61. leds {
  62. compatible = "iei,wt61p803-puzzle-leds";
  63. #address-cells = <1>;
  64. #size-cells = <0>;
  65. status = "okay";
  66. led@0 {
  67. reg = <0>;
  68. label = "white:network";
  69. active-low;
  70. };
  71. led@1 {
  72. reg = <1>;
  73. label = "green:cloud";
  74. active-low;
  75. };
  76. led_info: led@2 {
  77. reg = <2>;
  78. label = "orange:info";
  79. active-low;
  80. };
  81. led_power: led@3 {
  82. reg = <3>;
  83. label = "yellow:power";
  84. active-low;
  85. default-state = "on";
  86. };
  87. };
  88. hwmon {
  89. compatible = "iei,wt61p803-puzzle-hwmon";
  90. #address-cells = <1>;
  91. #size-cells = <0>;
  92. chassis_fan_group0: fan-group@0 {
  93. #cooling-cells = <2>;
  94. reg = <0x00>;
  95. cooling-levels = <80 102 170 230 255>;
  96. };
  97. };
  98. };
  99. };
  100. &ap_thermal_ic {
  101. PUZZLE_FAN_THERMAL(ic, &chassis_fan_group0);
  102. };
  103. &cp0_thermal_ic {
  104. PUZZLE_FAN_THERMAL(cp0, &chassis_fan_group0);
  105. };
  106. /* on-board eMMC - U9 */
  107. &ap_sdhci0 {
  108. pinctrl-names = "default";
  109. bus-width = <8>;
  110. status = "okay";
  111. mmc-ddr-1_8v;
  112. mmc-hs400-1_8v;
  113. };
  114. &cp0_crypto {
  115. status = "okay";
  116. };
  117. &cp0_xmdio {
  118. status = "okay";
  119. cp0_nbaset_phy0: ethernet-phy@0 {
  120. compatible = "ethernet-phy-ieee802.3-c45";
  121. reg = <2>;
  122. };
  123. cp0_nbaset_phy1: ethernet-phy@1 {
  124. compatible = "ethernet-phy-ieee802.3-c45";
  125. reg = <0>;
  126. };
  127. cp0_nbaset_phy2: ethernet-phy@2 {
  128. compatible = "ethernet-phy-ieee802.3-c45";
  129. reg = <8>;
  130. };
  131. };
  132. &cp0_ethernet {
  133. status = "okay";
  134. };
  135. /* SLM-1521-V2, CON9 */
  136. &cp0_eth0 {
  137. status = "okay";
  138. phy-mode = "2500base-x";
  139. phys = <&cp0_comphy2 0>;
  140. phy = <&cp0_nbaset_phy0>;
  141. };
  142. &cp0_eth1 {
  143. status = "okay";
  144. phy-mode = "2500base-x";
  145. phys = <&cp0_comphy4 1>;
  146. phy = <&cp0_nbaset_phy1>;
  147. };
  148. &cp0_eth2 {
  149. status = "okay";
  150. phy-mode = "2500base-x";
  151. phys = <&cp0_comphy5 2>;
  152. phy = <&cp0_nbaset_phy2>;
  153. };
  154. &cp0_gpio1 {
  155. status = "okay";
  156. };
  157. &cp0_gpio2 {
  158. status = "okay";
  159. };
  160. &cp0_i2c0 {
  161. pinctrl-names = "default";
  162. pinctrl-0 = <&cp0_i2c0_pins>;
  163. status = "okay";
  164. clock-frequency = <100000>;
  165. rtc@32 {
  166. compatible = "epson,rx8130";
  167. reg = <0x32>;
  168. wakeup-source;
  169. };
  170. };
  171. /* SLM-1521-V2, CON6 */
  172. &cp0_pcie0 {
  173. status = "okay";
  174. num-lanes = <2>;
  175. num-viewport = <8>;
  176. phys = <&cp0_comphy0 0>, <&cp0_comphy1 0>;
  177. };
  178. /* U55 */
  179. &cp0_spi1 {
  180. pinctrl-names = "default";
  181. pinctrl-0 = <&cp0_spi0_pins>;
  182. reg = <0x700680 0x50>, /* control */
  183. <0x2000000 0x1000000>; /* CS0 */
  184. status = "okay";
  185. spi-flash@0 {
  186. #address-cells = <0x1>;
  187. #size-cells = <0x1>;
  188. compatible = "jedec,spi-nor";
  189. reg = <0x0>;
  190. spi-max-frequency = <40000000>;
  191. partitions {
  192. compatible = "fixed-partitions";
  193. #address-cells = <1>;
  194. #size-cells = <1>;
  195. partition@0 {
  196. label = "U-Boot";
  197. reg = <0x0 0x1f0000>;
  198. };
  199. partition@1f0000 {
  200. label = "U-Boot ENV Factory";
  201. reg = <0x1f0000 0x10000>;
  202. };
  203. partition@200000 {
  204. label = "Reserved";
  205. reg = <0x200000 0x1f0000>;
  206. };
  207. partition@3f0000 {
  208. label = "U-Boot ENV";
  209. reg = <0x3f0000 0x10000>;
  210. };
  211. };
  212. };
  213. };
  214. &cp0_syscon0 {
  215. cp0_pinctrl: pinctrl {
  216. compatible = "marvell,cp115-standalone-pinctrl";
  217. cp0_i2c0_pins: cp0-i2c-pins-0 {
  218. marvell,pins = "mpp37", "mpp38";
  219. marvell,function = "i2c0";
  220. };
  221. cp0_i2c1_pins: cp0-i2c-pins-1 {
  222. marvell,pins = "mpp35", "mpp36";
  223. marvell,function = "i2c1";
  224. };
  225. cp0_ge1_rgmii_pins: cp0-ge-rgmii-pins-0 {
  226. marvell,pins = "mpp0", "mpp1", "mpp2",
  227. "mpp3", "mpp4", "mpp5",
  228. "mpp6", "mpp7", "mpp8",
  229. "mpp9", "mpp10", "mpp11";
  230. marvell,function = "ge0";
  231. };
  232. cp0_ge2_rgmii_pins: cp0-ge-rgmii-pins-1 {
  233. marvell,pins = "mpp44", "mpp45", "mpp46",
  234. "mpp47", "mpp48", "mpp49",
  235. "mpp50", "mpp51", "mpp52",
  236. "mpp53", "mpp54", "mpp55";
  237. marvell,function = "ge1";
  238. };
  239. cp0_spi0_pins: cp0-spi-pins-0 {
  240. marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
  241. marvell,function = "spi1";
  242. };
  243. };
  244. };
  245. /*
  246. * Instantiate the first connected CP115
  247. */
  248. #define CP11X_NAME cp1
  249. #define CP11X_BASE f6000000
  250. #define CP11X_PCIEx_MEM_BASE(iface) (0xe2000000 + (iface * 0x1000000))
  251. #define CP11X_PCIEx_MEM_SIZE(iface) 0xf00000
  252. #define CP11X_PCIE0_BASE f6600000
  253. #define CP11X_PCIE1_BASE f6620000
  254. #define CP11X_PCIE2_BASE f6640000
  255. #include "armada-cp115.dtsi"
  256. #undef CP11X_NAME
  257. #undef CP11X_BASE
  258. #undef CP11X_PCIEx_MEM_BASE
  259. #undef CP11X_PCIEx_MEM_SIZE
  260. #undef CP11X_PCIE0_BASE
  261. #undef CP11X_PCIE1_BASE
  262. #undef CP11X_PCIE2_BASE
  263. &cp1_crypto {
  264. status = "okay";
  265. };
  266. &cp1_xmdio {
  267. status = "okay";
  268. cp1_nbaset_phy0: ethernet-phy@3 {
  269. compatible = "ethernet-phy-ieee802.3-c45";
  270. reg = <2>;
  271. };
  272. cp1_nbaset_phy1: ethernet-phy@4 {
  273. compatible = "ethernet-phy-ieee802.3-c45";
  274. reg = <0>;
  275. };
  276. cp1_nbaset_phy2: ethernet-phy@5 {
  277. compatible = "ethernet-phy-ieee802.3-c45";
  278. reg = <8>;
  279. };
  280. };
  281. &cp1_ethernet {
  282. status = "okay";
  283. };
  284. /* CON50 */
  285. &cp1_eth0 {
  286. status = "okay";
  287. phy-mode = "2500base-x";
  288. phys = <&cp1_comphy2 0>;
  289. phy = <&cp1_nbaset_phy0>;
  290. };
  291. &cp1_eth1 {
  292. status = "okay";
  293. phy-mode = "2500base-x";
  294. phys = <&cp1_comphy4 1>;
  295. phy = <&cp1_nbaset_phy1>;
  296. };
  297. &cp1_eth2 {
  298. status = "okay";
  299. phy-mode = "2500base-x";
  300. phys = <&cp1_comphy5 2>;
  301. phy = <&cp1_nbaset_phy2>;
  302. };
  303. &cp1_sata0 {
  304. status = "okay";
  305. sata-port@1 {
  306. status = "okay";
  307. phys = <&cp1_comphy0 1>;
  308. };
  309. };
  310. &cp1_gpio1 {
  311. status = "okay";
  312. };
  313. &cp1_gpio2 {
  314. status = "okay";
  315. };
  316. &cp1_i2c0 {
  317. status = "okay";
  318. pinctrl-names = "default";
  319. pinctrl-0 = <&cp1_i2c0_pins>;
  320. clock-frequency = <100000>;
  321. };
  322. &cp1_syscon0 {
  323. cp1_pinctrl: pinctrl {
  324. compatible = "marvell,cp115-standalone-pinctrl";
  325. cp1_i2c0_pins: cp1-i2c-pins-0 {
  326. marvell,pins = "mpp37", "mpp38";
  327. marvell,function = "i2c0";
  328. };
  329. cp1_spi0_pins: cp1-spi-pins-0 {
  330. marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
  331. marvell,function = "spi1";
  332. };
  333. cp1_xhci0_vbus_pins: cp1-xhci0-vbus-pins {
  334. marvell,pins = "mpp3";
  335. marvell,function = "gpio";
  336. };
  337. cp1_sfp_pins: sfp-pins {
  338. marvell,pins = "mpp8", "mpp9", "mpp10", "mpp11";
  339. marvell,function = "gpio";
  340. };
  341. };
  342. };
  343. &cp1_thermal_ic {
  344. PUZZLE_FAN_THERMAL(cp1, &chassis_fan_group0);
  345. };
  346. &cp1_usb3_1 {
  347. status = "okay";
  348. phys = <&cp1_comphy3 1>;
  349. phy-names = "usb";
  350. };