armada-370-buffalo-ls421de.dts 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
  2. /*
  3. * Device Tree file for Buffalo LinkStation LS421DE
  4. *
  5. * Copyright (C) 2020 Daniel González Cabanelas <[email protected]>
  6. */
  7. /dts-v1/;
  8. #include "armada-370.dtsi"
  9. #include "mvebu-linkstation-fan.dtsi"
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include <dt-bindings/input/input.h>
  12. #include <dt-bindings/thermal/thermal.h>
  13. / {
  14. model = "Buffalo LinkStation LS421DE";
  15. compatible = "buffalo,ls421de", "marvell,armada370", "marvell,armada-370-xp";
  16. aliases {
  17. led-boot = &led_boot;
  18. led-failsafe = &led_failsafe;
  19. led-running = &led_power;
  20. led-upgrade = &led_upgrade;
  21. };
  22. chosen {
  23. bootargs = "earlycon";
  24. stdout-path = "serial0:115200n8";
  25. append-rootblock = "nullparameter="; /* override the bootloader args */
  26. };
  27. memory {
  28. device_type = "memory";
  29. reg = <0x00000000 0x20000000>; /* 512 MB */
  30. };
  31. soc {
  32. ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
  33. MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
  34. MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
  35. };
  36. system_fan: gpio_fan {
  37. gpios = <&gpio0 13 GPIO_ACTIVE_HIGH
  38. &gpio0 14 GPIO_ACTIVE_HIGH>;
  39. alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
  40. #cooling-cells = <2>;
  41. };
  42. thermal-zones {
  43. hdd-thermal {
  44. polling-delay = <20000>;
  45. polling-delay-passive = <2000>;
  46. thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */
  47. trips {
  48. hdd_alert1: trip1 {
  49. temperature = <36000>;
  50. hysteresis = <2000>;
  51. type = "active";
  52. };
  53. hdd_alert2: trip2 {
  54. temperature = <44000>;
  55. hysteresis = <2000>;
  56. type = "active";
  57. };
  58. hdd_alert3: trip3 {
  59. temperature = <52000>;
  60. hysteresis = <2000>;
  61. type = "passive";
  62. };
  63. hdd_crit: trip4 {
  64. temperature = <60000>;
  65. hysteresis = <2000>;
  66. type = "critical";
  67. };
  68. };
  69. cooling-maps {
  70. map1 {
  71. trip = <&hdd_alert1>;
  72. cooling-device = <&system_fan THERMAL_NO_LIMIT 1>;
  73. };
  74. map2 {
  75. trip = <&hdd_alert2>;
  76. cooling-device = <&system_fan 2 2>;
  77. };
  78. map3 {
  79. trip = <&hdd_alert3>;
  80. cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>;
  81. };
  82. };
  83. };
  84. ethphy-thermal {
  85. polling-delay = <20000>;
  86. polling-delay-passive = <2000>;
  87. thermal-sensors = <&ethphy0>;
  88. trips {
  89. ethphy_alert1: trip1 {
  90. temperature = <65000>;
  91. hysteresis = <4000>;
  92. type = "passive";
  93. };
  94. ethphy_crit: trip2 {
  95. temperature = <100000>;
  96. hysteresis = <2000>;
  97. type = "critical";
  98. };
  99. };
  100. cooling-maps {
  101. map1 {
  102. trip = <&ethphy_alert1>;
  103. cooling-device = <&system_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  104. };
  105. };
  106. };
  107. };
  108. gpio_keys {
  109. compatible = "gpio-keys";
  110. pinctrl-0 = <&pmx_buttons>;
  111. pinctrl-names = "default";
  112. power {
  113. label = "Power Switch";
  114. linux,code = <KEY_POWER>;
  115. linux,input-type = <EV_SW>;
  116. gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  117. };
  118. function {
  119. label = "Function Button";
  120. linux,code = <KEY_CONFIG>;
  121. gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
  122. };
  123. };
  124. gpio_leds {
  125. compatible = "gpio-leds";
  126. pinctrl-names = "default";
  127. pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
  128. system_red {
  129. label = "ls421de:red:system";
  130. gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
  131. };
  132. led_power: power_white {
  133. label = "ls421de:white:power";
  134. gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
  135. default-state = "on";
  136. };
  137. led_failsafe: power_red {
  138. label = "ls421de:red:power";
  139. gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
  140. };
  141. led_upgrade: power_orange {
  142. label = "ls421de:orange:power";
  143. gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
  144. };
  145. led_boot: system_white {
  146. label = "ls421de:white:system";
  147. gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
  148. };
  149. hdd1_red {
  150. label = "ls421de:red:hdd1";
  151. gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
  152. linux,default-trigger = "ata1";
  153. };
  154. hdd2_red {
  155. label = "ls421de:red:hdd2";
  156. gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
  157. linux,default-trigger = "ata2";
  158. };
  159. };
  160. regulators {
  161. compatible = "simple-bus";
  162. #address-cells = <1>;
  163. #size-cells = <0>;
  164. pinctrl-0 = <&pmx_power_usb &pmx_power_hdd1 &pmx_power_hdd2>;
  165. pinctrl-names = "default";
  166. usb_power: regulator@0 {
  167. compatible = "regulator-fixed";
  168. reg = <0>;
  169. regulator-name = "USB";
  170. regulator-min-microvolt = <5000000>;
  171. regulator-max-microvolt = <5000000>;
  172. enable-active-high;
  173. regulator-always-on;
  174. regulator-boot-on;
  175. gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
  176. };
  177. sata1_power: regulator@1 {
  178. compatible = "regulator-fixed";
  179. reg = <1>;
  180. regulator-name = "HDD1";
  181. regulator-min-microvolt = <12000000>;
  182. regulator-max-microvolt = <12000000>;
  183. startup-delay-us = <2000000>;
  184. enable-active-high;
  185. regulator-always-on;
  186. regulator-boot-on;
  187. gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
  188. };
  189. sata2_power: regulator@2 {
  190. compatible = "regulator-fixed";
  191. reg = <2>;
  192. regulator-name = "HDD2";
  193. regulator-min-microvolt = <12000000>;
  194. regulator-max-microvolt = <12000000>;
  195. startup-delay-us = <4000000>;
  196. enable-active-high;
  197. regulator-always-on;
  198. regulator-boot-on;
  199. gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  200. };
  201. };
  202. };
  203. &coherencyfab {
  204. broken-idle;
  205. };
  206. &eth1 {
  207. pinctrl-0 = <&ge1_rgmii_pins>;
  208. pinctrl-names = "default";
  209. status = "okay";
  210. phy-handle = <&ethphy0>;
  211. phy-connection-type = "rgmii-id";
  212. };
  213. &i2c0 {
  214. pinctrl-0 = <&i2c0_pins>;
  215. pinctrl-names = "default";
  216. clock-frequency = <100000>;
  217. status = "okay";
  218. rs5c372a: rs5c372a@32 {
  219. compatible = "ricoh,rs5c372a";
  220. reg = <0x32>;
  221. wakeup-source;
  222. };
  223. };
  224. &mdio {
  225. pinctrl-0 = <&mdio_pins>;
  226. pinctrl-names = "default";
  227. ethphy0: ethernet-phy@0 { /* Marvell 88E1518 */
  228. reg = <0>;
  229. marvell,reg-init = <0x2 0x10 0xffff 0x0006>, /* disable CLK125 */
  230. <0x3 0x10 0x0000 0x1991>, /* LED function */
  231. <0x3 0x11 0x0000 0x4401>, /* LED polarity */
  232. <0x3 0x12 0x0000 0x4905>; /* LED timer */
  233. #thermal-sensor-cells = <0>;
  234. };
  235. };
  236. &pciec {
  237. status = "okay";
  238. pinctrl-0 = <&pmx_pcie>;
  239. pinctrl-names = "default";
  240. /* Connected to uPD720202 USB 3.0 Host */
  241. pcie@1,0 {
  242. status = "okay";
  243. };
  244. };
  245. &pmsu {
  246. pinctrl-0 = <&pmx_power_cpu>;
  247. pinctrl-names = "default";
  248. };
  249. &rtc {
  250. status = "disabled";
  251. };
  252. &sata {
  253. nr-ports = <2>;
  254. status = "okay";
  255. #address-cells = <1>;
  256. #size-cells = <0>;
  257. hdd0_temp: sata-port@0 {
  258. reg = <0>;
  259. #thermal-sensor-cells = <0>;
  260. };
  261. hdd1_temp: sata-port@1 {
  262. reg = <1>;
  263. #thermal-sensor-cells = <0>;
  264. };
  265. };
  266. &sdio {
  267. pinctrl-0 = <&sdio_pins2>;
  268. pinctrl-names = "default";
  269. status = "okay";
  270. /* No CD or WP GPIOs */
  271. broken-cd;
  272. };
  273. &uart0 {
  274. status = "okay";
  275. };
  276. &usb0 {
  277. status = "okay";
  278. };
  279. &nand_controller {
  280. status = "okay";
  281. nand@0 {
  282. reg = <0>;
  283. label = "pxa3xx_nand-0";
  284. nand-rb = <0>;
  285. marvell,nand-keep-config;
  286. nand-on-flash-bbt;
  287. nand-ecc-strength = <4>;
  288. nand-ecc-step-size = <512>;
  289. partitions {
  290. compatible = "fixed-partitions";
  291. #address-cells = <1>;
  292. #size-cells = <1>;
  293. partition@0 {
  294. label = "kernel";
  295. reg = <0x00000000 0x02000000>; /* 32 MiB */
  296. };
  297. partition@2000000 {
  298. label = "ubi";
  299. reg = <0x02000000 0x1e000000>; /* 480 MiB */
  300. };
  301. };
  302. };
  303. };
  304. &spi0 {
  305. status = "okay";
  306. pinctrl-0 = <&spi0_pins2>;
  307. pinctrl-names = "default";
  308. spi-flash@0 {
  309. compatible = "mxicy,mx25l8005", "jedec,spi-nor";
  310. reg = <0>; /* Chip select 0 */
  311. spi-max-frequency = <50000000>;
  312. partitions {
  313. compatible = "fixed-partitions";
  314. #address-cells = <1>;
  315. #size-cells = <1>;
  316. partition@0 {
  317. reg = <0x00000 0xf0000>; /* 960 KiB*/
  318. label = "u-boot";
  319. read-only;
  320. };
  321. partition@f0000 {
  322. reg = <0xf0000 0x10000>; /* 64 KiB */
  323. label = "u-boot-env";
  324. };
  325. };
  326. };
  327. };
  328. &pinctrl {
  329. pmx_power_cpu: pmx-power-cpu {
  330. marvell,pins = "mpp4";
  331. marvell,function = "vdd";
  332. };
  333. pmx_power_usb: pmx-power-usb {
  334. marvell,pins = "mpp5";
  335. marvell,function = "gpo";
  336. };
  337. pmx_power_hdd1: pmx-power-hdd1 {
  338. marvell,pins = "mpp8";
  339. marvell,function = "gpio";
  340. };
  341. pmx_power_hdd2: pmx-power-hdd2 {
  342. marvell,pins = "mpp9";
  343. marvell,function = "gpo";
  344. };
  345. pmx_fan_lock: pmx-fan-lock {
  346. marvell,pins = "mpp10";
  347. marvell,function = "gpio";
  348. };
  349. pmx_hdd_present: pmx-hdd-present {
  350. marvell,pins = "mpp11", "mpp12";
  351. marvell,function = "gpio";
  352. };
  353. pmx_fan_high: pmx-fan-high {
  354. marvell,pins = "mpp13";
  355. marvell,function = "gpio";
  356. };
  357. pmx_fan_low: pmx-fan-low {
  358. marvell,pins = "mpp14";
  359. marvell,function = "gpio";
  360. };
  361. pmx_buttons: pmx-buttons {
  362. marvell,pins = "mpp15", "mpp16";
  363. marvell,function = "gpio";
  364. };
  365. pmx_leds1: pmx-leds {
  366. marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
  367. marvell,function = "gpo";
  368. };
  369. pmx_leds2: pmx-leds {
  370. marvell,pins = "mpp55", "mpp57", "mpp62";
  371. marvell,function = "gpio";
  372. };
  373. pmx_pcie: pmx-pcie {
  374. marvell,pins = "mpp56", "mpp60";
  375. marvell,function = "pcie";
  376. };
  377. };