armada-380-iij-sa-w2.dts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include "armada-380.dtsi"
  7. / {
  8. model = "IIJ SA-W2";
  9. compatible = "iij,sa-w2", "marvell,armada380";
  10. aliases {
  11. led-boot = &led_power_green;
  12. led-failsafe = &led_power_red;
  13. led-running = &led_power_green;
  14. led-upgrade = &led_power_green;
  15. label-mac-device = &ge0;
  16. };
  17. chosen {
  18. stdout-path = "serial0:115200n8";
  19. };
  20. memory@0 {
  21. device_type = "memory";
  22. reg = <0x00000000 0x10000000>; /* 256MB */
  23. };
  24. soc {
  25. ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000
  26. MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  27. MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
  28. MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
  29. MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
  30. pcie {
  31. status = "okay";
  32. pcie@1,0 {
  33. status = "okay";
  34. };
  35. pcie@3,0 {
  36. status = "okay";
  37. };
  38. };
  39. };
  40. keys {
  41. compatible = "gpio-keys";
  42. pinctrl-names = "default";
  43. pinctrl-0 = <&pmx_keys_pins>;
  44. button-init {
  45. label = "init";
  46. linux,code = <KEY_RESTART>;
  47. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  48. };
  49. };
  50. leds {
  51. compatible = "gpio-leds";
  52. pinctrl-names = "default";
  53. pinctrl-0 = <&pmx_leds_pins>;
  54. led-0 {
  55. gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
  56. color = <LED_COLOR_ID_GREEN>;
  57. linux,default-trigger = "phy0tpt";
  58. };
  59. led-1 {
  60. gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
  61. color = <LED_COLOR_ID_RED>;
  62. };
  63. led-2 {
  64. gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
  65. color = <LED_COLOR_ID_GREEN>;
  66. function = LED_FUNCTION_STATUS;
  67. };
  68. led-3 {
  69. gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
  70. color = <LED_COLOR_ID_RED>;
  71. function = LED_FUNCTION_STATUS;
  72. };
  73. led-4 {
  74. gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
  75. color = <LED_COLOR_ID_GREEN>;
  76. };
  77. led-5 {
  78. gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
  79. color = <LED_COLOR_ID_RED>;
  80. };
  81. led-6 {
  82. gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
  83. color = <LED_COLOR_ID_GREEN>;
  84. linux,default-trigger = "phy1tpt";
  85. };
  86. led-7 {
  87. gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
  88. color = <LED_COLOR_ID_RED>;
  89. };
  90. led_power_green: led-8 {
  91. gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
  92. color = <LED_COLOR_ID_GREEN>;
  93. };
  94. led_power_red: led-9 {
  95. gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
  96. color = <LED_COLOR_ID_RED>;
  97. };
  98. led-10 {
  99. gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
  100. color = <LED_COLOR_ID_GREEN>;
  101. linux,default-trigger = "usbport";
  102. trigger-sources = <&hub_port2>;
  103. };
  104. led-11 {
  105. gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
  106. color = <LED_COLOR_ID_GREEN>;
  107. linux,default-trigger = "usbport";
  108. trigger-sources = <&hub_port1>;
  109. };
  110. };
  111. regulator-vbus-usb0 {
  112. compatible = "regulator-fixed";
  113. regulator-name = "vbus-usb0";
  114. regulator-min-microvolt = <5000000>;
  115. regulator-max-microvolt = <5000000>;
  116. gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>;
  117. enable-active-high;
  118. regulator-always-on;
  119. };
  120. regulator-vbus-usb1 {
  121. compatible = "regulator-fixed";
  122. regulator-name = "vbus-usb1";
  123. regulator-min-microvolt = <5000000>;
  124. regulator-max-microvolt = <5000000>;
  125. gpio = <&gpio1 21 GPIO_ACTIVE_HIGH>;
  126. enable-active-high;
  127. regulator-always-on;
  128. };
  129. };
  130. &uart0 {
  131. pinctrl-names = "default";
  132. pinctrl-0 = <&uart0_pins>;
  133. status = "okay";
  134. };
  135. &pinctrl {
  136. pmx_usb_pins: usb-pins {
  137. marvell,pins = "mpp2", /* smsc usb2514b reset */
  138. "mpp48", "mpp49", /* port over current */
  139. "mpp52", "mpp53"; /* port vbus */
  140. marvell,function = "gpio";
  141. };
  142. pmx_keys_pins: keys-pins {
  143. marvell,pins = "mpp18";
  144. marvell,function = "gpio";
  145. };
  146. pmx_leds_pins: leds-pins {
  147. marvell,pins = "mpp19", "mpp20", "mpp33", "mpp34", "mpp35",
  148. "mpp36", "mpp44", "mpp45", "mpp46", "mpp47",
  149. "mpp54", "mpp55";
  150. marvell,function = "gpio";
  151. };
  152. };
  153. &gpio0 {
  154. usb-hub-reset {
  155. gpio-hog;
  156. gpios = <2 GPIO_ACTIVE_HIGH>;
  157. output-high;
  158. };
  159. };
  160. &usb0 {
  161. pinctrl-names = "default";
  162. pinctrl-0 = <&pmx_usb_pins>;
  163. status = "okay";
  164. #address-cells = <1>;
  165. #size-cells = <0>;
  166. /* SMSC USB2514B on PCB */
  167. hub@1 {
  168. compatible = "usb424,2514";
  169. reg = <1>;
  170. #address-cells = <1>;
  171. #size-cells = <0>;
  172. hub_port1: port@1 {
  173. reg = <1>;
  174. #trigger-source-cells = <0>;
  175. };
  176. hub_port2: port@2 {
  177. reg = <2>;
  178. #trigger-source-cells = <0>;
  179. };
  180. };
  181. };
  182. &bm {
  183. status = "okay";
  184. };
  185. &bm_bppi {
  186. status = "okay";
  187. };
  188. &eth1 {
  189. pinctrl-names = "default";
  190. pinctrl-0 = <&ge1_rgmii_pins>;
  191. status = "okay";
  192. phy-connection-type = "rgmii-id";
  193. buffer-manager = <&bm>;
  194. bm,pool-long = <2>;
  195. bm,pool-short = <3>;
  196. nvmem-cells = <&macaddr_bdinfo_6 1>;
  197. nvmem-cell-names = "mac-address";
  198. fixed-link {
  199. speed = <1000>;
  200. full-duplex;
  201. };
  202. };
  203. &mdio {
  204. pinctrl-names = "default";
  205. pinctrl-0 = <&mdio_pins>;
  206. status = "okay";
  207. /* Marvell 88E6172 */
  208. switch@0 {
  209. compatible = "marvell,mv88e6085";
  210. reg = <0x0>;
  211. interrupt-controller;
  212. #interrupt-cells = <2>;
  213. interrupt-parent = <&gpio1>;
  214. interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
  215. ports {
  216. #address-cells = <1>;
  217. #size-cells = <0>;
  218. port@0 {
  219. reg = <0>;
  220. label = "ge1_0";
  221. };
  222. port@1 {
  223. reg = <1>;
  224. label = "ge1_1";
  225. };
  226. port@2 {
  227. reg = <2>;
  228. label = "ge1_2";
  229. };
  230. port@3 {
  231. reg = <3>;
  232. label = "ge1_3";
  233. };
  234. ge0: port@4 {
  235. reg = <4>;
  236. label = "ge0";
  237. nvmem-cells = <&macaddr_bdinfo_6 0>;
  238. nvmem-cell-names = "mac-address";
  239. };
  240. /*
  241. * eth0 is connected to port5 for WAN connection
  242. * on port4 ("GE0")
  243. */
  244. port@6 {
  245. reg = <6>;
  246. label = "cpu";
  247. ethernet = <&eth1>;
  248. phy-connection-type = "rgmii-id";
  249. fixed-link {
  250. speed = <1000>;
  251. full-duplex;
  252. };
  253. };
  254. };
  255. };
  256. };
  257. &rtc {
  258. status = "disabled";
  259. };
  260. &spi1 {
  261. pinctrl-names = "default";
  262. pinctrl-0 = <&spi1_pins>;
  263. status = "okay";
  264. flash@0 {
  265. compatible = "jedec,spi-nor";
  266. reg = <0>;
  267. spi-max-frequency = <40000000>;
  268. partitions {
  269. compatible = "fixed-partitions";
  270. #address-cells = <1>;
  271. #size-cells = <1>;
  272. partition@0 {
  273. reg = <0x0 0x100000>;
  274. label = "bootloader";
  275. read-only;
  276. };
  277. partition@100000 {
  278. reg = <0x100000 0x10000>;
  279. label = "bootloader-env";
  280. read-only;
  281. };
  282. partition@110000 {
  283. reg = <0x110000 0xf0000>;
  284. label = "board_info";
  285. read-only;
  286. nvmem-layout {
  287. compatible = "fixed-layout";
  288. #address-cells = <1>;
  289. #size-cells = <1>;
  290. macaddr_bdinfo_6: macaddr@6 {
  291. compatible = "mac-base";
  292. reg = <0x6 0x6>;
  293. #nvmem-cell-cells = <1>;
  294. };
  295. };
  296. };
  297. partition@200000 {
  298. compatible = "iij,seil-firmware";
  299. reg = <0x200000 0xf00000>;
  300. label = "firmware";
  301. iij,bootdev-name = "flash";
  302. iij,seil-id = <0x5345494c 0x32303135>;
  303. };
  304. partition@1100000 {
  305. compatible = "iij,seil-firmware";
  306. reg = <0x1100000 0xf00000>;
  307. label = "rescue";
  308. iij,bootdev-name = "rescue";
  309. iij,seil-id = <0x5345494c 0x32303135>;
  310. };
  311. };
  312. };
  313. };