qcom-ipq4018-gl-a1300.dts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "qcom-ipq4019.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include <dt-bindings/soc/qcom,tcsr.h>
  7. / {
  8. model = "GL.iNet GL-A1300";
  9. compatible = "glinet,gl-a1300", "qcom,ipq4019";
  10. aliases {
  11. led-boot = &led_run;
  12. led-failsafe = &led_run;
  13. led-running = &led_run;
  14. led-upgrade = &led_run;
  15. label-mac-device = &swport4;
  16. };
  17. chosen {
  18. bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1";
  19. };
  20. soc {
  21. tcsr@1949000 {
  22. compatible = "qcom,tcsr";
  23. reg = <0x1949000 0x100>;
  24. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  25. };
  26. tcsr@194b000 {
  27. /* select hostmode */
  28. compatible = "qcom,tcsr";
  29. reg = <0x194b000 0x100>;
  30. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  31. status = "okay";
  32. };
  33. ess_tcsr@1953000 {
  34. compatible = "qcom,tcsr";
  35. reg = <0x1953000 0x1000>;
  36. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  37. };
  38. tcsr@1957000 {
  39. compatible = "qcom,tcsr";
  40. reg = <0x1957000 0x100>;
  41. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  42. };
  43. };
  44. keys {
  45. compatible = "gpio-keys";
  46. reset {
  47. label = "reset";
  48. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  49. linux,code = <KEY_RESTART>;
  50. };
  51. switch {
  52. label = "switch-button";
  53. gpios = <&tlmm 0 GPIO_ACTIVE_LOW>;
  54. linux,code = <KEY_SETUP>;
  55. };
  56. };
  57. leds {
  58. compatible = "gpio-leds";
  59. led_run: blue {
  60. function = LED_FUNCTION_STATUS;
  61. color = <LED_COLOR_ID_BLUE>;
  62. gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
  63. };
  64. white {
  65. function = LED_FUNCTION_STATUS;
  66. color = <LED_COLOR_ID_WHITE>;
  67. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  68. };
  69. };
  70. gpio_export {
  71. compatible = "gpio-export";
  72. usb {
  73. gpio-export,name = "usb_power";
  74. gpio-export,output = <1>;
  75. gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
  76. };
  77. };
  78. };
  79. &prng {
  80. status = "okay";
  81. };
  82. &mdio {
  83. status = "okay";
  84. };
  85. &blsp_dma {
  86. status = "okay";
  87. };
  88. &watchdog {
  89. status = "okay";
  90. };
  91. &crypto {
  92. status = "okay";
  93. };
  94. &cryptobam {
  95. status = "okay";
  96. };
  97. &blsp1_spi1 {
  98. status = "okay";
  99. pinctrl-0 = <&spi0_pins>;
  100. pinctrl-names = "default";
  101. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 5 GPIO_ACTIVE_HIGH>;
  102. flash@0 {
  103. compatible = "jedec,spi-nor";
  104. reg = <0>;
  105. spi-max-frequency = <24000000>;
  106. partitions {
  107. compatible = "fixed-partitions";
  108. #address-cells = <1>;
  109. #size-cells = <1>;
  110. partition@0 {
  111. label = "SBL1";
  112. reg = <0x00000000 0x00040000>;
  113. read-only;
  114. };
  115. partition@40000 {
  116. label = "MIBIB";
  117. reg = <0x00040000 0x00020000>;
  118. read-only;
  119. };
  120. partition@60000 {
  121. label = "QSEE";
  122. reg = <0x00060000 0x00060000>;
  123. read-only;
  124. };
  125. partition@c0000 {
  126. label = "CDT";
  127. reg = <0x000c0000 0x00010000>;
  128. read-only;
  129. };
  130. partition@d0000 {
  131. label = "DDRPARAMS";
  132. reg = <0x000d0000 0x00010000>;
  133. read-only;
  134. };
  135. partition@e0000 {
  136. label = "APPSBLENV"; /* uboot env*/
  137. reg = <0x000e0000 0x00010000>;
  138. };
  139. partition@f0000 {
  140. label = "APPSBL"; /* uboot */
  141. reg = <0x000f0000 0x00080000>;
  142. read-only;
  143. };
  144. partition@170000 {
  145. label = "ART";
  146. reg = <0x00170000 0x00010000>;
  147. read-only;
  148. nvmem-layout {
  149. compatible = "fixed-layout";
  150. #address-cells = <1>;
  151. #size-cells = <1>;
  152. macaddr_gmac0: macaddr@0 {
  153. compatible = "mac-base";
  154. reg = <0x0 0x6>;
  155. #nvmem-cell-cells = <1>;
  156. };
  157. macaddr_gmac1: macaddr@6 {
  158. reg = <0x6 0x6>;
  159. };
  160. precal_art_1000: precal@1000 {
  161. reg = <0x1000 0x2f20>;
  162. };
  163. precal_art_5000: precal@5000 {
  164. reg = <0x5000 0x2f20>;
  165. };
  166. };
  167. };
  168. partition@180000 {
  169. label = "log";
  170. reg = <0x00180000 0x00020000>;
  171. };
  172. };
  173. };
  174. spi-nand@1 {
  175. compatible = "spi-nand";
  176. reg = <1>;
  177. spi-max-frequency = <24000000>;
  178. partitions {
  179. compatible = "fixed-partitions";
  180. #address-cells = <1>;
  181. #size-cells = <1>;
  182. partition@0 {
  183. label = "ubi";
  184. reg = <0x00000000 0x08000000>;
  185. };
  186. };
  187. };
  188. };
  189. &blsp1_uart1 {
  190. pinctrl-0 = <&serial_pins>;
  191. pinctrl-names = "default";
  192. status = "okay";
  193. };
  194. &tlmm {
  195. serial_pins: serial_pinmux {
  196. mux {
  197. pins = "gpio60", "gpio61";
  198. function = "blsp_uart0";
  199. bias-disable;
  200. };
  201. };
  202. i2c_0_pins: i2c_0_pinmux {
  203. pinmux {
  204. pins = "gpio58", "gpio59";
  205. function = "blsp_i2c0";
  206. bias-disable;
  207. };
  208. };
  209. spi0_pins: spi0_pinmux {
  210. mux_spi {
  211. function = "blsp_spi0";
  212. pins = "gpio55", "gpio56", "gpio57";
  213. drive-strength = <12>;
  214. bias-disable;
  215. };
  216. mux_cs {
  217. function = "gpio";
  218. pins = "gpio54", "gpio5";
  219. drive-strength = <2>;
  220. bias-disable;
  221. output-high;
  222. };
  223. };
  224. };
  225. &blsp1_i2c3 {
  226. status = "okay";
  227. pinctrl-0 = <&i2c_0_pins>;
  228. pinctrl-names = "default";
  229. };
  230. &usb2 {
  231. status = "okay";
  232. };
  233. &usb3 {
  234. status = "okay";
  235. };
  236. &usb2_hs_phy {
  237. status = "okay";
  238. };
  239. &usb3_hs_phy {
  240. status = "okay";
  241. };
  242. &usb3_ss_phy {
  243. status = "okay";
  244. };
  245. &gmac {
  246. status = "okay";
  247. };
  248. &switch {
  249. status = "okay";
  250. };
  251. &swport3 {
  252. status = "okay";
  253. label = "lan2";
  254. nvmem-cell-names = "mac-address";
  255. nvmem-cells = <&macaddr_gmac0 2>;
  256. };
  257. &swport4 {
  258. status = "okay";
  259. label = "lan1";
  260. nvmem-cell-names = "mac-address";
  261. nvmem-cells = <&macaddr_gmac0 0>;
  262. };
  263. &swport5 {
  264. status = "okay";
  265. nvmem-cell-names = "mac-address";
  266. nvmem-cells = <&macaddr_gmac1>;
  267. };
  268. &wifi0 {
  269. status = "okay";
  270. nvmem-cell-names = "pre-calibration";
  271. nvmem-cells = <&precal_art_1000>;
  272. qcom,ath10k-calibration-variant = "GL-A1300";
  273. };
  274. &wifi1 {
  275. status = "okay";
  276. nvmem-cell-names = "pre-calibration";
  277. nvmem-cells = <&precal_art_5000>;
  278. qcom,ath10k-calibration-variant = "GL-A1300";
  279. };