ipq8072-301w.dts 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /* Copyright (c) 2021, Dirk Buchwalder <[email protected]> */
  3. /dts-v1/;
  4. #include "ipq8074.dtsi"
  5. #include "ipq8074-hk-cpu.dtsi"
  6. #include "ipq8074-ess.dtsi"
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/input/input.h>
  9. #include <dt-bindings/leds/common.h>
  10. / {
  11. model = "QNAP 301w";
  12. compatible = "qnap,301w", "qcom,ipq8074";
  13. aliases {
  14. serial0 = &blsp1_uart5;
  15. /*
  16. * Aliases as required by u-boot
  17. * to patch MAC addresses
  18. */
  19. led-boot = &led_system_red;
  20. led-failsafe = &led_system_red;
  21. led-running = &led_pwr_green;
  22. led-upgrade = &led_system_red;
  23. ethernet0 = &dp1;
  24. ethernet1 = &dp2;
  25. ethernet2 = &dp3;
  26. ethernet3 = &dp4;
  27. ethernet4 = &dp5;
  28. ethernet5 = &dp6_syn;
  29. label-mac-device = &dp1;
  30. };
  31. chosen {
  32. stdout-path = "serial0:115200n8";
  33. };
  34. keys {
  35. compatible = "gpio-keys";
  36. pinctrl-0 = <&button_pins>;
  37. pinctrl-names = "default";
  38. wps-button {
  39. label = "wps";
  40. gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
  41. linux,code = <KEY_WPS_BUTTON>;
  42. };
  43. reset-button {
  44. label = "reset";
  45. gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
  46. linux,code = <KEY_RESTART>;
  47. };
  48. };
  49. leds {
  50. compatible = "gpio-leds";
  51. pinctrl-0 = <&leds_pins>;
  52. pinctrl-names = "default";
  53. led_system_green: led-system-green {
  54. label = "green:system";
  55. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  56. color = <LED_COLOR_ID_GREEN>;
  57. };
  58. led_system_red: led-system-red {
  59. label = "red:system";
  60. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  61. color = <LED_COLOR_ID_RED>;
  62. };
  63. led_pwr_green: led-pwr-green {
  64. label = "green:pwr";
  65. gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
  66. color = <LED_COLOR_ID_GREEN>;
  67. };
  68. led-wifi-green {
  69. label = "green:wifi";
  70. gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
  71. color = <LED_COLOR_ID_GREEN>;
  72. };
  73. led-lan4-green {
  74. label = "green:lan4";
  75. gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
  76. color = <LED_COLOR_ID_GREEN>;
  77. };
  78. led-lan4-amber {
  79. label = "amber:lan4";
  80. gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>;
  81. color = <LED_COLOR_ID_AMBER>;
  82. };
  83. led-lan3-green {
  84. label = "green:lan3";
  85. gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
  86. color = <LED_COLOR_ID_GREEN>;
  87. };
  88. led-lan3-amber {
  89. label = "amber:lan3";
  90. gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
  91. color = <LED_COLOR_ID_AMBER>;
  92. };
  93. led-lan2-green {
  94. label = "green:lan2";
  95. gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  96. color = <LED_COLOR_ID_GREEN>;
  97. };
  98. led-lan2-amber {
  99. label = "amber:lan2";
  100. gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>;
  101. color = <LED_COLOR_ID_AMBER>;
  102. };
  103. led-lan1-green {
  104. label = "green:lan1";
  105. gpios = <&tlmm 14 GPIO_ACTIVE_HIGH>;
  106. color = <LED_COLOR_ID_GREEN>;
  107. };
  108. led-lan1-amber {
  109. label = "amber:lan1";
  110. gpios = <&tlmm 15 GPIO_ACTIVE_HIGH>;
  111. color = <LED_COLOR_ID_AMBER>;
  112. };
  113. led-10g-1-green {
  114. label = "green:10g_1";
  115. gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  116. color = <LED_COLOR_ID_GREEN>;
  117. };
  118. led-10g-1-amber {
  119. label = "amber:10g_1";
  120. gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>;
  121. color = <LED_COLOR_ID_AMBER>;
  122. };
  123. led-10g-2-green {
  124. label = "green:10g_2";
  125. gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>;
  126. color = <LED_COLOR_ID_GREEN>;
  127. };
  128. led-10g-2-amber {
  129. label = "amber:10g_2";
  130. gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
  131. color = <LED_COLOR_ID_AMBER>;
  132. };
  133. };
  134. };
  135. &tlmm {
  136. mdio_pins: mdio-state {
  137. mdc-pins {
  138. pins = "gpio68";
  139. function = "mdc";
  140. drive-strength = <8>;
  141. bias-pull-up;
  142. };
  143. mdio-pins {
  144. pins = "gpio69";
  145. function = "mdio";
  146. drive-strength = <8>;
  147. bias-pull-up;
  148. };
  149. };
  150. button_pins: button-state {
  151. wps-pins {
  152. pins = "gpio57";
  153. function = "gpio";
  154. drive-strength = <8>;
  155. bias-pull-up;
  156. };
  157. rst-pins {
  158. pins = "gpio67";
  159. function = "gpio";
  160. drive-strength = <8>;
  161. bias-pull-up;
  162. };
  163. };
  164. leds_pins: leds-state {
  165. pins = "gpio1", "gpio3", "gpio4", "gpio6", "gpio7", "gpio8",
  166. "gpio11", "gpio12", "gpio13", "gpio14", "gpio15", "gpio42",
  167. "gpio51", "gpio52", "gpio54", "gpio56";
  168. function = "gpio";
  169. drive-strength = <8>;
  170. bias-pull-down;
  171. };
  172. };
  173. &blsp1_uart5 {
  174. status = "okay";
  175. };
  176. &prng {
  177. status = "okay";
  178. };
  179. &ssphy_0 {
  180. status = "okay";
  181. };
  182. &qusb_phy_0 {
  183. status = "okay";
  184. };
  185. &ssphy_1 {
  186. status = "okay";
  187. };
  188. &qusb_phy_1 {
  189. status = "okay";
  190. };
  191. &usb_0 {
  192. status = "okay";
  193. };
  194. &usb_1 {
  195. status = "okay";
  196. };
  197. &cryptobam {
  198. status = "okay";
  199. };
  200. &crypto {
  201. status = "okay";
  202. };
  203. &qpic_bam {
  204. status = "okay";
  205. };
  206. &blsp1_spi1 { /* BLSP1 QUP1 */
  207. pinctrl-0 = <&spi_0_pins>;
  208. pinctrl-names = "default";
  209. cs-gpios = <0>;
  210. status = "okay";
  211. flash@0 {
  212. #address-cells = <1>;
  213. #size-cells = <1>;
  214. reg = <0>;
  215. compatible = "jedec,spi-nor";
  216. spi-max-frequency = <50000000>;
  217. partitions {
  218. compatible = "qcom,smem-part";
  219. };
  220. };
  221. };
  222. &mdio {
  223. status = "okay";
  224. pinctrl-0 = <&mdio_pins>;
  225. pinctrl-names = "default";
  226. reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
  227. aqr113c_0: ethernet-phy@0 {
  228. compatible ="ethernet-phy-ieee802.3-c45";
  229. reg = <0>;
  230. reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
  231. };
  232. aqr113c_8: ethernet-phy@8 {
  233. compatible ="ethernet-phy-ieee802.3-c45";
  234. reg = <8>;
  235. reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
  236. };
  237. qca8075_16: ethernet-phy@16 {
  238. compatible = "ethernet-phy-ieee802.3-c22";
  239. reg = <16>;
  240. };
  241. qca8075_17: ethernet-phy@17 {
  242. compatible = "ethernet-phy-ieee802.3-c22";
  243. reg = <17>;
  244. };
  245. qca8075_18: ethernet-phy@18 {
  246. compatible = "ethernet-phy-ieee802.3-c22";
  247. reg = <18>;
  248. };
  249. qca8075_19: ethernet-phy@19 {
  250. compatible = "ethernet-phy-ieee802.3-c22";
  251. reg = <19>;
  252. };
  253. };
  254. &sdhc_1 {
  255. status = "okay";
  256. /* According to the stock dts from the QNAP gpl drop
  257. * the emmc has a problem with the hs400 > hs200 speed switch.
  258. * Therefore remove the mmc-hs400-1_8v property
  259. */
  260. /delete-property/ mmc-hs400-1_8v;
  261. mmc-hs200-1_8v;
  262. mmc-ddr-1_8v;
  263. vqmmc-supply = <&l11>;
  264. };
  265. &switch {
  266. status = "okay";
  267. switch_cpu_bmp = <0x1>; /* cpu port bitmap */
  268. switch_lan_bmp = <0x3e>; /* lan port bitmap */
  269. switch_wan_bmp = <0xc0>; /* wan port bitmap */
  270. switch_mac_mode = <0xb>; /* mac mode for uniphy instance0*/
  271. switch_mac_mode1 = <0xd>; /* mac mode for uniphy instance1*/
  272. switch_mac_mode2 = <0xd>; /* mac mode for uniphy instance2*/
  273. bm_tick_mode = <0>; /* bm tick mode */
  274. tm_tick_mode = <0>; /* tm tick mode */
  275. qcom,port_phyinfo {
  276. port@0 {
  277. port_id = <1>;
  278. phy_address = <16>;
  279. };
  280. port@1 {
  281. port_id = <2>;
  282. phy_address = <17>;
  283. };
  284. port@2 {
  285. port_id = <3>;
  286. phy_address = <18>;
  287. };
  288. port@3 {
  289. port_id = <4>;
  290. phy_address = <19>;
  291. };
  292. port@4 {
  293. port_id = <5>;
  294. phy_address = <8>;
  295. compatible = "ethernet-phy-ieee802.3-c45";
  296. ethernet-phy-ieee802.3-c45;
  297. };
  298. port@5 {
  299. port_id = <6>;
  300. phy_address = <0>;
  301. compatible = "ethernet-phy-ieee802.3-c45";
  302. ethernet-phy-ieee802.3-c45;
  303. };
  304. };
  305. };
  306. &edma {
  307. status = "okay";
  308. };
  309. &dp1 {
  310. status = "okay";
  311. phy-handle = <&qca8075_16>;
  312. label = "lan4";
  313. };
  314. &dp2 {
  315. status = "okay";
  316. phy-handle = <&qca8075_17>;
  317. label = "lan3";
  318. };
  319. &dp3 {
  320. status = "okay";
  321. phy-handle = <&qca8075_18>;
  322. label = "lan2";
  323. };
  324. &dp4 {
  325. status = "okay";
  326. phy-handle = <&qca8075_19>;
  327. label = "lan1";
  328. };
  329. &dp5 {
  330. status = "okay";
  331. qcom,mactype = <1>;
  332. phy-handle = <&aqr113c_8>;
  333. label = "10g-1";
  334. };
  335. &dp6_syn {
  336. status = "okay";
  337. phy-handle = <&aqr113c_0>;
  338. label = "10g-2";
  339. };
  340. &wifi {
  341. status = "okay";
  342. qcom,ath11k-calibration-variant = "QNAP-301w";
  343. };