qcom-ipq4018-wac510.dts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /* Copyright (c) 2020, Robert Marko <[email protected]> */
  3. #include "qcom-ipq4019.dtsi"
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/input/input.h>
  6. #include <dt-bindings/soc/qcom,tcsr.h>
  7. #include <dt-bindings/leds/common.h>
  8. / {
  9. model = "Netgear WAC510";
  10. compatible = "netgear,wac510";
  11. aliases {
  12. led-boot = &led_power_amber;
  13. led-failsafe = &led_power_amber;
  14. led-running = &led_power_green;
  15. led-upgrade = &led_power_amber;
  16. ethernet1 = &swport5;
  17. };
  18. chosen {
  19. bootargs-append = " root=/dev/ubiblock0_1";
  20. };
  21. soc {
  22. rng@22000 {
  23. status = "okay";
  24. };
  25. counter@4a1000 {
  26. compatible = "qcom,qca-gcnt";
  27. reg = <0x4a1000 0x4>;
  28. };
  29. tcsr@1949000 {
  30. compatible = "qcom,tcsr";
  31. reg = <0x1949000 0x100>;
  32. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  33. };
  34. ess_tcsr@1953000 {
  35. compatible = "qcom,tcsr";
  36. reg = <0x1953000 0x1000>;
  37. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  38. };
  39. tcsr@1957000 {
  40. compatible = "qcom,tcsr";
  41. reg = <0x1957000 0x100>;
  42. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  43. };
  44. crypto@8e3a000 {
  45. status = "okay";
  46. };
  47. watchdog@b017000 {
  48. status = "okay";
  49. };
  50. };
  51. keys {
  52. compatible = "gpio-keys";
  53. reset {
  54. label = "reset";
  55. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  56. linux,code = <KEY_RESTART>;
  57. };
  58. };
  59. led_spi {
  60. compatible = "spi-gpio";
  61. #address-cells = <1>;
  62. #size-cells = <0>;
  63. sck-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
  64. mosi-gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
  65. num-chipselects = <0>;
  66. ssr: ssr@0 {
  67. compatible = "fairchild,74hc595";
  68. reg = <0>;
  69. gpio-controller;
  70. #gpio-cells = <2>;
  71. registers-number = <1>;
  72. spi-max-frequency = <1000000>;
  73. };
  74. };
  75. leds {
  76. compatible = "gpio-leds";
  77. led_power_amber: led-0 {
  78. color = <LED_COLOR_ID_AMBER>;
  79. function = LED_FUNCTION_POWER;
  80. gpios = <&ssr 6 GPIO_ACTIVE_LOW>;
  81. panic-indicator;
  82. };
  83. led_power_green: led-1 {
  84. color = <LED_COLOR_ID_GREEN>;
  85. function = LED_FUNCTION_POWER;
  86. gpios = <&ssr 5 GPIO_ACTIVE_LOW>;
  87. };
  88. led-2 {
  89. /* 2.4GHz blue - activity */
  90. color = <LED_COLOR_ID_BLUE>;
  91. function = LED_FUNCTION_WLAN;
  92. function-enumerator = <0>;
  93. gpios = <&ssr 4 GPIO_ACTIVE_LOW>;
  94. linux,default-trigger = "phy0tpt";
  95. };
  96. led-3 {
  97. /* 2.4GHz green - link */
  98. color = <LED_COLOR_ID_GREEN>;
  99. function = LED_FUNCTION_WLAN;
  100. function-enumerator = <0>;
  101. gpios = <&ssr 3 GPIO_ACTIVE_LOW>;
  102. linux,default-trigger = "phy0radio";
  103. };
  104. led-4 {
  105. /* 5GHz blue - activity */
  106. color = <LED_COLOR_ID_BLUE>;
  107. function = LED_FUNCTION_WLAN;
  108. function-enumerator = <1>;
  109. gpios = <&ssr 2 GPIO_ACTIVE_LOW>;
  110. linux,default-trigger = "phy1tpt";
  111. };
  112. led-5 {
  113. /* 5GHz green - link */
  114. color = <LED_COLOR_ID_GREEN>;
  115. function = LED_FUNCTION_WLAN;
  116. function-enumerator = <1>;
  117. gpios = <&ssr 1 GPIO_ACTIVE_LOW>;
  118. linux,default-trigger = "phy1radio";
  119. };
  120. led-6 {
  121. color = <LED_COLOR_ID_GREEN>;
  122. function = LED_FUNCTION_ACTIVITY;
  123. gpios = <&ssr 0 GPIO_ACTIVE_LOW>;
  124. };
  125. };
  126. };
  127. &qpic_bam {
  128. status = "okay";
  129. };
  130. &tlmm {
  131. mdio_pins: mdio_pinmux {
  132. mux_1 {
  133. pins = "gpio53";
  134. function = "mdio";
  135. bias-pull-up;
  136. };
  137. mux_2 {
  138. pins = "gpio52";
  139. function = "mdc";
  140. bias-pull-up;
  141. };
  142. };
  143. serial_pins: serial_pinmux {
  144. mux {
  145. pins = "gpio60", "gpio61";
  146. function = "blsp_uart0";
  147. bias-disable;
  148. };
  149. };
  150. spi_0_pins: spi_0_pinmux {
  151. pinmux {
  152. function = "blsp_spi0";
  153. pins = "gpio55", "gpio56", "gpio57";
  154. drive-strength = <12>;
  155. bias-disable;
  156. };
  157. pinmux_cs {
  158. function = "gpio";
  159. pins = "gpio54", "gpio59";
  160. drive-strength = <2>;
  161. bias-disable;
  162. output-high;
  163. };
  164. };
  165. };
  166. &blsp_dma {
  167. status = "okay";
  168. };
  169. &blsp1_spi1 {
  170. status = "okay";
  171. pinctrl-0 = <&spi_0_pins>;
  172. pinctrl-names = "default";
  173. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>,
  174. <&tlmm 59 GPIO_ACTIVE_HIGH>;
  175. flash@0 {
  176. compatible = "jedec,spi-nor";
  177. spi-max-frequency = <50000000>;
  178. reg = <0>;
  179. partitions {
  180. compatible = "fixed-partitions";
  181. #address-cells = <1>;
  182. #size-cells = <1>;
  183. partition@0 {
  184. label = "0:SBL1";
  185. reg = <0x00000000 0x00040000>;
  186. read-only;
  187. };
  188. partition@40000 {
  189. label = "0:MIBIB";
  190. reg = <0x00040000 0x00020000>;
  191. read-only;
  192. };
  193. partition@60000 {
  194. label = "0:QSEE";
  195. reg = <0x00060000 0x00060000>;
  196. read-only;
  197. };
  198. partition@c0000 {
  199. label = "0:CDT";
  200. reg = <0x000c0000 0x00010000>;
  201. read-only;
  202. };
  203. partition@d0000 {
  204. label = "0:DDRPARAMS";
  205. reg = <0x000d0000 0x00010000>;
  206. read-only;
  207. };
  208. partition@e0000 {
  209. label = "0:APPSBLENV";
  210. reg = <0x000e0000 0x00010000>;
  211. };
  212. partition@f0000 {
  213. label = "0:APPSBL";
  214. reg = <0x000f0000 0x000f0000>;
  215. read-only;
  216. };
  217. partition@1e0000 {
  218. label = "0:MANUDATA";
  219. reg = <0x001e0000 0x00010000>;
  220. read-only;
  221. nvmem-layout {
  222. compatible = "fixed-layout";
  223. #address-cells = <1>;
  224. #size-cells = <1>;
  225. macaddr_manudata_6: macaddr@6 {
  226. compatible = "mac-base";
  227. reg = <0x6 0x6>;
  228. #nvmem-cell-cells = <1>;
  229. };
  230. };
  231. };
  232. partition@1f0000 {
  233. label = "0:ART";
  234. reg = <0x001f0000 0x00010000>;
  235. read-only;
  236. nvmem-layout {
  237. compatible = "fixed-layout";
  238. #address-cells = <1>;
  239. #size-cells = <1>;
  240. precal_art_1000: precal@1000 {
  241. reg = <0x1000 0x2f20>;
  242. };
  243. precal_art_5000: precal@5000 {
  244. reg = <0x5000 0x2f20>;
  245. };
  246. };
  247. };
  248. };
  249. };
  250. nand@1 {
  251. compatible = "spi-nand";
  252. reg = <1>;
  253. spi-max-frequency = <48000000>;
  254. partitions {
  255. compatible = "fixed-partitions";
  256. #address-cells = <1>;
  257. #size-cells = <1>;
  258. partition@0 {
  259. label = "rootfs";
  260. reg = <0x00000000 0x03800000>;
  261. };
  262. partition@3800000 {
  263. label = "rootfs_1";
  264. reg = <0x03800000 0x03800000>;
  265. };
  266. partition@7000000 {
  267. label = "var_config";
  268. reg = <0x07000000 0x00f00000>;
  269. read-only;
  270. };
  271. partition@7f00000 {
  272. label = "Oops_log";
  273. reg = <0x07f00000 0x000c0000>;
  274. read-only;
  275. };
  276. };
  277. };
  278. };
  279. &blsp1_uart1 {
  280. status = "okay";
  281. pinctrl-0 = <&serial_pins>;
  282. pinctrl-names = "default";
  283. };
  284. &cryptobam {
  285. status = "okay";
  286. };
  287. &gmac {
  288. status = "okay";
  289. };
  290. &switch {
  291. status = "okay";
  292. };
  293. &swport4 {
  294. status = "okay";
  295. label = "lan";
  296. };
  297. &swport5 {
  298. status = "okay";
  299. };
  300. &mdio {
  301. status = "okay";
  302. pinctrl-0 = <&mdio_pins>;
  303. pinctrl-names = "default";
  304. reset-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>;
  305. reset-delay-us = <2000>;
  306. };
  307. &wifi0 {
  308. status = "okay";
  309. nvmem-cell-names = "pre-calibration", "mac-address";
  310. nvmem-cells = <&precal_art_1000>, <&macaddr_manudata_6 0>;
  311. qcom,ath10k-calibration-variant = "Netgear-WAC510";
  312. };
  313. &wifi1 {
  314. status = "okay";
  315. nvmem-cell-names = "pre-calibration", "mac-address";
  316. nvmem-cells = <&precal_art_5000>, <&macaddr_manudata_6 16>;
  317. qcom,ath10k-calibration-variant = "Netgear-WAC510";
  318. };