armada-385-fortinet-fg-x0e.dtsi 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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-385.dtsi"
  7. / {
  8. aliases {
  9. led-boot = &led_status_green;
  10. led-failsafe = &led_status_red;
  11. led-running = &led_status_green;
  12. led-upgrade = &led_status_green;
  13. label-mac-device = &eth0;
  14. };
  15. chosen {
  16. stdout-path = "serial0:9600n8";
  17. };
  18. soc {
  19. ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
  20. MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
  21. MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
  22. MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000
  23. MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>;
  24. };
  25. gpio-keys {
  26. compatible = "gpio-keys";
  27. pinctrl-names = "default";
  28. pinctrl-0 = <&pmx_gpio_keys_pins>;
  29. reset {
  30. label = "reset";
  31. linux,code = <KEY_RESTART>;
  32. gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
  33. };
  34. };
  35. gpio_leds: gpio-leds {
  36. compatible = "gpio-leds";
  37. pinctrl-names = "default";
  38. pinctrl-0 = <&pmx_gpio_leds_pins>;
  39. led-0 {
  40. gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
  41. color = <LED_COLOR_ID_RED>;
  42. function = LED_FUNCTION_ALARM;
  43. };
  44. led-1 {
  45. gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
  46. color = <LED_COLOR_ID_RED>;
  47. };
  48. led_status_green: led-2 {
  49. gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
  50. color = <LED_COLOR_ID_GREEN>;
  51. function = LED_FUNCTION_STATUS;
  52. };
  53. led-3 {
  54. gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
  55. color = <LED_COLOR_ID_GREEN>;
  56. };
  57. led-4 {
  58. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  59. color = <LED_COLOR_ID_AMBER>;
  60. function = LED_FUNCTION_ALARM;
  61. };
  62. led_status_red: led-5 {
  63. gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
  64. color = <LED_COLOR_ID_RED>;
  65. function = LED_FUNCTION_STATUS;
  66. };
  67. led-6 {
  68. gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
  69. color = <LED_COLOR_ID_GREEN>;
  70. linux,default-trigger = "mv88e6xxx-1:01:1Gbps";
  71. };
  72. led-7 {
  73. gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
  74. color = <LED_COLOR_ID_AMBER>;
  75. linux,default-trigger = "mv88e6xxx-1:01:100Mbps";
  76. };
  77. led-8 {
  78. gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
  79. color = <LED_COLOR_ID_AMBER>;
  80. linux,default-trigger = "mv88e6xxx-1:02:100Mbps";
  81. };
  82. led-9 {
  83. gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
  84. color = <LED_COLOR_ID_GREEN>;
  85. linux,default-trigger = "mv88e6xxx-1:02:1Gbps";
  86. };
  87. led-10 {
  88. gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
  89. color = <LED_COLOR_ID_GREEN>;
  90. linux,default-trigger = "mv88e6xxx-1:04:1Gbps";
  91. };
  92. led-11 {
  93. gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
  94. color = <LED_COLOR_ID_AMBER>;
  95. linux,default-trigger = "mv88e6xxx-1:04:100Mbps";
  96. };
  97. led-12 {
  98. gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
  99. color = <LED_COLOR_ID_GREEN>;
  100. linux,default-trigger = "mv88e6xxx-1:03:1Gbps";
  101. };
  102. led-13 {
  103. gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
  104. color = <LED_COLOR_ID_AMBER>;
  105. linux,default-trigger = "mv88e6xxx-1:03:100Mbps";
  106. };
  107. };
  108. reg_usb_vbus: regulator-usb-vbus {
  109. compatible = "fixed-regulator";
  110. regulator-name = "usb-vbus";
  111. regulator-min-microvolt = <5000000>;
  112. regulator-max-microvolt = <5000000>;
  113. gpio = <&gpio1 21 GPIO_ACTIVE_LOW>;
  114. regulator-always-on;
  115. };
  116. };
  117. &i2c0 {
  118. pinctrl-names = "default";
  119. pinctrl-0 = <&i2c0_pins>;
  120. status = "okay";
  121. gpio2: gpio@24 {
  122. compatible = "nxp,pca9555";
  123. reg = <0x24>;
  124. gpio-controller;
  125. #gpio-cells = <0x2>;
  126. };
  127. hwmon@28 {
  128. compatible = "nuvoton,nct7802";
  129. reg = <0x28>;
  130. };
  131. };
  132. &uart0 {
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&uart0_pins>;
  135. status = "okay";
  136. };
  137. &pinctrl {
  138. pmx_gpio_leds_pins: gpio-leds-pins {
  139. marvell,pins = "mpp30", "mpp32", "mpp33", "mpp35",
  140. "mpp45", "mpp47";
  141. marvell,function = "gpio";
  142. };
  143. pmx_usb_pins: usb-pins {
  144. marvell,pins = "mpp53";
  145. marvell,function = "gpio";
  146. };
  147. pmx_gpio_keys_pins: gpio-keys-pins {
  148. marvell,pins = "mpp54";
  149. marvell,function = "gpio";
  150. };
  151. };
  152. &bm {
  153. status = "okay";
  154. };
  155. &bm_bppi {
  156. status = "okay";
  157. };
  158. &eth0 {
  159. pinctrl-names = "default";
  160. pinctrl-0 = <&ge0_rgmii_pins>;
  161. status = "okay";
  162. phy-connection-type = "rgmii-id";
  163. buffer-manager = <&bm>;
  164. bm,pool-long = <0>;
  165. bm,pool-short = <1>;
  166. nvmem-cells = <&macaddr_bdinfo_d880 0>;
  167. nvmem-cell-names = "mac-address";
  168. fixed-link {
  169. speed = <1000>;
  170. full-duplex;
  171. };
  172. };
  173. &usb3_0 {
  174. pinctrl-names = "default";
  175. pinctrl-0 = <&pmx_usb_pins>;
  176. status = "okay";
  177. vbus-supply = <&reg_usb_vbus>;
  178. };
  179. &spi1 {
  180. pinctrl-names = "default";
  181. pinctrl-0 = <&spi1_pins>;
  182. status = "okay";
  183. flash@0 {
  184. compatible = "jedec,spi-nor";
  185. reg = <0>;
  186. spi-max-frequency = <50000000>;
  187. partitions {
  188. compatible = "fixed-partitions";
  189. #address-cells = <1>;
  190. #size-cells = <1>;
  191. partition@0 {
  192. reg = <0x0 0x1c0000>;
  193. label = "u-boot";
  194. read-only;
  195. };
  196. partition@1c0000 {
  197. reg = <0x1c0000 0x10000>;
  198. label = "firmware-info";
  199. /*
  200. * 0x10 - 0x2f : image name (image1)
  201. * 0x30 - 0x4f : image name (image2)
  202. * 0x170 (1byte): active image (0x0/0x1)
  203. * 0x184 - 0x185: kernel block count (image1)
  204. * 0x18c - 0x18d: rootfs block count (image1)
  205. * 0x194 - 0x195: kernel block count (image2)
  206. * 0x19c - 0x19d: rootfs block count (image2)
  207. * 0x1be (1byte): bit7 -> active flag (image1)?
  208. * 0x1ce (1byte): bit7 -> active flag (image2)?
  209. *
  210. * Note: block size --> 0x200 (512 bytes)
  211. */
  212. };
  213. partition@1d0000 {
  214. reg = <0x1d0000 0x10000>;
  215. label = "dtb";
  216. read-only;
  217. };
  218. partition@1e0000 {
  219. reg = <0x1e0000 0x10000>;
  220. label = "u-boot-env";
  221. read-only;
  222. };
  223. partition@1f0000 {
  224. reg = <0x1f0000 0x10000>;
  225. label = "board-info";
  226. read-only;
  227. nvmem-layout {
  228. compatible = "fixed-layout";
  229. #address-cells = <1>;
  230. #size-cells = <1>;
  231. macaddr_bdinfo_d880: macaddr@d880 {
  232. compatible = "mac-base";
  233. reg = <0xd880 0x6>;
  234. #nvmem-cell-cells = <1>;
  235. };
  236. };
  237. };
  238. partition@200000 {
  239. reg = <0x200000 0x600000>;
  240. label = "kernel";
  241. };
  242. partition@800000 {
  243. reg = <0x800000 0x1800000>;
  244. label = "rootfs";
  245. };
  246. partition@2000000 {
  247. reg = <0x2000000 0x600000>;
  248. label = "kn2";
  249. read-only;
  250. };
  251. partition@2600000 {
  252. reg = <0x2600000 0x1800000>;
  253. label = "rfs2";
  254. read-only;
  255. };
  256. partition@3e00000 {
  257. reg = <0x3e00000 0x1200000>;
  258. label = "part1";
  259. read-only;
  260. };
  261. partition@5000000 {
  262. reg = <0x5000000 0x1200000>;
  263. label = "part2";
  264. read-only;
  265. };
  266. partition@6200000 {
  267. reg = <0x6200000 0x1e00000>;
  268. label = "config";
  269. read-only;
  270. };
  271. };
  272. };
  273. };