qcom-ipq4019-hap-ac3-lte6-kit.dts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /* Copyright (c) 2021, 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 ac3 LTE6 kit";
  10. compatible = "mikrotik,hap-ac3-lte6-kit";
  11. memory {
  12. device_type = "memory";
  13. reg = <0x80000000 0x10000000>;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. aliases {
  19. led-boot = &led_status_blue;
  20. led-failsafe = &led_status_red;
  21. led-running = &led_status_blue;
  22. led-upgrade = &led_status_red;
  23. };
  24. soc {
  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. tcsr@194b000 {
  35. /* select hostmode */
  36. compatible = "qcom,tcsr";
  37. reg = <0x194b000 0x100>;
  38. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  39. status = "okay";
  40. };
  41. ess_tcsr@1953000 {
  42. compatible = "qcom,tcsr";
  43. reg = <0x1953000 0x1000>;
  44. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  45. };
  46. tcsr@1957000 {
  47. compatible = "qcom,tcsr";
  48. reg = <0x1957000 0x100>;
  49. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  50. };
  51. };
  52. keys {
  53. compatible = "gpio-keys";
  54. reset {
  55. label = "reset";
  56. gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
  57. linux,code = <KEY_RESTART>;
  58. };
  59. };
  60. leds {
  61. compatible = "gpio-leds";
  62. led_status_blue: status-blue {
  63. function = LED_FUNCTION_STATUS;
  64. color = <LED_COLOR_ID_BLUE>;
  65. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  66. };
  67. led_status_red: status-red {
  68. function = LED_FUNCTION_STATUS;
  69. color = <LED_COLOR_ID_RED>;
  70. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  71. panic-indicator;
  72. };
  73. led_status_green: status-green {
  74. function = LED_FUNCTION_STATUS;
  75. color = <LED_COLOR_ID_GREEN>;
  76. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  77. };
  78. wlan {
  79. function = LED_FUNCTION_WLAN;
  80. color = <LED_COLOR_ID_GREEN>;
  81. gpios = <&tlmm 23 GPIO_ACTIVE_HIGH>;
  82. };
  83. ethernet {
  84. label = "green:ethernet";
  85. gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
  86. };
  87. wan {
  88. function = LED_FUNCTION_WAN;
  89. color = <LED_COLOR_ID_GREEN>;
  90. gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
  91. };
  92. lan1 {
  93. label = "green:lan1";
  94. gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
  95. };
  96. lan2 {
  97. label = "green:lan2";
  98. gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
  99. };
  100. lan3 {
  101. label = "green:lan3";
  102. gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>;
  103. };
  104. lan4 {
  105. label = "green:lan4";
  106. gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
  107. };
  108. };
  109. };
  110. &tlmm {
  111. serial_pins: serial_pinmux {
  112. mux {
  113. pins = "gpio16", "gpio17";
  114. function = "blsp_uart0";
  115. bias-disable;
  116. };
  117. };
  118. spi_0_pins: spi_0_pinmux {
  119. pin {
  120. function = "blsp_spi0";
  121. pins = "gpio13", "gpio14", "gpio15";
  122. drive-strength = <12>;
  123. bias-disable;
  124. };
  125. pin_cs {
  126. function = "gpio";
  127. pins = "gpio12";
  128. drive-strength = <2>;
  129. bias-disable;
  130. output-high;
  131. };
  132. };
  133. enable-usb-power {
  134. gpio-hog;
  135. gpios = <44 GPIO_ACTIVE_HIGH>;
  136. output-high;
  137. line-name = "enable USB power";
  138. };
  139. enable-mpcie-power {
  140. gpio-hog;
  141. gpios = <51 GPIO_ACTIVE_HIGH>;
  142. output-high;
  143. line-name = "enable mPCI-E power";
  144. };
  145. };
  146. &blsp_dma {
  147. status = "okay";
  148. };
  149. &blsp1_spi1 {
  150. status = "okay";
  151. pinctrl-0 = <&spi_0_pins>;
  152. pinctrl-names = "default";
  153. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  154. flash@0 {
  155. reg = <0>;
  156. compatible = "jedec,spi-nor";
  157. spi-max-frequency = <10000000>;
  158. #address-cells = <1>;
  159. #size-cells = <1>;
  160. partitions {
  161. compatible = "fixed-partitions";
  162. partition@0 {
  163. label = "Qualcomm";
  164. reg = <0x0 0x80000>;
  165. read-only;
  166. };
  167. partition@80000 {
  168. compatible = "mikrotik,routerboot-partitions";
  169. label = "RouterBoot";
  170. reg = <0x80000 0x80000>;
  171. hard_config {
  172. size = <0x2000>;
  173. };
  174. dtb_config {
  175. read-only;
  176. };
  177. soft_config {
  178. };
  179. };
  180. partition@110000 {
  181. compatible = "mikrotik,minor";
  182. label = "firmware";
  183. reg = <0x110000 0xef0000>;
  184. };
  185. };
  186. };
  187. };
  188. &qpic_bam {
  189. status = "okay";
  190. };
  191. &blsp1_uart1 {
  192. status = "okay";
  193. pinctrl-0 = <&serial_pins>;
  194. pinctrl-names = "default";
  195. };
  196. &cryptobam {
  197. status = "okay";
  198. };
  199. &usb3_ss_phy {
  200. status = "okay";
  201. };
  202. &usb3_hs_phy {
  203. status = "okay";
  204. };
  205. &usb3 {
  206. status = "okay";
  207. };
  208. &usb2_hs_phy {
  209. status = "okay";
  210. };
  211. &usb2 {
  212. status = "okay";
  213. };
  214. &mdio {
  215. status = "okay";
  216. };
  217. &gmac {
  218. status = "okay";
  219. };
  220. &switch {
  221. status = "okay";
  222. };
  223. &swport1 {
  224. status = "okay";
  225. label = "lan4";
  226. };
  227. &swport2 {
  228. status = "okay";
  229. label = "lan3";
  230. };
  231. &swport3 {
  232. status = "okay";
  233. label = "lan2";
  234. };
  235. &swport4 {
  236. status = "okay";
  237. label = "lan1";
  238. };
  239. &swport5 {
  240. status = "okay";
  241. };
  242. &wifi0 {
  243. status = "okay";
  244. };
  245. &wifi1 {
  246. status = "okay";
  247. };
  248. &crypto {
  249. status = "okay";
  250. };
  251. &watchdog {
  252. status = "okay";
  253. };
  254. &prng {
  255. status = "okay";
  256. };