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. usb2: usb2@60f8800 {
  40. status = "okay";
  41. };
  42. crypto@8e3a000 {
  43. status = "okay";
  44. };
  45. watchdog@b017000 {
  46. status = "okay";
  47. };
  48. };
  49. keys {
  50. compatible = "gpio-keys";
  51. reset {
  52. label = "reset";
  53. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  54. linux,code = <KEY_RESTART >;
  55. };
  56. };
  57. aliases {
  58. led-boot = &led_status_green;
  59. led-failsafe = &led_status_green;
  60. led-running = &led_status_green;
  61. led-upgrade = &led_status_green;
  62. label-mac-device = &swport4;
  63. };
  64. leds {
  65. compatible = "gpio-leds";
  66. status_red {
  67. function = LED_FUNCTION_STATUS;
  68. color = <LED_COLOR_ID_RED>;
  69. gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
  70. };
  71. led_status_green: status_green {
  72. function = LED_FUNCTION_STATUS;
  73. color = <LED_COLOR_ID_GREEN>;
  74. gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
  75. };
  76. status_blue {
  77. function = LED_FUNCTION_STATUS;
  78. color = <LED_COLOR_ID_BLUE>;
  79. gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
  80. };
  81. };
  82. watchdog {
  83. compatible = "linux,wdt-gpio";
  84. gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
  85. hw_algo = "toggle";
  86. /* hw_margin_ms is actually 300s but driver limits it to 60s */
  87. hw_margin_ms = <60000>;
  88. always-running;
  89. };
  90. };
  91. &tlmm {
  92. serial_pins: serial_pinmux {
  93. mux {
  94. pins = "gpio16", "gpio17";
  95. function = "blsp_uart0";
  96. bias-disable;
  97. };
  98. };
  99. spi_0_pins: spi_0_pinmux {
  100. pin {
  101. function = "blsp_spi0";
  102. pins = "gpio13", "gpio14", "gpio15";
  103. drive-strength = <12>;
  104. bias-disable;
  105. };
  106. pin_cs {
  107. function = "gpio";
  108. pins = "gpio12";
  109. drive-strength = <2>;
  110. bias-disable;
  111. output-high;
  112. };
  113. };
  114. enable-usb-power {
  115. gpio-hog;
  116. gpios = <58 GPIO_ACTIVE_HIGH>;
  117. output-low;
  118. line-name = "enable USB2 power";
  119. };
  120. };
  121. &blsp_dma {
  122. status = "okay";
  123. };
  124. &blsp1_spi1 {
  125. pinctrl-0 = <&spi_0_pins>;
  126. pinctrl-names = "default";
  127. status = "okay";
  128. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  129. flash@0 {
  130. #address-cells = <1>;
  131. #size-cells = <1>;
  132. compatible = "jedec,spi-nor";
  133. reg = <0>;
  134. spi-max-frequency = <24000000>;
  135. /* partitions are passed via bootloader */
  136. partitions {
  137. partition-art {
  138. label = "0:ART";
  139. nvmem-layout {
  140. compatible = "fixed-layout";
  141. #address-cells = <1>;
  142. #size-cells = <1>;
  143. macaddr_gmac0: macaddr@0 {
  144. reg = <0x0 0x6>;
  145. };
  146. macaddr_gmac1: macaddr@6 {
  147. reg = <0x6 0x6>;
  148. };
  149. precal_art_1000: precal@1000 {
  150. reg = <0x1000 0x2f20>;
  151. };
  152. precal_art_5000: precal@5000 {
  153. reg = <0x5000 0x2f20>;
  154. };
  155. precal_art_9000: precal@9000 {
  156. reg = <0x9000 0x2f20>;
  157. };
  158. };
  159. };
  160. };
  161. };
  162. };
  163. &blsp1_uart1 {
  164. pinctrl-0 = <&serial_pins>;
  165. pinctrl-names = "default";
  166. status = "okay";
  167. };
  168. &cryptobam {
  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. };