qcom-ipq4019-a62.dts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. serial@78af000 {
  57. pinctrl-0 = <&serial_pins>;
  58. pinctrl-names = "default";
  59. status = "okay";
  60. };
  61. crypto@8e3a000 {
  62. status = "okay";
  63. };
  64. watchdog@b017000 {
  65. status = "okay";
  66. };
  67. ess-switch@c000000 {
  68. switch_lan_bmp = <0x10>;
  69. switch_wan_bmp = <0x20>;
  70. status = "okay";
  71. };
  72. edma@c080000 {
  73. status = "okay";
  74. };
  75. };
  76. gpio-keys {
  77. compatible = "gpio-keys";
  78. reset {
  79. label = "reset";
  80. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  81. linux,code = <KEY_RESTART >;
  82. };
  83. };
  84. aliases {
  85. led-boot = &power;
  86. led-failsafe = &power;
  87. led-running = &power;
  88. led-upgrade = &power;
  89. };
  90. gpio-leds {
  91. compatible = "gpio-leds";
  92. red {
  93. label = "a62:red:status";
  94. gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
  95. linux,default-trigger = "default-off";
  96. };
  97. power: green {
  98. label = "a62:green:status";
  99. gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
  100. };
  101. blue {
  102. label = "a62:blue:status";
  103. gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
  104. linux,default-trigger = "default-off";
  105. };
  106. };
  107. watchdog {
  108. compatible = "linux,wdt-gpio";
  109. gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
  110. hw_algo = "toggle";
  111. /* hw_margin_ms is actually 300s but driver limits it to 60s */
  112. hw_margin_ms = <60000>;
  113. always-running;
  114. };
  115. };
  116. &tlmm {
  117. serial_pins: serial_pinmux {
  118. mux {
  119. pins = "gpio16", "gpio17";
  120. function = "blsp_uart0";
  121. bias-disable;
  122. };
  123. };
  124. spi_0_pins: spi_0_pinmux {
  125. pin {
  126. function = "blsp_spi0";
  127. pins = "gpio13", "gpio14", "gpio15";
  128. drive-strength = <12>;
  129. bias-disable;
  130. };
  131. pin_cs {
  132. function = "gpio";
  133. pins = "gpio12";
  134. drive-strength = <2>;
  135. bias-disable;
  136. output-high;
  137. };
  138. };
  139. enable-usb-power {
  140. gpio-hog;
  141. gpios = <58 GPIO_ACTIVE_HIGH>;
  142. output-low;
  143. line-name = "enable USB2 power";
  144. };
  145. };
  146. &blsp_dma {
  147. status = "okay";
  148. };
  149. &blsp1_spi1 {
  150. pinctrl-0 = <&spi_0_pins>;
  151. pinctrl-names = "default";
  152. status = "okay";
  153. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  154. m25p80@0 {
  155. #address-cells = <1>;
  156. #size-cells = <1>;
  157. compatible = "jedec,spi-nor";
  158. reg = <0>;
  159. spi-max-frequency = <24000000>;
  160. /* partitions are passed via bootloader */
  161. };
  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@0,0 {
  186. compatible = "qcom,ath10k";
  187. status = "okay";
  188. reg = <0x00010000 0 0 0 0>;
  189. qcom,ath10k-calibration-variant = "OM-A62";
  190. };
  191. };
  192. };
  193. &wifi0 {
  194. status = "okay";
  195. qcom,ath10k-calibration-variant = "OM-A62";
  196. };
  197. &wifi1 {
  198. status = "okay";
  199. qcom,ath10k-calibration-variant = "OM-A62";
  200. };