qcom-ipq4018-hap-ac2.dts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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. / {
  8. model = "MikroTik hAP ac2";
  9. compatible = "mikrotik,hap-ac2";
  10. memory {
  11. device_type = "memory";
  12. reg = <0x80000000 0x08000000>;
  13. };
  14. chosen {
  15. stdout-path = "serial0:115200n8";
  16. };
  17. aliases {
  18. led-boot = &led_user;
  19. led-failsafe = &led_user;
  20. led-running = &led_user;
  21. led-upgrade = &led_user;
  22. };
  23. soc {
  24. rng@22000 {
  25. status = "okay";
  26. };
  27. counter@4a1000 {
  28. compatible = "qcom,qca-gcnt";
  29. reg = <0x4a1000 0x4>;
  30. };
  31. tcsr@1949000 {
  32. compatible = "qcom,tcsr";
  33. reg = <0x1949000 0x100>;
  34. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  35. };
  36. tcsr@194b000 {
  37. /* select hostmode */
  38. compatible = "qcom,tcsr";
  39. reg = <0x194b000 0x100>;
  40. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  41. status = "okay";
  42. };
  43. ess_tcsr@1953000 {
  44. compatible = "qcom,tcsr";
  45. reg = <0x1953000 0x1000>;
  46. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  47. };
  48. tcsr@1957000 {
  49. compatible = "qcom,tcsr";
  50. reg = <0x1957000 0x100>;
  51. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  52. };
  53. usb3@8af8800 {
  54. status = "okay";
  55. dwc3@8a00000 {
  56. phys = <&usb3_hs_phy>;
  57. phy-names = "usb2-phy";
  58. };
  59. };
  60. crypto@8e3a000 {
  61. status = "okay";
  62. };
  63. watchdog@b017000 {
  64. status = "okay";
  65. };
  66. ess-switch@c000000 {
  67. status = "okay";
  68. };
  69. edma@c080000 {
  70. status = "okay";
  71. };
  72. };
  73. keys {
  74. compatible = "gpio-keys";
  75. reset {
  76. label = "reset";
  77. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  78. linux,code = <KEY_RESTART>;
  79. };
  80. mode {
  81. label = "mode";
  82. gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
  83. linux,code = <KEY_RFKILL>;
  84. };
  85. };
  86. leds {
  87. compatible = "gpio-leds";
  88. power {
  89. label = "green:power";
  90. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  91. default-state = "keep";
  92. panic-indicator;
  93. };
  94. led_user: user {
  95. label = "green:user";
  96. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  97. };
  98. };
  99. };
  100. &tlmm {
  101. serial_pins: serial_pinmux {
  102. mux {
  103. pins = "gpio60", "gpio61";
  104. function = "blsp_uart0";
  105. bias-disable;
  106. };
  107. };
  108. spi_0_pins: spi_0_pinmux {
  109. pin {
  110. function = "blsp_spi0";
  111. pins = "gpio55", "gpio56", "gpio57";
  112. drive-strength = <2>;
  113. bias-disable;
  114. };
  115. pin_cs {
  116. function = "gpio";
  117. pins = "gpio54";
  118. drive-strength = <2>;
  119. bias-disable;
  120. output-high;
  121. };
  122. };
  123. enable-usb-power {
  124. gpio-hog;
  125. gpios = <2 GPIO_ACTIVE_HIGH>;
  126. output-high;
  127. line-name = "enable USB power";
  128. };
  129. };
  130. &blsp_dma {
  131. status = "okay";
  132. };
  133. &blsp1_spi1 {
  134. status = "okay";
  135. pinctrl-0 = <&spi_0_pins>;
  136. pinctrl-names = "default";
  137. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  138. flash@0 {
  139. reg = <0>;
  140. compatible = "jedec,spi-nor";
  141. spi-max-frequency = <40000000>;
  142. partitions {
  143. compatible = "fixed-partitions";
  144. #address-cells = <1>;
  145. #size-cells = <1>;
  146. partition@0 {
  147. label = "Qualcomm";
  148. reg = <0x0 0x80000>;
  149. read-only;
  150. };
  151. partition@80000 {
  152. compatible = "mikrotik,routerboot-partitions";
  153. #address-cells = <1>;
  154. #size-cells = <1>;
  155. label = "RouterBoot";
  156. reg = <0x80000 0x80000>;
  157. read-only;
  158. hard_config {
  159. read-only;
  160. size = <0x2000>;
  161. };
  162. dtb_config {
  163. read-only;
  164. };
  165. soft_config {
  166. };
  167. };
  168. partition@100000 {
  169. compatible = "mikrotik,minor";
  170. label = "firmware";
  171. reg = <0x100000 0xf00000>;
  172. };
  173. };
  174. };
  175. };
  176. &blsp1_uart1 {
  177. status = "okay";
  178. pinctrl-0 = <&serial_pins>;
  179. pinctrl-names = "default";
  180. };
  181. &cryptobam {
  182. status = "okay";
  183. };
  184. &usb3_hs_phy {
  185. status = "okay";
  186. };
  187. &mdio {
  188. status = "okay";
  189. };
  190. &ethphy0 {
  191. qcom,single-led-1000;
  192. qcom,single-led-100;
  193. qcom,single-led-10;
  194. };
  195. &ethphy1 {
  196. qcom,single-led-1000;
  197. qcom,single-led-100;
  198. qcom,single-led-10;
  199. };
  200. &ethphy2 {
  201. qcom,single-led-1000;
  202. qcom,single-led-100;
  203. qcom,single-led-10;
  204. };
  205. &ethphy3 {
  206. qcom,single-led-1000;
  207. qcom,single-led-100;
  208. qcom,single-led-10;
  209. };
  210. &ethphy4 {
  211. qcom,single-led-1000;
  212. qcom,single-led-100;
  213. qcom,single-led-10;
  214. };
  215. &wifi0 {
  216. status = "okay";
  217. qcom,ath10k-calibration-variant = "MikroTik-hAP-ac2";
  218. };
  219. &wifi1 {
  220. status = "okay";
  221. qcom,ath10k-calibration-variant = "MikroTik-hAP-ac2";
  222. };