qcom-ipq4019-a62.dts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. // SPDX-License-Identifier: ISC
  2. /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2017-2018, Sven Eckelmann <[email protected]>
  4. */
  5. #include "qcom-ipq4019.dtsi"
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. #include <dt-bindings/soc/qcom,tcsr.h>
  10. / {
  11. model = "OpenMesh A62";
  12. compatible = "openmesh,a62";
  13. soc {
  14. rng@22000 {
  15. status = "okay";
  16. };
  17. tcsr@194b000 {
  18. /* select hostmode */
  19. compatible = "qcom,tcsr";
  20. reg = <0x194b000 0x100>;
  21. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  22. status = "okay";
  23. };
  24. tcsr@1949000 {
  25. compatible = "qcom,tcsr";
  26. reg = <0x1949000 0x100>;
  27. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  28. };
  29. ess_tcsr@1953000 {
  30. compatible = "qcom,tcsr";
  31. reg = <0x1953000 0x1000>;
  32. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  33. };
  34. tcsr@1957000 {
  35. compatible = "qcom,tcsr";
  36. reg = <0x1957000 0x100>;
  37. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  38. };
  39. crypto@8e3a000 {
  40. status = "okay";
  41. };
  42. watchdog@b017000 {
  43. status = "okay";
  44. };
  45. };
  46. keys {
  47. compatible = "gpio-keys";
  48. reset {
  49. label = "reset";
  50. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  51. linux,code = <KEY_RESTART >;
  52. };
  53. };
  54. aliases {
  55. led-boot = &led_status_green;
  56. led-failsafe = &led_status_green;
  57. led-running = &led_status_green;
  58. led-upgrade = &led_status_green;
  59. label-mac-device = &swport4;
  60. };
  61. leds {
  62. compatible = "gpio-leds";
  63. status_red {
  64. function = LED_FUNCTION_STATUS;
  65. color = <LED_COLOR_ID_RED>;
  66. gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
  67. };
  68. led_status_green: status_green {
  69. function = LED_FUNCTION_STATUS;
  70. color = <LED_COLOR_ID_GREEN>;
  71. gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
  72. };
  73. status_blue {
  74. function = LED_FUNCTION_STATUS;
  75. color = <LED_COLOR_ID_BLUE>;
  76. gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
  77. };
  78. };
  79. watchdog {
  80. compatible = "linux,wdt-gpio";
  81. gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
  82. hw_algo = "toggle";
  83. /* hw_margin_ms is actually 300s but driver limits it to 60s */
  84. hw_margin_ms = <60000>;
  85. always-running;
  86. };
  87. };
  88. &tlmm {
  89. serial_pins: serial_pinmux {
  90. mux {
  91. pins = "gpio16", "gpio17";
  92. function = "blsp_uart0";
  93. bias-disable;
  94. };
  95. };
  96. spi_0_pins: spi_0_pinmux {
  97. pin {
  98. function = "blsp_spi0";
  99. pins = "gpio13", "gpio14", "gpio15";
  100. drive-strength = <12>;
  101. bias-disable;
  102. };
  103. pin_cs {
  104. function = "gpio";
  105. pins = "gpio12";
  106. drive-strength = <2>;
  107. bias-disable;
  108. output-high;
  109. };
  110. };
  111. enable-usb-power {
  112. gpio-hog;
  113. gpios = <58 GPIO_ACTIVE_HIGH>;
  114. output-low;
  115. line-name = "enable USB2 power";
  116. };
  117. };
  118. &blsp_dma {
  119. status = "okay";
  120. };
  121. &blsp1_spi1 {
  122. pinctrl-0 = <&spi_0_pins>;
  123. pinctrl-names = "default";
  124. status = "okay";
  125. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  126. flash@0 {
  127. #address-cells = <1>;
  128. #size-cells = <1>;
  129. compatible = "jedec,spi-nor";
  130. reg = <0>;
  131. spi-max-frequency = <24000000>;
  132. /* partitions are passed via bootloader */
  133. partitions {
  134. partition-art {
  135. label = "0:ART";
  136. nvmem-layout {
  137. compatible = "fixed-layout";
  138. #address-cells = <1>;
  139. #size-cells = <1>;
  140. macaddr_gmac0: macaddr@0 {
  141. reg = <0x0 0x6>;
  142. };
  143. macaddr_gmac1: macaddr@6 {
  144. reg = <0x6 0x6>;
  145. };
  146. precal_art_1000: precal@1000 {
  147. reg = <0x1000 0x2f20>;
  148. };
  149. precal_art_5000: precal@5000 {
  150. reg = <0x5000 0x2f20>;
  151. };
  152. precal_art_9000: precal@9000 {
  153. reg = <0x9000 0x2f20>;
  154. };
  155. };
  156. };
  157. };
  158. };
  159. };
  160. &blsp1_uart1 {
  161. pinctrl-0 = <&serial_pins>;
  162. pinctrl-names = "default";
  163. status = "okay";
  164. };
  165. &cryptobam {
  166. status = "okay";
  167. };
  168. &usb2 {
  169. status = "okay";
  170. };
  171. &usb2_hs_phy {
  172. status = "okay";
  173. };
  174. &pcie0 {
  175. status = "okay";
  176. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  177. wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
  178. bridge@0,0 {
  179. reg = <0x00000000 0 0 0 0>;
  180. #address-cells = <3>;
  181. #size-cells = <2>;
  182. ranges;
  183. wifi2: wifi@1,0 {
  184. compatible = "qcom,ath10k";
  185. status = "okay";
  186. reg = <0x00010000 0 0 0 0>;
  187. qcom,ath10k-calibration-variant = "OM-A62";
  188. ieee80211-freq-limit = <5170000 5350000>;
  189. nvmem-cell-names = "pre-calibration";
  190. nvmem-cells = <&precal_art_9000>;
  191. };
  192. };
  193. };
  194. &mdio {
  195. status = "okay";
  196. };
  197. &gmac {
  198. status = "okay";
  199. };
  200. &switch {
  201. status = "okay";
  202. };
  203. &swport4 {
  204. status = "okay";
  205. label = "ethernet1";
  206. nvmem-cell-names = "mac-address";
  207. nvmem-cells = <&macaddr_gmac0>;
  208. };
  209. &swport5 {
  210. status = "okay";
  211. label = "ethernet2";
  212. nvmem-cell-names = "mac-address";
  213. nvmem-cells = <&macaddr_gmac1>;
  214. };
  215. &wifi0 {
  216. status = "okay";
  217. qcom,ath10k-calibration-variant = "OM-A62";
  218. nvmem-cell-names = "pre-calibration";
  219. nvmem-cells = <&precal_art_1000>;
  220. };
  221. &wifi1 {
  222. status = "okay";
  223. qcom,ath10k-calibration-variant = "OM-A62";
  224. ieee80211-freq-limit = <5470000 5875000>;
  225. nvmem-cell-names = "pre-calibration";
  226. nvmem-cells = <&precal_art_5000>;
  227. };