qcom-ipq4018-rt-ac58u.dts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "qcom-ipq4019.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/soc/qcom,tcsr.h>
  6. #include <dt-bindings/leds/common.h>
  7. / {
  8. model = "ASUS RT-AC58U";
  9. compatible = "asus,rt-ac58u";
  10. memory {
  11. device_type = "memory";
  12. reg = <0x80000000 0x8000000>;
  13. };
  14. aliases {
  15. led-boot = &led_power;
  16. led-failsafe = &led_power;
  17. led-running = &led_power;
  18. led-upgrade = &led_power;
  19. };
  20. soc {
  21. rng@22000 {
  22. status = "okay";
  23. };
  24. mdio@90000 {
  25. status = "okay";
  26. };
  27. tcsr@1949000 {
  28. compatible = "qcom,tcsr";
  29. reg = <0x1949000 0x100>;
  30. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  31. };
  32. tcsr@194b000 {
  33. compatible = "qcom,tcsr";
  34. reg = <0x194b000 0x100>;
  35. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  36. };
  37. ess_tcsr@1953000 {
  38. compatible = "qcom,tcsr";
  39. reg = <0x1953000 0x1000>;
  40. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  41. };
  42. tcsr@1957000 {
  43. compatible = "qcom,tcsr";
  44. reg = <0x1957000 0x100>;
  45. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  46. };
  47. usb3@8af8800 {
  48. status = "okay";
  49. dwc3@8a00000 {
  50. #address-cells = <1>;
  51. #size-cells = <0>;
  52. usb3_port1: port@1 {
  53. reg = <1>;
  54. #trigger-source-cells = <0>;
  55. };
  56. usb3_port2: port@2 {
  57. reg = <2>;
  58. #trigger-source-cells = <0>;
  59. };
  60. };
  61. };
  62. crypto@8e3a000 {
  63. status = "okay";
  64. };
  65. watchdog@b017000 {
  66. status = "okay";
  67. };
  68. };
  69. keys {
  70. compatible = "gpio-keys";
  71. reset {
  72. label = "reset";
  73. gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
  74. linux,code = <KEY_RESTART>;
  75. };
  76. wps {
  77. label = "wps";
  78. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  79. linux,code = <KEY_WPS_BUTTON>;
  80. };
  81. };
  82. leds {
  83. compatible = "gpio-leds";
  84. led_power: led-0 {
  85. color = <LED_COLOR_ID_BLUE>;
  86. function = LED_FUNCTION_POWER;
  87. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  88. panic-indicator;
  89. };
  90. led-1 {
  91. color = <LED_COLOR_ID_BLUE>;
  92. function = LED_FUNCTION_WAN;
  93. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  94. /*
  95. * linux,default-trigger = "90000.mdio-1:04:link";
  96. * sadly still lacks rx+tx
  97. */
  98. };
  99. led-2 {
  100. color = <LED_COLOR_ID_BLUE>;
  101. function = LED_FUNCTION_WLAN;
  102. function-enumerator = <2>;
  103. gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
  104. linux,default-trigger = "phy0tpt";
  105. };
  106. led-3 {
  107. color = <LED_COLOR_ID_BLUE>;
  108. function = LED_FUNCTION_WLAN;
  109. function-enumerator = <5>;
  110. gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
  111. linux,default-trigger = "phy1tpt";
  112. };
  113. led-4 {
  114. color = <LED_COLOR_ID_BLUE>;
  115. function = LED_FUNCTION_USB;
  116. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  117. trigger-sources = <&usb3_port1>, <&usb3_port2>;
  118. linux,default-trigger = "usbport";
  119. };
  120. led-5 {
  121. color = <LED_COLOR_ID_BLUE>;
  122. function = LED_FUNCTION_LAN;
  123. gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
  124. };
  125. };
  126. };
  127. &cryptobam {
  128. status = "okay";
  129. };
  130. &blsp_dma {
  131. status = "okay";
  132. };
  133. &tlmm {
  134. serial_pins: serial_pinmux {
  135. mux {
  136. pins = "gpio60", "gpio61";
  137. function = "blsp_uart0";
  138. bias-disable;
  139. };
  140. };
  141. spi_0_pins: spi_0_pinmux {
  142. mux {
  143. function = "blsp_spi0";
  144. pins = "gpio55", "gpio56", "gpio57";
  145. drive-strength = <12>;
  146. bias-disable;
  147. };
  148. mux_cs {
  149. function = "gpio";
  150. pins = "gpio54", "gpio59";
  151. drive-strength = <2>;
  152. bias-disable;
  153. output-high;
  154. };
  155. };
  156. };
  157. &blsp1_spi1 { /* BLSP1 QUP1 */
  158. pinctrl-0 = <&spi_0_pins>;
  159. pinctrl-names = "default";
  160. status = "okay";
  161. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
  162. <&tlmm 59 GPIO_ACTIVE_HIGH>;
  163. flash@0 {
  164. /*
  165. * U-boot looks for "n25q128a11" node,
  166. * if we don't have it, it will spit out the following warning:
  167. * "ipq: fdt fixup unable to find compatible node".
  168. */
  169. compatible = "jedec,spi-nor";
  170. reg = <0>;
  171. linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
  172. spi-max-frequency = <30000000>;
  173. partitions {
  174. compatible = "fixed-partitions";
  175. #address-cells = <1>;
  176. #size-cells = <1>;
  177. partition@0 {
  178. label = "SBL1";
  179. reg = <0x00000000 0x00040000>;
  180. read-only;
  181. };
  182. partition@40000 {
  183. label = "MIBIB";
  184. reg = <0x00040000 0x00020000>;
  185. read-only;
  186. };
  187. partition@60000 {
  188. label = "QSEE";
  189. reg = <0x00060000 0x00060000>;
  190. read-only;
  191. };
  192. partition@c0000 {
  193. label = "CDT";
  194. reg = <0x000c0000 0x00010000>;
  195. read-only;
  196. };
  197. partition@d0000 {
  198. label = "DDRPARAMS";
  199. reg = <0x000d0000 0x00010000>;
  200. read-only;
  201. };
  202. partition@e0000 {
  203. label = "APPSBLENV"; /* uboot env*/
  204. reg = <0x000e0000 0x00010000>;
  205. read-only;
  206. };
  207. partition@f0000 {
  208. label = "APPSBL"; /* uboot */
  209. reg = <0x000f0000 0x00080000>;
  210. read-only;
  211. };
  212. partition@170000 {
  213. label = "ART";
  214. reg = <0x00170000 0x00010000>;
  215. read-only;
  216. };
  217. /* 0x00180000 - 0x00200000 unused */
  218. };
  219. };
  220. spi-nand@1 {
  221. compatible = "spi-nand";
  222. reg = <1>;
  223. spi-max-frequency = <30000000>;
  224. /*
  225. * U-boot looks for "spinand,mt29f" node,
  226. * if we don't have it, it will spit out the following warning:
  227. * "ipq: fdt fixup unable to find compatible node".
  228. */
  229. partitions {
  230. compatible = "fixed-partitions";
  231. #address-cells = <1>;
  232. #size-cells = <1>;
  233. partition@0 {
  234. label = "ubi";
  235. reg = <0x00000000 0x08000000>;
  236. };
  237. };
  238. };
  239. };
  240. &blsp1_uart1 {
  241. pinctrl-0 = <&serial_pins>;
  242. pinctrl-names = "default";
  243. status = "okay";
  244. };
  245. &usb3_ss_phy {
  246. status = "okay";
  247. };
  248. &usb3_hs_phy {
  249. status = "okay";
  250. };
  251. &gmac {
  252. status = "okay";
  253. };
  254. &switch {
  255. status = "okay";
  256. };
  257. &swport1 {
  258. status = "okay";
  259. };
  260. &swport2 {
  261. status = "okay";
  262. };
  263. &swport3 {
  264. status = "okay";
  265. };
  266. &swport4 {
  267. status = "okay";
  268. };
  269. &swport5 {
  270. status = "okay";
  271. };
  272. &wifi0 {
  273. status = "okay";
  274. qcom,ath10k-calibration-variant = "RT-AC58U";
  275. };
  276. &wifi1 {
  277. status = "okay";
  278. qcom,ath10k-calibration-variant = "RT-AC58U";
  279. };