qcom-ipq4018-cap-ac.dts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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/leds/common.h>
  7. #include <dt-bindings/soc/qcom,tcsr.h>
  8. / {
  9. model = "MikroTik cAP ac";
  10. compatible = "mikrotik,cap-ac";
  11. memory {
  12. device_type = "memory";
  13. reg = <0x80000000 0x08000000>;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. aliases {
  19. led-boot = &led_user;
  20. led-failsafe = &led_user;
  21. led-running = &led_user;
  22. led-upgrade = &led_user;
  23. };
  24. soc {
  25. rng@22000 {
  26. status = "okay";
  27. };
  28. counter@4a1000 {
  29. compatible = "qcom,qca-gcnt";
  30. reg = <0x4a1000 0x4>;
  31. };
  32. tcsr@1949000 {
  33. compatible = "qcom,tcsr";
  34. reg = <0x1949000 0x100>;
  35. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  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. crypto@8e3a000 {
  48. status = "okay";
  49. };
  50. watchdog@b017000 {
  51. status = "okay";
  52. };
  53. };
  54. keys {
  55. compatible = "gpio-keys";
  56. reset {
  57. label = "reset";
  58. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  59. linux,code = <KEY_RESTART>;
  60. };
  61. mode {
  62. label = "mode";
  63. gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
  64. linux,code = <KEY_LIGHTS_TOGGLE>;
  65. };
  66. };
  67. leds {
  68. compatible = "gpio-leds";
  69. power {
  70. function = LED_FUNCTION_POWER;
  71. color = <LED_COLOR_ID_BLUE>;
  72. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  73. default-state = "keep";
  74. };
  75. led_user: user {
  76. label = "green:user";
  77. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  78. panic-indicator;
  79. };
  80. wlan2g {
  81. label = "green:wlan2g";
  82. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  83. };
  84. wlan5g {
  85. label = "green:wlan5g";
  86. gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
  87. };
  88. eth1 {
  89. label = "green:eth1";
  90. gpios = <&ethphy4 1 GPIO_ACTIVE_HIGH>;
  91. };
  92. eth2 {
  93. label = "green:eth2";
  94. gpios = <&ethphy3 1 GPIO_ACTIVE_HIGH>;
  95. };
  96. };
  97. };
  98. &tlmm {
  99. serial_pins: serial_pinmux {
  100. mux {
  101. pins = "gpio60", "gpio61";
  102. function = "blsp_uart0";
  103. bias-disable;
  104. };
  105. };
  106. spi_0_pins: spi_0_pinmux {
  107. pin {
  108. function = "blsp_spi0";
  109. pins = "gpio55", "gpio56", "gpio57";
  110. drive-strength = <2>;
  111. bias-disable;
  112. };
  113. pin_cs {
  114. function = "gpio";
  115. pins = "gpio54";
  116. drive-strength = <2>;
  117. bias-disable;
  118. output-high;
  119. };
  120. };
  121. };
  122. &blsp_dma {
  123. status = "okay";
  124. };
  125. &blsp1_spi1 {
  126. status = "okay";
  127. pinctrl-0 = <&spi_0_pins>;
  128. pinctrl-names = "default";
  129. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  130. flash@0 {
  131. reg = <0>;
  132. compatible = "jedec,spi-nor";
  133. spi-max-frequency = <40000000>;
  134. partitions {
  135. compatible = "fixed-partitions";
  136. #address-cells = <1>;
  137. #size-cells = <1>;
  138. partition@0 {
  139. label = "Qualcomm";
  140. reg = <0x0 0x80000>;
  141. read-only;
  142. };
  143. partition@80000 {
  144. compatible = "mikrotik,routerboot-partitions";
  145. #address-cells = <1>;
  146. #size-cells = <1>;
  147. label = "RouterBoot";
  148. reg = <0x80000 0x80000>;
  149. hard_config {
  150. read-only;
  151. };
  152. dtb_config {
  153. read-only;
  154. };
  155. soft_config {
  156. };
  157. };
  158. partition@100000 {
  159. compatible = "mikrotik,minor";
  160. label = "firmware";
  161. reg = <0x100000 0xf00000>;
  162. };
  163. };
  164. };
  165. };
  166. &blsp1_uart1 {
  167. status = "okay";
  168. pinctrl-0 = <&serial_pins>;
  169. pinctrl-names = "default";
  170. };
  171. &cryptobam {
  172. status = "okay";
  173. };
  174. &mdio {
  175. status = "okay";
  176. };
  177. &ethphy3 {
  178. gpio-controller;
  179. #gpio-cells = <2>;
  180. };
  181. &ethphy4 {
  182. gpio-controller;
  183. #gpio-cells = <2>;
  184. };
  185. &gmac {
  186. status = "okay";
  187. };
  188. &switch {
  189. status = "okay";
  190. };
  191. &swport4 {
  192. status = "okay";
  193. label = "lan";
  194. };
  195. &swport5 {
  196. status = "okay";
  197. };
  198. &wifi0 {
  199. status = "okay";
  200. qcom,ath10k-calibration-variant = "MikroTik-cAP-ac";
  201. };
  202. &wifi1 {
  203. status = "okay";
  204. qcom,ath10k-calibration-variant = "MikroTik-cAP-ac";
  205. };