qcom-ipq4019-a62.dts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
  2. * Copyright (c) 2017-2018, Sven Eckelmann <[email protected]>
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. *
  16. */
  17. #include "qcom-ipq4019.dtsi"
  18. #include <dt-bindings/gpio/gpio.h>
  19. #include <dt-bindings/input/input.h>
  20. #include <dt-bindings/soc/qcom,tcsr.h>
  21. / {
  22. model = "OpenMesh A62";
  23. compatible = "openmesh,a62", "qcom,ipq4019";
  24. soc {
  25. mdio@90000 {
  26. status = "okay";
  27. };
  28. ess-psgmii@98000 {
  29. status = "okay";
  30. };
  31. tcsr@194b000 {
  32. /* select hostmode */
  33. compatible = "qcom,tcsr";
  34. reg = <0x194b000 0x100>;
  35. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  36. status = "okay";
  37. };
  38. tcsr@1949000 {
  39. compatible = "qcom,tcsr";
  40. reg = <0x1949000 0x100>;
  41. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  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. usb2: usb2@60f8800 {
  54. status = "okay";
  55. };
  56. crypto@8e3a000 {
  57. status = "okay";
  58. };
  59. watchdog@b017000 {
  60. status = "okay";
  61. };
  62. ess-switch@c000000 {
  63. switch_lan_bmp = <0x10>;
  64. switch_wan_bmp = <0x20>;
  65. status = "okay";
  66. };
  67. edma@c080000 {
  68. status = "okay";
  69. };
  70. };
  71. keys {
  72. compatible = "gpio-keys";
  73. reset {
  74. label = "reset";
  75. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  76. linux,code = <KEY_RESTART >;
  77. };
  78. };
  79. aliases {
  80. led-boot = &power;
  81. led-failsafe = &power;
  82. led-running = &power;
  83. led-upgrade = &power;
  84. };
  85. leds {
  86. compatible = "gpio-leds";
  87. red {
  88. label = "a62:red:status";
  89. gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
  90. linux,default-trigger = "default-off";
  91. };
  92. power: green {
  93. label = "a62:green:status";
  94. gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
  95. };
  96. blue {
  97. label = "a62:blue:status";
  98. gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
  99. linux,default-trigger = "default-off";
  100. };
  101. };
  102. watchdog {
  103. compatible = "linux,wdt-gpio";
  104. gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
  105. hw_algo = "toggle";
  106. /* hw_margin_ms is actually 300s but driver limits it to 60s */
  107. hw_margin_ms = <60000>;
  108. always-running;
  109. };
  110. };
  111. &tlmm {
  112. serial_pins: serial_pinmux {
  113. mux {
  114. pins = "gpio16", "gpio17";
  115. function = "blsp_uart0";
  116. bias-disable;
  117. };
  118. };
  119. spi_0_pins: spi_0_pinmux {
  120. pin {
  121. function = "blsp_spi0";
  122. pins = "gpio13", "gpio14", "gpio15";
  123. drive-strength = <12>;
  124. bias-disable;
  125. };
  126. pin_cs {
  127. function = "gpio";
  128. pins = "gpio12";
  129. drive-strength = <2>;
  130. bias-disable;
  131. output-high;
  132. };
  133. };
  134. enable-usb-power {
  135. gpio-hog;
  136. gpios = <58 GPIO_ACTIVE_HIGH>;
  137. output-low;
  138. line-name = "enable USB2 power";
  139. };
  140. };
  141. &blsp_dma {
  142. status = "okay";
  143. };
  144. &blsp1_spi1 {
  145. pinctrl-0 = <&spi_0_pins>;
  146. pinctrl-names = "default";
  147. status = "okay";
  148. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  149. m25p80@0 {
  150. #address-cells = <1>;
  151. #size-cells = <1>;
  152. compatible = "jedec,spi-nor";
  153. reg = <0>;
  154. spi-max-frequency = <24000000>;
  155. /* partitions are passed via bootloader */
  156. };
  157. };
  158. &blsp1_uart1 {
  159. pinctrl-0 = <&serial_pins>;
  160. pinctrl-names = "default";
  161. status = "okay";
  162. };
  163. &cryptobam {
  164. status = "okay";
  165. };
  166. &gmac0 {
  167. qcom,phy_mdio_addr = <3>;
  168. qcom,poll_required = <1>;
  169. qcom,forced_speed = <1000>;
  170. qcom,forced_duplex = <1>;
  171. vlan_tag = <1 0x10>;
  172. };
  173. &usb2_hs_phy {
  174. status = "okay";
  175. };
  176. &pcie0 {
  177. status = "okay";
  178. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  179. wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
  180. bridge@0,0 {
  181. reg = <0x00000000 0 0 0 0>;
  182. #address-cells = <3>;
  183. #size-cells = <2>;
  184. ranges;
  185. wifi2: wifi@1,0 {
  186. compatible = "qcom,ath10k";
  187. status = "okay";
  188. reg = <0x00010000 0 0 0 0>;
  189. qcom,ath10k-calibration-variant = "OM-A62";
  190. ieee80211-freq-limit = <5170000 5350000>;
  191. };
  192. };
  193. };
  194. &wifi0 {
  195. status = "okay";
  196. qcom,ath10k-calibration-variant = "OM-A62";
  197. };
  198. &wifi1 {
  199. status = "okay";
  200. qcom,ath10k-calibration-variant = "OM-A62";
  201. ieee80211-freq-limit = <5470000 5875000>;
  202. };