qcom-ipq4018-a42.dts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. // SPDX-License-Identifier: ISC
  2. /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2017, Sven Eckelmann <[email protected]>
  4. */
  5. #include "qcom-ipq4019.dtsi"
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. #include <dt-bindings/soc/qcom,tcsr.h>
  10. / {
  11. model = "OpenMesh A42";
  12. compatible = "openmesh,a42";
  13. soc {
  14. rng@22000 {
  15. status = "okay";
  16. };
  17. tcsr@194b000 {
  18. /* select hostmode */
  19. compatible = "qcom,tcsr";
  20. reg = <0x194b000 0x100>;
  21. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  22. status = "okay";
  23. };
  24. tcsr@1949000 {
  25. compatible = "qcom,tcsr";
  26. reg = <0x1949000 0x100>;
  27. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  28. };
  29. ess_tcsr@1953000 {
  30. compatible = "qcom,tcsr";
  31. reg = <0x1953000 0x1000>;
  32. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  33. };
  34. tcsr@1957000 {
  35. compatible = "qcom,tcsr";
  36. reg = <0x1957000 0x100>;
  37. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  38. };
  39. usb2: usb2@60f8800 {
  40. status = "okay";
  41. };
  42. crypto@8e3a000 {
  43. status = "okay";
  44. };
  45. watchdog@b017000 {
  46. status = "okay";
  47. };
  48. };
  49. keys {
  50. compatible = "gpio-keys";
  51. reset {
  52. label = "reset";
  53. gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
  54. linux,code = <KEY_RESTART>;
  55. };
  56. };
  57. aliases {
  58. led-boot = &led_status_green;
  59. led-failsafe = &led_status_green;
  60. led-running = &led_status_green;
  61. led-upgrade = &led_status_green;
  62. label-mac-device = &swport5;
  63. };
  64. leds {
  65. compatible = "gpio-leds";
  66. status_red {
  67. function = LED_FUNCTION_STATUS;
  68. color = <LED_COLOR_ID_RED>;
  69. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  70. };
  71. led_status_green: status_green {
  72. function = LED_FUNCTION_STATUS;
  73. color = <LED_COLOR_ID_GREEN>;
  74. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  75. };
  76. status_blue {
  77. function = LED_FUNCTION_STATUS;
  78. color = <LED_COLOR_ID_BLUE>;
  79. gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
  80. };
  81. };
  82. watchdog {
  83. compatible = "linux,wdt-gpio";
  84. gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
  85. hw_algo = "toggle";
  86. /* hw_margin_ms is actually 300s but driver limits it to 60s */
  87. hw_margin_ms = <60000>;
  88. always-running;
  89. };
  90. };
  91. &tlmm {
  92. serial_pins: serial_pinmux {
  93. mux {
  94. pins = "gpio60", "gpio61";
  95. function = "blsp_uart0";
  96. bias-disable;
  97. };
  98. };
  99. spi_0_pins: spi_0_pinmux {
  100. pin {
  101. function = "blsp_spi0";
  102. pins = "gpio55", "gpio56", "gpio57";
  103. drive-strength = <12>;
  104. bias-disable;
  105. };
  106. pin_cs {
  107. function = "gpio";
  108. pins = "gpio54";
  109. drive-strength = <2>;
  110. bias-disable;
  111. output-high;
  112. };
  113. };
  114. };
  115. &blsp_dma {
  116. status = "okay";
  117. };
  118. &blsp1_spi1 {
  119. pinctrl-0 = <&spi_0_pins>;
  120. pinctrl-names = "default";
  121. status = "okay";
  122. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  123. flash@0 {
  124. #address-cells = <1>;
  125. #size-cells = <1>;
  126. compatible = "jedec,spi-nor";
  127. reg = <0>;
  128. spi-max-frequency = <24000000>;
  129. /* partitions are passed via bootloader */
  130. partitions {
  131. partition-art {
  132. label = "0:ART";
  133. nvmem-layout {
  134. compatible = "fixed-layout";
  135. #address-cells = <1>;
  136. #size-cells = <1>;
  137. macaddr_gmac0: macaddr@0 {
  138. reg = <0x0 0x6>;
  139. };
  140. macaddr_gmac1: macaddr@6 {
  141. reg = <0x6 0x6>;
  142. };
  143. precal_art_1000: precal@1000 {
  144. reg = <0x1000 0x2f20>;
  145. };
  146. precal_art_5000: precal@5000 {
  147. reg = <0x5000 0x2f20>;
  148. };
  149. };
  150. };
  151. };
  152. };
  153. };
  154. &blsp1_uart1 {
  155. pinctrl-0 = <&serial_pins>;
  156. pinctrl-names = "default";
  157. status = "okay";
  158. };
  159. &cryptobam {
  160. status = "okay";
  161. };
  162. &usb2_hs_phy {
  163. status = "okay";
  164. };
  165. &mdio {
  166. status = "okay";
  167. };
  168. &gmac {
  169. status = "okay";
  170. };
  171. &switch {
  172. status = "okay";
  173. };
  174. &swport4 {
  175. status = "okay";
  176. label = "ethernet2";
  177. nvmem-cell-names = "mac-address";
  178. nvmem-cells = <&macaddr_gmac1>;
  179. };
  180. &swport5 {
  181. status = "okay";
  182. label = "ethernet1";
  183. nvmem-cell-names = "mac-address";
  184. nvmem-cells = <&macaddr_gmac0>;
  185. };
  186. &wifi0 {
  187. status = "okay";
  188. qcom,ath10k-calibration-variant = "OM-A42";
  189. nvmem-cell-names = "pre-calibration";
  190. nvmem-cells = <&precal_art_1000>;
  191. };
  192. &wifi1 {
  193. status = "okay";
  194. qcom,ath10k-calibration-variant = "OM-A42";
  195. nvmem-cell-names = "pre-calibration";
  196. nvmem-cells = <&precal_art_5000>;
  197. };