qcom-ipq4019-lhgg-60ad.dts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
  2. * Copyright (c) 2019, Robert Marko <[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 = "Mikrotik Wireless Wire Dish LHGG-60ad";
  23. compatible = "mikrotik,lhgg-60ad";
  24. memory {
  25. device_type = "memory";
  26. reg = <0x80000000 0x10000000>;
  27. };
  28. chosen {
  29. stdout-path = "serial0:115200n8";
  30. };
  31. aliases {
  32. led-boot = &user;
  33. led-failsafe = &user;
  34. led-running = &user;
  35. led-upgrade = &user;
  36. };
  37. soc {
  38. rng@22000 {
  39. status = "okay";
  40. };
  41. mdio@90000 {
  42. status = "okay";
  43. /delete-node/ ethernet-phy@1;
  44. /delete-node/ ethernet-phy@2;
  45. /delete-node/ ethernet-phy@3;
  46. /delete-node/ ethernet-phy@4;
  47. /delete-node/ psgmii-phy@5;
  48. };
  49. counter@4a1000 {
  50. compatible = "qcom,qca-gcnt";
  51. reg = <0x4a1000 0x4>;
  52. };
  53. tcsr@1949000 {
  54. compatible = "qcom,tcsr";
  55. reg = <0x1949000 0x100>;
  56. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  57. };
  58. ess_tcsr@1953000 {
  59. compatible = "qcom,tcsr";
  60. reg = <0x1953000 0x1000>;
  61. qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
  62. };
  63. tcsr@1957000 {
  64. compatible = "qcom,tcsr";
  65. reg = <0x1957000 0x100>;
  66. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  67. };
  68. crypto@8e3a000 {
  69. status = "okay";
  70. };
  71. watchdog@b017000 {
  72. status = "okay";
  73. };
  74. ess-switch@c000000 {
  75. switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */
  76. switch_lan_bmp = <0x0>; /* lan port bitmap */
  77. switch_wan_bmp = <0x10>; /* wan port bitmap */
  78. };
  79. edma@c080000 {
  80. status = "okay";
  81. phy-mode = "rgmii-id";
  82. qcom,num_gmac = <1>;
  83. qcom,single-phy;
  84. };
  85. };
  86. keys {
  87. compatible = "gpio-keys";
  88. reset {
  89. label = "reset";
  90. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  91. linux,code = <KEY_RESTART>;
  92. };
  93. };
  94. leds {
  95. compatible = "gpio-leds";
  96. power: power {
  97. label = "blue:power";
  98. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  99. default-state = "keep";
  100. panic-indicator;
  101. };
  102. user: user {
  103. label = "yellow:user";
  104. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  105. };
  106. wlan {
  107. label = "green:wlan";
  108. gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
  109. };
  110. align-left {
  111. label = "green:align-left";
  112. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  113. };
  114. align-right {
  115. label = "green:align-right";
  116. gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
  117. };
  118. wlan-rx {
  119. label = "green:align-down";
  120. gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
  121. };
  122. wlan-tx {
  123. label = "green:align-up";
  124. gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
  125. };
  126. };
  127. };
  128. &tlmm {
  129. serial_pins: serial_pinmux {
  130. mux {
  131. pins = "gpio60", "gpio61";
  132. function = "blsp_uart0";
  133. bias-disable;
  134. };
  135. };
  136. spi_0_pins: spi-0-pinmux {
  137. pinmux {
  138. function = "blsp_spi0";
  139. pins = "gpio13", "gpio14", "gpio15";
  140. bias-disable;
  141. };
  142. pinmux_cs {
  143. function = "gpio";
  144. pins = "gpio12";
  145. bias-disable;
  146. output-high;
  147. };
  148. };
  149. };
  150. &blsp_dma {
  151. status = "okay";
  152. };
  153. &blsp1_spi1 {
  154. pinctrl-0 = <&spi_0_pins>;
  155. pinctrl-names = "default";
  156. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  157. status = "okay";
  158. m25p80@0 {
  159. reg = <0>;
  160. compatible = "jedec,spi-nor";
  161. spi-max-frequency = <24000000>;
  162. partitions {
  163. compatible = "fixed-partitions";
  164. #address-cells = <1>;
  165. #size-cells = <1>;
  166. partition@0 {
  167. label = "Qualcomm";
  168. reg = <0x0 0x80000>;
  169. read-only;
  170. };
  171. partition@80000 {
  172. compatible = "mikrotik,routerboot-partitions";
  173. #address-cells = <1>;
  174. #size-cells = <1>;
  175. label = "RouterBoot";
  176. reg = <0x80000 0x80000>;
  177. read-only;
  178. hard_config {
  179. read-only;
  180. size = <0x2000>;
  181. };
  182. dtb_config {
  183. read-only;
  184. };
  185. soft_config {
  186. };
  187. };
  188. partition@100000 {
  189. compatible = "mikrotik,minor";
  190. label = "firmware";
  191. reg = <0x100000 0xf00000>;
  192. };
  193. };
  194. };
  195. };
  196. &blsp1_uart1 {
  197. pinctrl-0 = <&serial_pins>;
  198. pinctrl-names = "default";
  199. status = "okay";
  200. };
  201. &cryptobam {
  202. status = "okay";
  203. };
  204. &pcie0 {
  205. status = "okay";
  206. perst-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>;
  207. bridge@0,0 {
  208. reg = <0x00000000 0 0 0 0>;
  209. #address-cells = <3>;
  210. #size-cells = <2>;
  211. ranges;
  212. /* wil6210 802.11ad card */
  213. wifi: wifi@1,0 {
  214. status = "okay";
  215. /* wil6210 driver has no compatible */
  216. reg = <0x00010000 0 0 0 0>;
  217. };
  218. };
  219. };
  220. &gmac0 {
  221. qcom,phy_mdio_addr = <0>;
  222. qcom,poll_required = <1>;
  223. vlan_tag = <0 0x20>;
  224. };