qcom-ipq4029-gl-b1300.dts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. *
  15. */
  16. #include "qcom-ipq4019.dtsi"
  17. #include <dt-bindings/gpio/gpio.h>
  18. #include <dt-bindings/input/input.h>
  19. #include <dt-bindings/leds/common.h>
  20. #include <dt-bindings/soc/qcom,tcsr.h>
  21. / {
  22. model = "GL.iNet GL-B1300";
  23. compatible = "glinet,gl-b1300";
  24. aliases {
  25. led-boot = &power;
  26. led-failsafe = &power;
  27. led-running = &power;
  28. led-upgrade = &power;
  29. label-mac-device = &swport4;
  30. };
  31. memory {
  32. device_type = "memory";
  33. reg = <0x80000000 0x10000000>;
  34. };
  35. soc {
  36. rng@22000 {
  37. status = "okay";
  38. };
  39. mdio@90000 {
  40. status = "okay";
  41. };
  42. tcsr@1949000 {
  43. compatible = "qcom,tcsr";
  44. reg = <0x1949000 0x100>;
  45. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  46. };
  47. tcsr@194b000 {
  48. /* select hostmode */
  49. compatible = "qcom,tcsr";
  50. reg = <0x194b000 0x100>;
  51. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  52. status = "okay";
  53. };
  54. ess_tcsr@1953000 {
  55. compatible = "qcom,tcsr";
  56. reg = <0x1953000 0x1000>;
  57. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  58. };
  59. tcsr@1957000 {
  60. compatible = "qcom,tcsr";
  61. reg = <0x1957000 0x100>;
  62. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  63. };
  64. usb2@60f8800 {
  65. status = "okay";
  66. };
  67. usb3@8af8800 {
  68. status = "okay";
  69. };
  70. crypto@8e3a000 {
  71. status = "okay";
  72. };
  73. watchdog@b017000 {
  74. status = "okay";
  75. };
  76. };
  77. keys {
  78. compatible = "gpio-keys";
  79. wps {
  80. label = "wps";
  81. gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
  82. linux,code = <KEY_WPS_BUTTON>;
  83. };
  84. reset {
  85. label = "reset";
  86. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  87. linux,code = <KEY_RESTART>;
  88. };
  89. };
  90. leds {
  91. compatible = "gpio-leds";
  92. power: power {
  93. function = LED_FUNCTION_POWER;
  94. color = <LED_COLOR_ID_GREEN>;
  95. gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
  96. default-state = "on";
  97. };
  98. mesh {
  99. label = "green:mesh";
  100. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  101. };
  102. wlan {
  103. function = LED_FUNCTION_WLAN;
  104. color = <LED_COLOR_ID_GREEN>;
  105. gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
  106. };
  107. };
  108. };
  109. &blsp_dma {
  110. status = "okay";
  111. };
  112. &cryptobam {
  113. status = "okay";
  114. };
  115. &blsp1_spi1 {
  116. pinctrl-0 = <&spi_0_pins>;
  117. pinctrl-names = "default";
  118. status = "okay";
  119. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  120. mx25l25635f@0 {
  121. compatible = "jedec,spi-nor";
  122. reg = <0>;
  123. spi-max-frequency = <24000000>;
  124. partitions {
  125. compatible = "fixed-partitions";
  126. #address-cells = <1>;
  127. #size-cells = <1>;
  128. SBL1@0 {
  129. label = "SBL1";
  130. reg = <0x0 0x40000>;
  131. read-only;
  132. };
  133. MIBIB@40000 {
  134. label = "MIBIB";
  135. reg = <0x40000 0x20000>;
  136. read-only;
  137. };
  138. QSEE@60000 {
  139. label = "QSEE";
  140. reg = <0x60000 0x60000>;
  141. read-only;
  142. };
  143. CDT@c0000 {
  144. label = "CDT";
  145. reg = <0xc0000 0x10000>;
  146. read-only;
  147. };
  148. DDRPARAMS@d0000 {
  149. label = "DDRPARAMS";
  150. reg = <0xd0000 0x10000>;
  151. read-only;
  152. };
  153. APPSBLENV@e0000 {
  154. label = "APPSBLENV";
  155. reg = <0xe0000 0x10000>;
  156. read-only;
  157. };
  158. APPSBL@f0000 {
  159. label = "APPSBL";
  160. reg = <0xf0000 0x80000>;
  161. read-only;
  162. };
  163. ART@170000 {
  164. label = "ART";
  165. reg = <0x170000 0x10000>;
  166. read-only;
  167. nvmem-layout {
  168. compatible = "fixed-layout";
  169. #address-cells = <1>;
  170. #size-cells = <1>;
  171. macaddr_gmac0: macaddr@0 {
  172. compatible = "mac-base";
  173. reg = <0x0 0x6>;
  174. #nvmem-cell-cells = <1>;
  175. };
  176. macaddr_gmac1: macaddr@6 {
  177. reg = <0x6 0x6>;
  178. };
  179. precal_art_1000: precal@1000 {
  180. reg = <0x1000 0x2f20>;
  181. };
  182. precal_art_5000: precal@5000 {
  183. reg = <0x5000 0x2f20>;
  184. };
  185. };
  186. };
  187. firmware@180000 {
  188. compatible = "denx,fit";
  189. label = "firmware";
  190. reg = <0x180000 0x1e80000>;
  191. };
  192. };
  193. };
  194. };
  195. &blsp1_uart1 {
  196. pinctrl-0 = <&serial_pins>;
  197. pinctrl-names = "default";
  198. status = "okay";
  199. };
  200. &tlmm {
  201. serial_pins: serial_pinmux {
  202. mux {
  203. pins = "gpio60", "gpio61";
  204. function = "blsp_uart0";
  205. bias-disable;
  206. };
  207. };
  208. spi_0_pins: spi_0_pinmux {
  209. pinmux {
  210. function = "blsp_spi0";
  211. pins = "gpio55", "gpio56", "gpio57";
  212. };
  213. pinmux_cs {
  214. function = "gpio";
  215. pins = "gpio54";
  216. };
  217. pinconf {
  218. pins = "gpio55", "gpio56", "gpio57";
  219. drive-strength = <12>;
  220. bias-disable;
  221. };
  222. pinconf_cs {
  223. pins = "gpio54";
  224. drive-strength = <2>;
  225. bias-disable;
  226. output-high;
  227. };
  228. };
  229. };
  230. &usb2_hs_phy {
  231. status = "okay";
  232. };
  233. &usb3_hs_phy {
  234. status = "okay";
  235. };
  236. &usb3_ss_phy {
  237. status = "okay";
  238. };
  239. &gmac {
  240. status = "okay";
  241. };
  242. &switch {
  243. status = "okay";
  244. };
  245. &swport3 {
  246. status = "okay";
  247. label = "lan2";
  248. nvmem-cell-names = "mac-address";
  249. nvmem-cells = <&macaddr_gmac0 2>;
  250. };
  251. &swport4 {
  252. status = "okay";
  253. label = "lan1";
  254. nvmem-cell-names = "mac-address";
  255. nvmem-cells = <&macaddr_gmac0 0>;
  256. };
  257. &swport5 {
  258. status = "okay";
  259. nvmem-cell-names = "mac-address";
  260. nvmem-cells = <&macaddr_gmac1>;
  261. };
  262. &wifi0 {
  263. status = "okay";
  264. nvmem-cell-names = "pre-calibration";
  265. nvmem-cells = <&precal_art_1000>;
  266. qcom,ath10k-calibration-variant = "GL-B1300";
  267. };
  268. &wifi1 {
  269. status = "okay";
  270. nvmem-cell-names = "pre-calibration";
  271. nvmem-cells = <&precal_art_5000>;
  272. qcom,ath10k-calibration-variant = "GL-B1300";
  273. };