qcom-ipq4018-sxtsq-5-ac.dts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /* Copyright (c) 2020, Robert Marko <[email protected]> */
  3. #include "qcom-ipq4019.dtsi"
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/input/input.h>
  6. #include <dt-bindings/leds/common.h>
  7. #include <dt-bindings/soc/qcom,tcsr.h>
  8. / {
  9. model = "MikroTik SXTsq 5 ac (RBSXTsqG-5acD)";
  10. compatible = "mikrotik,sxtsq-5-ac";
  11. memory {
  12. device_type = "memory";
  13. reg = <0x80000000 0x10000000>;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. aliases {
  19. led-boot = &led_user;
  20. led-failsafe = &led_user;
  21. led-running = &led_user;
  22. led-upgrade = &led_user;
  23. };
  24. soc {
  25. rng@22000 {
  26. status = "okay";
  27. };
  28. mdio@90000 {
  29. status = "okay";
  30. };
  31. counter@4a1000 {
  32. compatible = "qcom,qca-gcnt";
  33. reg = <0x4a1000 0x4>;
  34. };
  35. tcsr@1949000 {
  36. compatible = "qcom,tcsr";
  37. reg = <0x1949000 0x100>;
  38. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  39. };
  40. ess_tcsr@1953000 {
  41. compatible = "qcom,tcsr";
  42. reg = <0x1953000 0x1000>;
  43. qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII4>;
  44. };
  45. tcsr@1957000 {
  46. compatible = "qcom,tcsr";
  47. reg = <0x1957000 0x100>;
  48. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  49. };
  50. crypto@8e3a000 {
  51. status = "okay";
  52. };
  53. watchdog@b017000 {
  54. status = "okay";
  55. };
  56. };
  57. keys {
  58. compatible = "gpio-keys";
  59. reset {
  60. label = "reset";
  61. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  62. linux,code = <KEY_RESTART>;
  63. };
  64. };
  65. leds {
  66. compatible = "gpio-leds";
  67. power {
  68. function = LED_FUNCTION_POWER;
  69. color = <LED_COLOR_ID_BLUE>;
  70. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  71. default-state = "keep";
  72. panic-indicator;
  73. };
  74. led_user: user {
  75. label = "green:user";
  76. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  77. };
  78. rssilow {
  79. label = "green:rssilow";
  80. gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
  81. };
  82. rssimediumlow {
  83. label = "green:rssimediumlow";
  84. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  85. };
  86. rssimedium {
  87. label = "green:rssimedium";
  88. gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
  89. };
  90. rssimediumhigh {
  91. label = "green:rssimediumhigh";
  92. gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
  93. };
  94. rssihigh {
  95. label = "green:rssihigh";
  96. gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
  97. };
  98. };
  99. };
  100. &tlmm {
  101. serial_pins: serial_pinmux {
  102. mux {
  103. pins = "gpio60", "gpio61";
  104. function = "blsp_uart0";
  105. bias-disable;
  106. };
  107. };
  108. spi_0_pins: spi_0_pinmux {
  109. pin {
  110. function = "blsp_spi0";
  111. pins = "gpio55", "gpio56", "gpio57";
  112. drive-strength = <2>;
  113. bias-disable;
  114. };
  115. pin_cs {
  116. function = "gpio";
  117. pins = "gpio54";
  118. drive-strength = <2>;
  119. bias-disable;
  120. output-high;
  121. };
  122. };
  123. };
  124. &blsp_dma {
  125. status = "okay";
  126. };
  127. &blsp1_spi1 {
  128. status = "okay";
  129. pinctrl-0 = <&spi_0_pins>;
  130. pinctrl-names = "default";
  131. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  132. flash@0 {
  133. reg = <0>;
  134. compatible = "jedec,spi-nor";
  135. spi-max-frequency = <40000000>;
  136. partitions {
  137. compatible = "fixed-partitions";
  138. #address-cells = <1>;
  139. #size-cells = <1>;
  140. partition@0 {
  141. label = "Qualcomm";
  142. reg = <0x0 0x80000>;
  143. read-only;
  144. };
  145. partition@80000 {
  146. compatible = "mikrotik,routerboot-partitions";
  147. #address-cells = <1>;
  148. #size-cells = <1>;
  149. label = "RouterBoot";
  150. reg = <0x80000 0x80000>;
  151. hard_config {
  152. read-only;
  153. };
  154. dtb_config {
  155. read-only;
  156. };
  157. soft_config {
  158. };
  159. };
  160. partition@100000 {
  161. compatible = "mikrotik,minor";
  162. label = "firmware";
  163. reg = <0x100000 0xf00000>;
  164. };
  165. };
  166. };
  167. };
  168. &blsp1_uart1 {
  169. status = "okay";
  170. pinctrl-0 = <&serial_pins>;
  171. pinctrl-names = "default";
  172. };
  173. &cryptobam {
  174. status = "okay";
  175. };
  176. &wifi1 {
  177. status = "okay";
  178. qcom,ath10k-calibration-variant = "MikroTik-SXTsq-5-ac";
  179. };
  180. &mdio {
  181. status = "okay";
  182. };
  183. &gmac {
  184. status = "okay";
  185. };
  186. &switch {
  187. status = "okay";
  188. /delete-property/ psgmii-ethphy;
  189. };
  190. &swport5 {
  191. status = "okay";
  192. label = "lan";
  193. phy-mode = "rgmii";
  194. };