qcom-ipq4018-hap-ac2.dts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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 hAP ac2";
  10. compatible = "mikrotik,hap-ac2";
  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. tcsr@194b000 {
  38. /* select hostmode */
  39. compatible = "qcom,tcsr";
  40. reg = <0x194b000 0x100>;
  41. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  42. status = "okay";
  43. };
  44. ess_tcsr@1953000 {
  45. compatible = "qcom,tcsr";
  46. reg = <0x1953000 0x1000>;
  47. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  48. };
  49. tcsr@1957000 {
  50. compatible = "qcom,tcsr";
  51. reg = <0x1957000 0x100>;
  52. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  53. };
  54. usb3@8af8800 {
  55. status = "okay";
  56. dwc3@8a00000 {
  57. phys = <&usb3_hs_phy>;
  58. phy-names = "usb2-phy";
  59. };
  60. };
  61. crypto@8e3a000 {
  62. status = "okay";
  63. };
  64. watchdog@b017000 {
  65. status = "okay";
  66. };
  67. };
  68. keys {
  69. compatible = "gpio-keys";
  70. reset {
  71. label = "reset";
  72. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  73. linux,code = <KEY_RESTART>;
  74. };
  75. mode {
  76. label = "mode";
  77. gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
  78. linux,code = <KEY_RFKILL>;
  79. };
  80. };
  81. leds {
  82. compatible = "gpio-leds";
  83. power {
  84. function = LED_FUNCTION_POWER;
  85. color = <LED_COLOR_ID_GREEN>;
  86. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  87. default-state = "keep";
  88. panic-indicator;
  89. };
  90. led_user: user {
  91. label = "green:user";
  92. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  93. };
  94. };
  95. };
  96. &tlmm {
  97. serial_pins: serial_pinmux {
  98. mux {
  99. pins = "gpio60", "gpio61";
  100. function = "blsp_uart0";
  101. bias-disable;
  102. };
  103. };
  104. spi_0_pins: spi_0_pinmux {
  105. pin {
  106. function = "blsp_spi0";
  107. pins = "gpio55", "gpio56", "gpio57";
  108. drive-strength = <2>;
  109. bias-disable;
  110. };
  111. pin_cs {
  112. function = "gpio";
  113. pins = "gpio54";
  114. drive-strength = <2>;
  115. bias-disable;
  116. output-high;
  117. };
  118. };
  119. enable-usb-power {
  120. gpio-hog;
  121. gpios = <2 GPIO_ACTIVE_HIGH>;
  122. output-high;
  123. line-name = "enable USB power";
  124. };
  125. };
  126. &blsp_dma {
  127. status = "okay";
  128. };
  129. &blsp1_spi1 {
  130. status = "okay";
  131. pinctrl-0 = <&spi_0_pins>;
  132. pinctrl-names = "default";
  133. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  134. flash@0 {
  135. reg = <0>;
  136. compatible = "jedec,spi-nor";
  137. spi-max-frequency = <40000000>;
  138. partitions {
  139. compatible = "fixed-partitions";
  140. #address-cells = <1>;
  141. #size-cells = <1>;
  142. partition@0 {
  143. label = "Qualcomm";
  144. reg = <0x0 0x80000>;
  145. read-only;
  146. };
  147. partition@80000 {
  148. compatible = "mikrotik,routerboot-partitions";
  149. #address-cells = <1>;
  150. #size-cells = <1>;
  151. label = "RouterBoot";
  152. reg = <0x80000 0x80000>;
  153. hard_config {
  154. read-only;
  155. size = <0x2000>;
  156. };
  157. dtb_config {
  158. read-only;
  159. };
  160. soft_config {
  161. };
  162. };
  163. partition@100000 {
  164. compatible = "mikrotik,minor";
  165. label = "firmware";
  166. reg = <0x100000 0xf00000>;
  167. };
  168. };
  169. };
  170. };
  171. &blsp1_uart1 {
  172. status = "okay";
  173. pinctrl-0 = <&serial_pins>;
  174. pinctrl-names = "default";
  175. };
  176. &cryptobam {
  177. status = "okay";
  178. };
  179. &usb3_hs_phy {
  180. status = "okay";
  181. };
  182. &mdio {
  183. status = "okay";
  184. };
  185. &ethphy0 {
  186. qcom,single-led-1000;
  187. qcom,single-led-100;
  188. qcom,single-led-10;
  189. };
  190. &ethphy1 {
  191. qcom,single-led-1000;
  192. qcom,single-led-100;
  193. qcom,single-led-10;
  194. };
  195. &ethphy2 {
  196. qcom,single-led-1000;
  197. qcom,single-led-100;
  198. qcom,single-led-10;
  199. };
  200. &ethphy3 {
  201. qcom,single-led-1000;
  202. qcom,single-led-100;
  203. qcom,single-led-10;
  204. };
  205. &ethphy4 {
  206. qcom,single-led-1000;
  207. qcom,single-led-100;
  208. qcom,single-led-10;
  209. };
  210. &gmac {
  211. status = "okay";
  212. };
  213. &switch {
  214. status = "okay";
  215. };
  216. &swport1 {
  217. status = "okay";
  218. label = "lan4";
  219. };
  220. &swport2 {
  221. status = "okay";
  222. label = "lan3";
  223. };
  224. &swport3 {
  225. status = "okay";
  226. label = "lan2";
  227. };
  228. &swport4 {
  229. status = "okay";
  230. label = "lan1";
  231. };
  232. &swport5 {
  233. status = "okay";
  234. };
  235. &wifi0 {
  236. status = "okay";
  237. qcom,ath10k-calibration-variant = "MikroTik-hAP-ac2";
  238. };
  239. &wifi1 {
  240. status = "okay";
  241. qcom,ath10k-calibration-variant = "MikroTik-hAP-ac2";
  242. };