armada-370-c200-v2.dts 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
  2. /*
  3. * Device Tree file for Ctera C200-V2
  4. *
  5. * Copyright (C) 2021 Pawel Dembicki <[email protected]>
  6. */
  7. /dts-v1/;
  8. #include "armada-370.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/input.h>
  11. #include <dt-bindings/thermal/thermal.h>
  12. #include <dt-bindings/leds/common.h>
  13. / {
  14. model = "Ctera C200 V2";
  15. compatible = "ctera,c200-v2", "marvell,armada370", "marvell,armada-370-xp";
  16. aliases {
  17. led-boot = &led_status_green;
  18. led-failsafe = &led_status_red;
  19. led-running = &led_status_green;
  20. led-upgrade = &led_status_red;
  21. };
  22. chosen {
  23. bootargs = "console=ttyS0,115200";
  24. stdout-path = "serial0:115200n8";
  25. };
  26. memory {
  27. device_type = "memory";
  28. reg = <0x00000000 0x40000000>; /* 1024 MB */
  29. };
  30. soc {
  31. ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
  32. MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
  33. MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
  34. };
  35. thermal-zones {
  36. ethphy-thermal {
  37. polling-delay = <20000>;
  38. polling-delay-passive = <2000>;
  39. thermal-sensors = <&ethphy0>;
  40. trips {
  41. ethphy_alert1: trip1 {
  42. temperature = <65000>;
  43. hysteresis = <4000>;
  44. type = "passive";
  45. };
  46. ethphy_crit: trip2 {
  47. temperature = <100000>;
  48. hysteresis = <2000>;
  49. type = "critical";
  50. };
  51. };
  52. };
  53. };
  54. keys {
  55. compatible = "gpio-keys";
  56. pinctrl-0 = <&pmx_buttons>;
  57. pinctrl-names = "default";
  58. power {
  59. label = "Power Button";
  60. linux,code = <KEY_POWER>;
  61. gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
  62. };
  63. reset {
  64. label = "Reset Button";
  65. linux,code = <KEY_RESTART>;
  66. gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
  67. };
  68. usb1 {
  69. label = "USB1 Button";
  70. linux,code = <BTN_0>;
  71. gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
  72. };
  73. usb2 {
  74. label = "USB2 Button";
  75. linux,code = <BTN_1>;
  76. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  77. };
  78. };
  79. gpio-poweroff {
  80. compatible = "gpio-poweroff";
  81. pinctrl-0 = <&pmx_poweroff>;
  82. pinctrl-names = "default";
  83. gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
  84. };
  85. leds {
  86. compatible = "gpio-leds";
  87. pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
  88. pinctrl-names = "default";
  89. led-0 {
  90. function = LED_FUNCTION_USB;
  91. function-enumerator = <2>;
  92. color = <LED_COLOR_ID_RED>;
  93. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  94. };
  95. led-1 {
  96. function = LED_FUNCTION_USB;
  97. function-enumerator = <2>;
  98. color = <LED_COLOR_ID_GREEN>;
  99. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  100. linux,default-trigger = "usbport";
  101. trigger-sources = <&usb1_port 1>, <&usb2_port 1>;
  102. };
  103. led-2 {
  104. function = LED_FUNCTION_USB;
  105. function-enumerator = <1>;
  106. color = <LED_COLOR_ID_RED>;
  107. gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  108. };
  109. led-3 {
  110. function = LED_FUNCTION_USB;
  111. function-enumerator = <1>;
  112. color = <LED_COLOR_ID_GREEN>;
  113. gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
  114. linux,default-trigger = "usbport";
  115. trigger-sources = <&usb1_port 2>, <&usb2_port 2>;
  116. };
  117. led-4 {
  118. function = LED_FUNCTION_DISK;
  119. function-enumerator = <2>;
  120. color = <LED_COLOR_ID_GREEN>;
  121. gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
  122. linux,default-trigger = "ata2";
  123. };
  124. led-5 {
  125. function = LED_FUNCTION_DISK;
  126. function-enumerator = <1>;
  127. color = <LED_COLOR_ID_RED>;
  128. gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
  129. };
  130. led-6 {
  131. function = LED_FUNCTION_DISK;
  132. function-enumerator = <2>;
  133. color = <LED_COLOR_ID_RED>;
  134. gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
  135. };
  136. led-7 {
  137. function = LED_FUNCTION_INDICATOR;
  138. color = <LED_COLOR_ID_BLUE>;
  139. gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
  140. };
  141. led-8 {
  142. function = LED_FUNCTION_DISK_ERR;
  143. color = <LED_COLOR_ID_RED>;
  144. gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
  145. };
  146. led-9 {
  147. function = LED_FUNCTION_DISK_ERR;
  148. color = <LED_COLOR_ID_GREEN>;
  149. gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
  150. };
  151. led_status_red: led-10 {
  152. function = LED_FUNCTION_STATUS;
  153. color = <LED_COLOR_ID_RED>;
  154. gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
  155. };
  156. led-11 {
  157. function = LED_FUNCTION_DISK;
  158. function-enumerator = <1>;
  159. color = <LED_COLOR_ID_GREEN>;
  160. gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
  161. linux,default-trigger = "ata1";
  162. };
  163. led_status_green: led-12 {
  164. function = LED_FUNCTION_STATUS;
  165. color = <LED_COLOR_ID_GREEN>;
  166. gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
  167. };
  168. };
  169. };
  170. &coherencyfab {
  171. broken-idle;
  172. };
  173. &eth1 {
  174. pinctrl-0 = <&ge1_rgmii_pins>;
  175. pinctrl-names = "default";
  176. status = "okay";
  177. phy-handle = <&ethphy0>;
  178. phy-connection-type = "rgmii-id";
  179. };
  180. &i2c0 {
  181. pinctrl-0 = <&i2c0_pins>;
  182. pinctrl-names = "default";
  183. clock-frequency = <100000>;
  184. status = "okay";
  185. hwmon@2a {
  186. compatible = "nuvoton,nct7802";
  187. reg = <0x2a>;
  188. };
  189. rtc@30 {
  190. compatible = "sii,s35390a";
  191. reg = <0x30>;
  192. };
  193. };
  194. &mdio {
  195. pinctrl-0 = <&mdio_pins>;
  196. pinctrl-names = "default";
  197. ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
  198. reg = <0>;
  199. #thermal-sensor-cells = <0>;
  200. };
  201. };
  202. &nand_controller {
  203. status = "okay";
  204. nand@0 {
  205. reg = <0>;
  206. label = "pxa3xx_nand-0";
  207. nand-rb = <0>;
  208. marvell,nand-keep-config;
  209. nand-on-flash-bbt;
  210. nand-ecc-strength = <4>;
  211. nand-ecc-step-size = <512>;
  212. partitions {
  213. compatible = "fixed-partitions";
  214. #address-cells = <1>;
  215. #size-cells = <1>;
  216. partition@0 {
  217. label = "uboot";
  218. reg = <0x0000000 0x200000>;
  219. read-only;
  220. };
  221. partition@200000 {
  222. label = "certificate";
  223. reg = <0x0200000 0x100000>;
  224. read-only;
  225. };
  226. partition@300000 {
  227. label = "preset_cfg";
  228. reg = <0x0300000 0x100000>;
  229. read-only;
  230. };
  231. partition@400000 {
  232. label = "dev_params";
  233. reg = <0x0400000 0x100000>;
  234. read-only;
  235. };
  236. partition@500000 {
  237. label = "active_bank";
  238. reg = <0x0500000 0x0100000>;
  239. };
  240. partition@600000 {
  241. label = "magic";
  242. reg = <0x0600000 0x0100000>;
  243. read-only;
  244. };
  245. partition@700000 {
  246. label = "bank1";
  247. reg = <0x0700000 0x2800000>;
  248. };
  249. partition@2f00000 {
  250. label = "bank2";
  251. reg = <0x2f00000 0x2800000>;
  252. };
  253. /* 0x5700000-0x5a00000 undefined in vendor firmware */
  254. partition@5a00000 {
  255. label = "reserved";
  256. reg = <0x5a00000 0x2000000>;
  257. };
  258. partition@7a00000 {
  259. label = "ubi";
  260. reg = <0x7a00000 0x8600000>;
  261. };
  262. };
  263. };
  264. };
  265. &pciec {
  266. status = "okay";
  267. pcie@1,0 {
  268. pinctrl-0 = <&pmx_pcie>;
  269. pinctrl-names = "default";
  270. status = "okay";
  271. reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
  272. /* -[0000:00]---01.0-[01]----00.0 */
  273. /* usbport trigger won't work */
  274. bridge@0,1 {
  275. compatible = "pci11ab,6710";
  276. reg = <0x3800 0 0 0 0>;
  277. #address-cells = <3>;
  278. #size-cells = <2>;
  279. usb@1,0 {
  280. /* Renesas uPD720202 */
  281. compatible = "pci1912,0015";
  282. reg = <0x1000 0 0 0 0>;
  283. #address-cells = <3>;
  284. #size-cells = <2>;
  285. usb1_port: port@1 {
  286. reg = <1>;
  287. #trigger-source-cells = <1>;
  288. };
  289. usb2_port: port@2 {
  290. reg = <2>;
  291. #trigger-source-cells = <1>;
  292. };
  293. };
  294. };
  295. };
  296. };
  297. &pinctrl {
  298. pmx_poweroff: pmx-poweroff {
  299. marvell,pins = "mpp7";
  300. marvell,function = "gpo";
  301. };
  302. pmx_power_cpu: pmx-power-cpu {
  303. marvell,pins = "mpp4";
  304. marvell,function = "vdd";
  305. };
  306. pmx_buttons: pmx-buttons {
  307. marvell,pins = "mpp6", "mpp10", "mpp14", "mpp32";
  308. marvell,function = "gpio";
  309. };
  310. pmx_leds1: pmx-leds1 {
  311. marvell,pins = "mpp47";
  312. marvell,function = "gpo";
  313. };
  314. pmx_leds2: pmx-leds2 {
  315. marvell,pins = "mpp12", "mpp13", "mpp15", "mpp16", "mpp50", "mpp51",
  316. "mpp52", "mpp53", "mpp55", "mpp56", "mpp57", "mpp58";
  317. marvell,function = "gpio";
  318. };
  319. pmx_pcie: pmx-pcie {
  320. marvell,pins = "mpp59";
  321. marvell,function = "gpio";
  322. };
  323. /* this gpio is connected to the pin of buzzer
  324. * leave it as is due lack of proper driver
  325. */
  326. pmx_buzzer: pmx-buzzer {
  327. marvell,pins = "mpp63";
  328. marvell,function = "gpio";
  329. };
  330. };
  331. &pmsu {
  332. pinctrl-0 = <&pmx_power_cpu>;
  333. pinctrl-names = "default";
  334. };
  335. &rtc {
  336. status = "disabled";
  337. };
  338. &sata {
  339. nr-ports = <2>;
  340. status = "okay";
  341. #address-cells = <1>;
  342. #size-cells = <0>;
  343. hdd0_temp: sata-port@0 {
  344. reg = <0>;
  345. #thermal-sensor-cells = <0>;
  346. };
  347. hdd1_temp: sata-port@1 {
  348. reg = <1>;
  349. #thermal-sensor-cells = <0>;
  350. };
  351. };
  352. &uart0 {
  353. status = "okay";
  354. };