armada-388-helios4.dts 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. /*
  3. * Device Tree file for Helios4
  4. * based on SolidRun Clearfog revision A1 rev 2.0 (88F6828)
  5. *
  6. * Copyright (C) 2017 Aditya Prayoga <[email protected]>
  7. *
  8. */
  9. /dts-v1/;
  10. #include "armada-388.dtsi"
  11. #include "armada-38x-solidrun-microsom.dtsi"
  12. / {
  13. model = "Helios4";
  14. compatible = "kobol,helios4", "marvell,armada388",
  15. "marvell,armada385", "marvell,armada380";
  16. memory {
  17. device_type = "memory";
  18. reg = <0x00000000 0x80000000>; /* 2 GB */
  19. };
  20. aliases {
  21. /* So that mvebu u-boot can update the MAC addresses */
  22. ethernet1 = &eth0;
  23. };
  24. chosen {
  25. stdout-path = "serial0:115200n8";
  26. };
  27. reg_12v: regulator-12v {
  28. compatible = "regulator-fixed";
  29. regulator-name = "power_brick_12V";
  30. regulator-min-microvolt = <12000000>;
  31. regulator-max-microvolt = <12000000>;
  32. regulator-always-on;
  33. };
  34. reg_3p3v: regulator-3p3v {
  35. compatible = "regulator-fixed";
  36. regulator-name = "3P3V";
  37. regulator-min-microvolt = <3300000>;
  38. regulator-max-microvolt = <3300000>;
  39. regulator-always-on;
  40. vin-supply = <&reg_12v>;
  41. };
  42. reg_5p0v_hdd: regulator-5v-hdd {
  43. compatible = "regulator-fixed";
  44. regulator-name = "5V_HDD";
  45. regulator-min-microvolt = <5000000>;
  46. regulator-max-microvolt = <5000000>;
  47. regulator-always-on;
  48. vin-supply = <&reg_12v>;
  49. };
  50. reg_5p0v_usb: regulator-5v-usb {
  51. compatible = "regulator-fixed";
  52. regulator-name = "USB-PWR";
  53. regulator-min-microvolt = <5000000>;
  54. regulator-max-microvolt = <5000000>;
  55. regulator-boot-on;
  56. regulator-always-on;
  57. enable-active-high;
  58. gpio = <&expander0 6 GPIO_ACTIVE_HIGH>;
  59. vin-supply = <&reg_12v>;
  60. };
  61. system-leds {
  62. compatible = "gpio-leds";
  63. pinctrl-names = "default";
  64. pinctrl-0 = <&helios_system_led_pins>;
  65. status-led {
  66. label = "helios4:green:status";
  67. gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  68. linux,default-trigger = "heartbeat";
  69. default-state = "on";
  70. };
  71. fault-led {
  72. label = "helios4:red:fault";
  73. gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
  74. default-state = "keep";
  75. };
  76. };
  77. io-leds {
  78. compatible = "gpio-leds";
  79. pinctrl-names = "default";
  80. pinctrl-0 = <&helios_io_led_pins>;
  81. sata1-led {
  82. label = "helios4:green:ata1";
  83. gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
  84. linux,default-trigger = "ata1";
  85. default-state = "off";
  86. };
  87. sata2-led {
  88. label = "helios4:green:ata2";
  89. gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
  90. linux,default-trigger = "ata2";
  91. default-state = "off";
  92. };
  93. sata3-led {
  94. label = "helios4:green:ata3";
  95. gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
  96. linux,default-trigger = "ata3";
  97. default-state = "off";
  98. };
  99. sata4-led {
  100. label = "helios4:green:ata4";
  101. gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
  102. linux,default-trigger = "ata4";
  103. default-state = "off";
  104. };
  105. usb-led {
  106. label = "helios4:green:usb";
  107. gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
  108. linux,default-trigger = "usb-host";
  109. default-state = "off";
  110. };
  111. };
  112. fan1: j10-pwm {
  113. compatible = "pwm-fan";
  114. pwms = <&gpio1 9 40000>; /* Target freq:25 kHz */
  115. pinctrl-names = "default";
  116. pinctrl-0 = <&helios_fan1_pins>;
  117. };
  118. fan2: j17-pwm {
  119. compatible = "pwm-fan";
  120. pwms = <&gpio1 23 40000>; /* Target freq:25 kHz */
  121. pinctrl-names = "default";
  122. pinctrl-0 = <&helios_fan2_pins>;
  123. };
  124. usb2_phy: usb2-phy {
  125. compatible = "usb-nop-xceiv";
  126. vbus-regulator = <&reg_5p0v_usb>;
  127. };
  128. usb3_phy: usb3-phy {
  129. compatible = "usb-nop-xceiv";
  130. };
  131. soc {
  132. internal-regs {
  133. i2c@11000 {
  134. /*
  135. * PCA9655 GPIO expander, up to 1MHz clock.
  136. * 0-Board Revision bit 0 #
  137. * 1-Board Revision bit 1 #
  138. * 5-USB3 overcurrent
  139. * 6-USB3 power
  140. */
  141. expander0: gpio-expander@20 {
  142. /*
  143. * This is how it should be:
  144. * compatible = "onnn,pca9655",
  145. * "nxp,pca9555";
  146. * but you can't do this because of
  147. * the way I2C works.
  148. */
  149. compatible = "nxp,pca9555";
  150. gpio-controller;
  151. #gpio-cells = <2>;
  152. reg = <0x20>;
  153. pinctrl-names = "default";
  154. pinctrl-0 = <&pca0_pins>;
  155. interrupt-parent = <&gpio0>;
  156. interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
  157. interrupt-controller;
  158. #interrupt-cells = <2>;
  159. board-rev-bit-0-hog {
  160. gpio-hog;
  161. gpios = <0 GPIO_ACTIVE_LOW>;
  162. input;
  163. line-name = "board-rev-0";
  164. };
  165. board-rev-bit-1-hog {
  166. gpio-hog;
  167. gpios = <1 GPIO_ACTIVE_LOW>;
  168. input;
  169. line-name = "board-rev-1";
  170. };
  171. usb3-ilimit-hog {
  172. gpio-hog;
  173. gpios = <5 GPIO_ACTIVE_HIGH>;
  174. input;
  175. line-name = "usb-overcurrent-status";
  176. };
  177. };
  178. temp_sensor: temp@4c {
  179. compatible = "ti,lm75";
  180. reg = <0x4c>;
  181. vcc-supply = <&reg_3p3v>;
  182. };
  183. };
  184. i2c@11100 {
  185. /*
  186. * External I2C Bus for user peripheral
  187. */
  188. clock-frequency = <400000>;
  189. pinctrl-0 = <&helios_i2c1_pins>;
  190. pinctrl-names = "default";
  191. status = "okay";
  192. };
  193. sata@a8000 {
  194. status = "okay";
  195. #address-cells = <1>;
  196. #size-cells = <0>;
  197. sata0: sata-port@0 {
  198. reg = <0>;
  199. };
  200. sata1: sata-port@1 {
  201. reg = <1>;
  202. };
  203. };
  204. sata@e0000 {
  205. status = "okay";
  206. #address-cells = <1>;
  207. #size-cells = <0>;
  208. sata2: sata-port@0 {
  209. reg = <0>;
  210. };
  211. sata3: sata-port@1 {
  212. reg = <1>;
  213. };
  214. };
  215. spi@10680 {
  216. pinctrl-0 = <&spi1_pins
  217. &microsom_spi1_cs_pins>;
  218. pinctrl-names = "default";
  219. status = "okay";
  220. };
  221. sdhci@d8000 {
  222. bus-width = <4>;
  223. cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
  224. no-1-8-v;
  225. pinctrl-0 = <&helios_sdhci_pins
  226. &helios_sdhci_cd_pins>;
  227. pinctrl-names = "default";
  228. status = "okay";
  229. vmmc = <&reg_3p3v>;
  230. wp-inverted;
  231. };
  232. usb@58000 {
  233. usb-phy = <&usb2_phy>;
  234. status = "okay";
  235. };
  236. usb3@f0000 {
  237. status = "okay";
  238. };
  239. usb3@f8000 {
  240. status = "okay";
  241. };
  242. pinctrl@18000 {
  243. pca0_pins: pca0-pins {
  244. marvell,pins = "mpp23";
  245. marvell,function = "gpio";
  246. };
  247. microsom_phy0_int_pins: microsom-phy0-int-pins {
  248. marvell,pins = "mpp18";
  249. marvell,function = "gpio";
  250. };
  251. helios_i2c1_pins: i2c1-pins {
  252. marvell,pins = "mpp26", "mpp27";
  253. marvell,function = "i2c1";
  254. };
  255. helios_sdhci_cd_pins: helios-sdhci-cd-pins {
  256. marvell,pins = "mpp20";
  257. marvell,function = "gpio";
  258. };
  259. helios_sdhci_pins: helios-sdhci-pins {
  260. marvell,pins = "mpp21", "mpp28",
  261. "mpp37", "mpp38",
  262. "mpp39", "mpp40";
  263. marvell,function = "sd0";
  264. };
  265. helios_system_led_pins: helios-system-led-pins {
  266. marvell,pins = "mpp24", "mpp25";
  267. marvell,function = "gpio";
  268. };
  269. helios_io_led_pins: helios-io-led-pins {
  270. marvell,pins = "mpp49", "mpp50",
  271. "mpp52", "mpp53",
  272. "mpp54";
  273. marvell,function = "gpio";
  274. };
  275. helios_fan1_pins: helios_fan1_pins {
  276. marvell,pins = "mpp41", "mpp43";
  277. marvell,function = "gpio";
  278. };
  279. helios_fan2_pins: helios_fan2_pins {
  280. marvell,pins = "mpp48", "mpp55";
  281. marvell,function = "gpio";
  282. };
  283. microsom_spi1_cs_pins: spi1-cs-pins {
  284. marvell,pins = "mpp59";
  285. marvell,function = "spi1";
  286. };
  287. };
  288. };
  289. };
  290. };