qcom-ipq4019-a62.dts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 "qcom-ipq4019-bus.dtsi"
  19. #include <dt-bindings/gpio/gpio.h>
  20. #include <dt-bindings/input/input.h>
  21. #include <dt-bindings/soc/qcom,tcsr.h>
  22. / {
  23. model = "OpenMesh A62";
  24. compatible = "openmesh,a62", "qcom,ipq4019";
  25. soc {
  26. mdio@90000 {
  27. status = "okay";
  28. };
  29. ess-psgmii@98000 {
  30. status = "okay";
  31. };
  32. tcsr@194b000 {
  33. /* select hostmode */
  34. compatible = "qcom,tcsr";
  35. reg = <0x194b000 0x100>;
  36. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  37. status = "okay";
  38. };
  39. tcsr@1949000 {
  40. compatible = "qcom,tcsr";
  41. reg = <0x1949000 0x100>;
  42. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  43. };
  44. ess_tcsr@1953000 {
  45. compatible = "qcom,tcsr";
  46. reg = <0x1953000 0x1000>;
  47. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  48. };
  49. tcsr@1957000 {
  50. compatible = "qcom,tcsr";
  51. reg = <0x1957000 0x100>;
  52. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  53. };
  54. usb2: usb2@60f8800 {
  55. status = "okay";
  56. };
  57. serial@78af000 {
  58. pinctrl-0 = <&serial_pins>;
  59. pinctrl-names = "default";
  60. status = "okay";
  61. };
  62. crypto@8e3a000 {
  63. status = "okay";
  64. };
  65. watchdog@b017000 {
  66. status = "okay";
  67. };
  68. ess-switch@c000000 {
  69. switch_lan_bmp = <0x10>;
  70. switch_wan_bmp = <0x20>;
  71. status = "okay";
  72. };
  73. edma@c080000 {
  74. status = "okay";
  75. };
  76. };
  77. gpio-keys {
  78. compatible = "gpio-keys";
  79. reset {
  80. label = "reset";
  81. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  82. linux,code = <KEY_RESTART >;
  83. };
  84. };
  85. aliases {
  86. led-boot = &power;
  87. led-failsafe = &power;
  88. led-running = &power;
  89. led-upgrade = &power;
  90. };
  91. gpio-leds {
  92. compatible = "gpio-leds";
  93. red {
  94. label = "a62:red:status";
  95. gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
  96. linux,default-trigger = "default-off";
  97. };
  98. power: green {
  99. label = "a62:green:status";
  100. gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
  101. };
  102. blue {
  103. label = "a62:blue:status";
  104. gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
  105. linux,default-trigger = "default-off";
  106. };
  107. };
  108. watchdog {
  109. compatible = "linux,wdt-gpio";
  110. gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
  111. hw_algo = "toggle";
  112. /* hw_margin_ms is actually 300s but driver limits it to 60s */
  113. hw_margin_ms = <60000>;
  114. always-running;
  115. };
  116. };
  117. &tlmm {
  118. serial_pins: serial_pinmux {
  119. mux {
  120. pins = "gpio16", "gpio17";
  121. function = "blsp_uart0";
  122. bias-disable;
  123. };
  124. };
  125. spi_0_pins: spi_0_pinmux {
  126. pin {
  127. function = "blsp_spi0";
  128. pins = "gpio13", "gpio14", "gpio15";
  129. drive-strength = <12>;
  130. bias-disable;
  131. };
  132. pin_cs {
  133. function = "gpio";
  134. pins = "gpio12";
  135. drive-strength = <2>;
  136. bias-disable;
  137. output-high;
  138. };
  139. };
  140. enable-usb-power {
  141. gpio-hog;
  142. gpios = <58 GPIO_ACTIVE_HIGH>;
  143. output-low;
  144. line-name = "enable USB2 power";
  145. };
  146. };
  147. &blsp_dma {
  148. status = "okay";
  149. };
  150. &spi_0 {
  151. pinctrl-0 = <&spi_0_pins>;
  152. pinctrl-names = "default";
  153. status = "okay";
  154. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  155. m25p80@0 {
  156. #address-cells = <1>;
  157. #size-cells = <1>;
  158. compatible = "jedec,spi-nor";
  159. reg = <0>;
  160. spi-max-frequency = <24000000>;
  161. /* partitions are passed via bootloader */
  162. };
  163. };
  164. &cryptobam {
  165. status = "okay";
  166. };
  167. &gmac0 {
  168. qcom,phy_mdio_addr = <3>;
  169. qcom,poll_required = <1>;
  170. qcom,forced_speed = <1000>;
  171. qcom,forced_duplex = <1>;
  172. vlan_tag = <1 0x10>;
  173. };
  174. &usb2_hs_phy {
  175. status = "okay";
  176. };
  177. &pcie0 {
  178. status = "okay";
  179. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  180. wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
  181. pcie@0 {
  182. reg = <0 0 0 0 0>;
  183. #interrupt-cells = <1>;
  184. #size-cells = <2>;
  185. #address-cells = <3>;
  186. device_type = "pci";
  187. ath10k@0,0 {
  188. compatible = "qcom,ath10k";
  189. status = "okay";
  190. reg = <0 0 0 0 0>;
  191. device_type = "pci";
  192. qcom,ath10k-calibration-variant = "OM-A62";
  193. };
  194. };
  195. };
  196. &wifi0 {
  197. status = "okay";
  198. qcom,ath10k-calibration-variant = "OM-A62";
  199. };
  200. &wifi1 {
  201. status = "okay";
  202. qcom,ath10k-calibration-variant = "OM-A62";
  203. };