armada-370-buffalo-ls220de.dts 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. // SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
  2. /*
  3. * Device Tree file for Buffalo LinkStation LS220DE
  4. *
  5. * Copyright (C) 2023 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/leds/common.h>
  13. #include <dt-bindings/thermal/thermal.h>
  14. / {
  15. model = "Buffalo LinkStation LS220DE";
  16. compatible = "buffalo,ls220de", "marvell,armada370", "marvell,armada-370-xp";
  17. aliases {
  18. led-boot = &led_boot;
  19. led-failsafe = &led_failsafe;
  20. led-running = &led_power;
  21. led-upgrade = &led_upgrade;
  22. };
  23. chosen {
  24. bootargs = "earlycon";
  25. stdout-path = "serial0:115200n8";
  26. append-rootblock = "nullparameter="; /* override the bootloader args */
  27. };
  28. memory {
  29. device_type = "memory";
  30. reg = <0x00000000 0x10000000>; /* 256 MB */
  31. };
  32. soc {
  33. ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
  34. MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000
  35. MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>;
  36. };
  37. system_fan: gpio_fan {
  38. gpios = <&gpio0 13 GPIO_ACTIVE_HIGH
  39. &gpio0 14 GPIO_ACTIVE_HIGH>;
  40. alarm-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
  41. #cooling-cells = <2>;
  42. };
  43. thermal-zones {
  44. hdd-thermal {
  45. polling-delay = <20000>;
  46. polling-delay-passive = <2000>;
  47. thermal-sensors = <&hdd0_temp>; /* only one drivetemp sensor is supported */
  48. trips {
  49. hdd_alert1: trip1 {
  50. temperature = <34000>;
  51. hysteresis = <2000>;
  52. type = "active";
  53. };
  54. hdd_alert2: trip2 {
  55. temperature = <40000>;
  56. hysteresis = <2000>;
  57. type = "active";
  58. };
  59. hdd_alert3: trip3 {
  60. temperature = <45000>;
  61. hysteresis = <2000>;
  62. type = "passive";
  63. };
  64. hdd_hot {
  65. temperature = <50000>;
  66. hysteresis = <2000>;
  67. type = "hot";
  68. };
  69. hdd_crit {
  70. temperature = <60000>;
  71. hysteresis = <2000>;
  72. type = "critical";
  73. };
  74. };
  75. cooling-maps {
  76. map1 {
  77. trip = <&hdd_alert1>;
  78. cooling-device = <&system_fan THERMAL_NO_LIMIT 1>;
  79. };
  80. map2 {
  81. trip = <&hdd_alert2>;
  82. cooling-device = <&system_fan 2 2>;
  83. };
  84. map3 {
  85. trip = <&hdd_alert3>;
  86. cooling-device = <&system_fan 3 THERMAL_NO_LIMIT>;
  87. };
  88. };
  89. };
  90. };
  91. gpio_keys {
  92. compatible = "gpio-keys";
  93. pinctrl-0 = <&pmx_buttons>;
  94. pinctrl-names = "default";
  95. power {
  96. label = "Power Switch";
  97. linux,code = <KEY_POWER>;
  98. linux,input-type = <EV_SW>;
  99. gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  100. };
  101. function {
  102. label = "Function Button";
  103. linux,code = <KEY_CONFIG>;
  104. gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
  105. };
  106. };
  107. gpio_leds {
  108. compatible = "gpio-leds";
  109. pinctrl-names = "default";
  110. pinctrl-0 = <&pmx_leds1 &pmx_leds2>;
  111. indicator_red {
  112. function = LED_FUNCTION_INDICATOR;
  113. color = <LED_COLOR_ID_RED>;
  114. gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
  115. panic-indicator;
  116. };
  117. led_power: power_white {
  118. function = LED_FUNCTION_POWER;
  119. color = <LED_COLOR_ID_WHITE>;
  120. gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
  121. default-state = "on";
  122. };
  123. led_failsafe: power_red {
  124. function = LED_FUNCTION_POWER;
  125. color = <LED_COLOR_ID_RED>;
  126. gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
  127. };
  128. led_upgrade: power_orange {
  129. function = LED_FUNCTION_POWER;
  130. color = <LED_COLOR_ID_AMBER>;
  131. gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
  132. };
  133. led_boot: indicator_white {
  134. function = LED_FUNCTION_INDICATOR;
  135. color = <LED_COLOR_ID_WHITE>;
  136. gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
  137. };
  138. hdd1_red {
  139. function = LED_FUNCTION_DISK;
  140. color = <LED_COLOR_ID_RED>;
  141. gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
  142. linux,default-trigger = "ata1";
  143. function-enumerator = <1>;
  144. };
  145. hdd2_red {
  146. function = LED_FUNCTION_DISK;
  147. color = <LED_COLOR_ID_RED>;
  148. gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
  149. linux,default-trigger = "ata2";
  150. function-enumerator = <2>;
  151. };
  152. };
  153. regulators {
  154. compatible = "simple-bus";
  155. #address-cells = <1>;
  156. #size-cells = <0>;
  157. pinctrl-0 = <&pmx_power_hdd1 &pmx_power_hdd2>;
  158. pinctrl-names = "default";
  159. sata1_power: regulator@1 {
  160. compatible = "regulator-fixed";
  161. reg = <1>;
  162. regulator-name = "HDD1";
  163. regulator-min-microvolt = <12000000>;
  164. regulator-max-microvolt = <12000000>;
  165. startup-delay-us = <2000000>;
  166. enable-active-high;
  167. regulator-always-on;
  168. regulator-boot-on;
  169. gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
  170. };
  171. sata2_power: regulator@2 {
  172. compatible = "regulator-fixed";
  173. reg = <2>;
  174. regulator-name = "HDD2";
  175. regulator-min-microvolt = <12000000>;
  176. regulator-max-microvolt = <12000000>;
  177. startup-delay-us = <4000000>;
  178. enable-active-high;
  179. regulator-always-on;
  180. regulator-boot-on;
  181. gpio = <&gpio0 2 GPIO_ACTIVE_HIGH>;
  182. };
  183. };
  184. };
  185. &coherencyfab {
  186. broken-idle;
  187. };
  188. &eth1 {
  189. pinctrl-0 = <&ge1_rgmii_pins>;
  190. pinctrl-names = "default";
  191. status = "okay";
  192. phy-handle = <&ethphy0>;
  193. phy-connection-type = "rgmii-id";
  194. };
  195. &mdio {
  196. pinctrl-0 = <&mdio_pins>;
  197. pinctrl-names = "default";
  198. ethphy0: ethernet-phy@0 { /* Marvell 88E1318 */
  199. reg = <0>;
  200. marvell,reg-init = <0x3 0x10 0xf000 0x091A>, /* LED function */
  201. <0x3 0x11 0x0000 0x4401>, /* LED polarity */
  202. <0x3 0x12 0x0000 0x4905>; /* LED timer */
  203. #thermal-sensor-cells = <0>;
  204. };
  205. };
  206. &nand_controller {
  207. status = "okay";
  208. nand@0 {
  209. reg = <0>;
  210. label = "pxa3xx_nand-0";
  211. nand-rb = <0>;
  212. marvell,nand-keep-config;
  213. nand-on-flash-bbt;
  214. nand-ecc-strength = <4>;
  215. nand-ecc-step-size = <512>;
  216. partitions {
  217. compatible = "fixed-partitions";
  218. #address-cells = <1>;
  219. #size-cells = <1>;
  220. partition@0 {
  221. label = "ubi_kernel";
  222. reg = <0x00000000 0x02000000>; /* 32 MiB */
  223. };
  224. partition@2000000 {
  225. label = "ubi";
  226. reg = <0x02000000 0x1df00000>; /* 479 MiB */
  227. };
  228. };
  229. };
  230. };
  231. &sata {
  232. nr-ports = <2>;
  233. status = "okay";
  234. #address-cells = <1>;
  235. #size-cells = <0>;
  236. hdd0_temp: sata-port@0 {
  237. reg = <0>;
  238. #thermal-sensor-cells = <0>;
  239. };
  240. hdd1_temp: sata-port@1 {
  241. reg = <1>;
  242. #thermal-sensor-cells = <0>;
  243. };
  244. };
  245. &spi0 {
  246. status = "okay";
  247. pinctrl-0 = <&spi0_pins2>;
  248. pinctrl-names = "default";
  249. spi-flash@0 {
  250. compatible = "mxicy,mx25l8005", "jedec,spi-nor";
  251. reg = <0>;
  252. spi-max-frequency = <50000000>;
  253. partitions {
  254. compatible = "fixed-partitions";
  255. #address-cells = <1>;
  256. #size-cells = <1>;
  257. partition@0 {
  258. reg = <0x00000 0xf0000>; /* 960 KiB*/
  259. label = "u-boot";
  260. read-only;
  261. };
  262. partition@f0000 {
  263. reg = <0xf0000 0x10000>; /* 64 KiB */
  264. label = "u-boot-env";
  265. };
  266. };
  267. };
  268. };
  269. &pmsu {
  270. pinctrl-0 = <&pmx_power_cpu>;
  271. pinctrl-names = "default";
  272. };
  273. &uart0 {
  274. status = "okay";
  275. };
  276. &usb0 {
  277. status = "okay";
  278. };
  279. &pinctrl {
  280. pmx_power_hdd2: pmx-power-hdd2 {
  281. marvell,pins = "mpp2";
  282. marvell,function = "gpio";
  283. };
  284. pmx_power_cpu: pmx-power-cpu {
  285. marvell,pins = "mpp4";
  286. marvell,function = "vdd";
  287. };
  288. pmx_power_hdd1: pmx-power-hdd1 {
  289. marvell,pins = "mpp8";
  290. marvell,function = "gpio";
  291. };
  292. pmx_fan_lock: pmx-fan-lock {
  293. marvell,pins = "mpp10";
  294. marvell,function = "gpio";
  295. };
  296. pmx_hdd_present: pmx-hdd-present {
  297. marvell,pins = "mpp11", "mpp12";
  298. marvell,function = "gpio";
  299. };
  300. pmx_fan_high: pmx-fan-high {
  301. marvell,pins = "mpp13";
  302. marvell,function = "gpio";
  303. };
  304. pmx_fan_low: pmx-fan-low {
  305. marvell,pins = "mpp14";
  306. marvell,function = "gpio";
  307. };
  308. pmx_buttons: pmx-buttons {
  309. marvell,pins = "mpp15", "mpp16";
  310. marvell,function = "gpio";
  311. };
  312. pmx_leds1: pmx-leds {
  313. marvell,pins = "mpp7", "mpp54", "mpp59", "mpp61";
  314. marvell,function = "gpo";
  315. };
  316. pmx_leds2: pmx-leds {
  317. marvell,pins = "mpp55", "mpp57", "mpp62";
  318. marvell,function = "gpio";
  319. };
  320. };