qcom-ipq40x9-dr40x9.dts 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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/soc/qcom,tcsr.h>
  6. / {
  7. model = "Wallystech DR40X9";
  8. compatible = "wallys,dr40x9";
  9. chosen {
  10. bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1";
  11. };
  12. soc {
  13. counter@4a1000 {
  14. compatible = "qcom,qca-gcnt";
  15. reg = <0x4a1000 0x4>;
  16. };
  17. tcsr@1949000 {
  18. compatible = "qcom,tcsr";
  19. reg = <0x1949000 0x100>;
  20. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  21. };
  22. tcsr@194b000 {
  23. status = "okay";
  24. /* select hostmode */
  25. compatible = "qcom,tcsr";
  26. reg = <0x194b000 0x100>;
  27. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  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. };
  40. keys {
  41. compatible = "gpio-keys";
  42. reset {
  43. label = "reset";
  44. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  45. linux,code = <KEY_RESTART>;
  46. };
  47. };
  48. leds {
  49. compatible = "gpio-leds";
  50. wlan2g {
  51. label = "dr4029:green:wlan2g";
  52. gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
  53. linux,default-trigger = "phy0tpt";
  54. };
  55. wlan5g {
  56. label = "dr4029:green:wlan5g";
  57. gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
  58. linux,default-trigger = "phy1tpt";
  59. };
  60. wlan2g-strength {
  61. label = "dr4029:green:wlan2g-strength";
  62. gpios = <&tlmm 36 GPIO_ACTIVE_LOW>;
  63. };
  64. wlan5g-strength {
  65. label = "dr4029:green:wlan5g-strength";
  66. gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
  67. };
  68. };
  69. };
  70. &tlmm {
  71. mdio_pins: mdio_pinmux {
  72. mux_1 {
  73. pins = "gpio6";
  74. function = "mdio";
  75. bias-pull-up;
  76. };
  77. mux_2 {
  78. pins = "gpio7";
  79. function = "mdc";
  80. bias-pull-up;
  81. };
  82. };
  83. serial0_pins: serial0_pinmux {
  84. mux {
  85. pins = "gpio16", "gpio17";
  86. function = "blsp_uart0";
  87. bias-disable;
  88. };
  89. };
  90. serial1_pins: serial1_pinmux {
  91. mux {
  92. pins = "gpio8", "gpio9";
  93. function = "blsp_uart1";
  94. bias-disable;
  95. };
  96. };
  97. spi_0_pins: spi_0_pinmux {
  98. pinmux {
  99. function = "blsp_spi0";
  100. pins = "gpio13", "gpio14", "gpio15";
  101. drive-strength = <12>;
  102. bias-disable;
  103. };
  104. pinmux_cs {
  105. function = "gpio";
  106. pins = "gpio12";
  107. drive-strength = <2>;
  108. bias-disable;
  109. output-high;
  110. };
  111. };
  112. nand_pins: nand_pins {
  113. pullups {
  114. pins = "gpio52", "gpio53", "gpio58", "gpio59";
  115. function = "qpic";
  116. bias-pull-up;
  117. };
  118. pulldowns {
  119. pins = "gpio54", "gpio55", "gpio56", "gpio57",
  120. "gpio60", "gpio62", "gpio63", "gpio64",
  121. "gpio65", "gpio66", "gpio67", "gpio68",
  122. "gpio69";
  123. function = "qpic";
  124. bias-pull-down;
  125. };
  126. };
  127. sd_pins: sd_pins {
  128. pinmux {
  129. function = "sdio";
  130. pins = "gpio23", "gpio24", "gpio25", "gpio26",
  131. "gpio28", "gpio29", "gpio30", "gpio31";
  132. drive-strength = <10>;
  133. };
  134. pinmux_sd_clk {
  135. function = "sdio";
  136. pins = "gpio27";
  137. drive-strength = <16>;
  138. };
  139. pinmux_sd7 {
  140. function = "sdio";
  141. pins = "gpio32";
  142. drive-strength = <10>;
  143. bias-disable;
  144. };
  145. };
  146. };
  147. &blsp_dma {
  148. status = "okay";
  149. };
  150. &blsp1_spi1 {
  151. status = "okay";
  152. pinctrl-0 = <&spi_0_pins>;
  153. pinctrl-names = "default";
  154. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  155. flash@0 {
  156. compatible = "jedec,spi-nor";
  157. spi-max-frequency = <24000000>;
  158. reg = <0>;
  159. partitions {
  160. compatible = "fixed-partitions";
  161. #address-cells = <1>;
  162. #size-cells = <1>;
  163. partition0@0 {
  164. label = "0:SBL1";
  165. reg = <0x00000000 0x00040000>;
  166. read-only;
  167. };
  168. partition1@40000 {
  169. label = "0:MIBIB";
  170. reg = <0x00040000 0x00020000>;
  171. read-only;
  172. };
  173. partition2@60000 {
  174. label = "0:QSEE";
  175. reg = <0x00060000 0x00060000>;
  176. read-only;
  177. };
  178. partition3@c0000 {
  179. label = "0:CDT";
  180. reg = <0x000c0000 0x00010000>;
  181. read-only;
  182. };
  183. partition4@d0000 {
  184. label = "0:DDRPARAMS";
  185. reg = <0x000d0000 0x00010000>;
  186. read-only;
  187. };
  188. partition5@e0000 {
  189. label = "0:APPSBLENV"; /* uboot env */
  190. reg = <0x000e0000 0x00010000>;
  191. read-only;
  192. };
  193. partition6@f0000 {
  194. label = "0:APPSBL"; /* uboot */
  195. reg = <0x000f0000 0x00080000>;
  196. read-only;
  197. };
  198. partition7@170000 {
  199. label = "0:ART";
  200. reg = <0x00170000 0x00010000>;
  201. read-only;
  202. compatible = "nvmem-cells";
  203. #address-cells = <1>;
  204. #size-cells = <1>;
  205. precal_art_1000: precal@1000 {
  206. reg = <0x1000 0x2f20>;
  207. };
  208. precal_art_5000: precal@5000 {
  209. reg = <0x5000 0x2f20>;
  210. };
  211. macaddr_art_0: mac-address@0 {
  212. reg = <0x0 0x6>;
  213. };
  214. macaddr_art_6: mac-address@6 {
  215. reg = <0x6 0x6>;
  216. };
  217. macaddr_art_1006: mac-address@1006 {
  218. reg = <0x1006 0x6>;
  219. };
  220. macaddr_art_5006: mac-address@5006 {
  221. reg = <0x5006 0x6>;
  222. };
  223. };
  224. partition8@180000 {
  225. label = "0:CONFIG";
  226. reg = <0x00180000 0x00010000>;
  227. read-only;
  228. };
  229. };
  230. };
  231. };
  232. &qpic_bam {
  233. status = "okay";
  234. };
  235. &nand {
  236. status = "okay";
  237. pinctrl-0 = <&nand_pins>;
  238. pinctrl-names = "default";
  239. nand@0 {
  240. partitions {
  241. compatible = "fixed-partitions";
  242. #address-cells = <1>;
  243. #size-cells = <1>;
  244. partition@0 {
  245. label = "ubi";
  246. reg = <0x00000000 0x04000000>;
  247. };
  248. };
  249. };
  250. };
  251. &blsp1_uart1 {
  252. status = "okay";
  253. pinctrl-0 = <&serial0_pins>;
  254. pinctrl-names = "default";
  255. };
  256. &blsp1_uart2 {
  257. status = "okay";
  258. pinctrl-0 = <&serial1_pins>;
  259. pinctrl-names = "default";
  260. };
  261. &crypto {
  262. status = "okay";
  263. };
  264. &cryptobam {
  265. num-channels = <4>;
  266. qcom,num-ees = <2>;
  267. status = "okay";
  268. };
  269. &mdio {
  270. status = "okay";
  271. pinctrl-0 = <&mdio_pins>;
  272. pinctrl-names = "default";
  273. reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
  274. reset-delay-us = <2000>;
  275. };
  276. &pcie0 {
  277. status = "okay";
  278. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  279. wake-gpio = <&tlmm 40 GPIO_ACTIVE_LOW>;
  280. /* Unpolulated slot */
  281. bridge@0,0 {
  282. reg = <0x00000000 0 0 0 0>;
  283. #address-cells = <3>;
  284. #size-cells = <2>;
  285. ranges;
  286. };
  287. };
  288. &vqmmc {
  289. status = "okay";
  290. };
  291. &sdhci {
  292. status = "okay";
  293. pinctrl-0 = <&sd_pins>;
  294. pinctrl-names = "default";
  295. cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
  296. vqmmc-supply = <&vqmmc>;
  297. };
  298. &gmac {
  299. status = "okay";
  300. };
  301. &switch {
  302. status = "okay";
  303. };
  304. &swport4 {
  305. status = "okay";
  306. label = "wan";
  307. nvmem-cells = <&macaddr_art_0>;
  308. nvmem-cell-names = "mac-address";
  309. };
  310. &swport5 {
  311. status = "okay";
  312. label = "lan";
  313. nvmem-cells = <&macaddr_art_6>;
  314. nvmem-cell-names = "mac-address";
  315. };
  316. &wifi0 {
  317. status = "okay";
  318. nvmem-cells = <&precal_art_1000>, <&macaddr_art_1006>;
  319. nvmem-cell-names = "pre-calibration", "mac-address";
  320. qcom,ath10k-calibration-variant = "Wallys-DR40X9";
  321. };
  322. &wifi1 {
  323. status = "okay";
  324. nvmem-cell-names = "pre-calibration", "mac-address";
  325. nvmem-cells = <&precal_art_5000>, <&macaddr_art_5006>;
  326. qcom,ath10k-calibration-variant = "Wallys-DR40X9";
  327. };
  328. &usb2 {
  329. status = "okay";
  330. };
  331. &usb2_hs_phy {
  332. status = "okay";
  333. };
  334. &usb3 {
  335. status = "okay";
  336. };
  337. &usb3_ss_phy {
  338. status = "okay";
  339. };
  340. &usb3_hs_phy {
  341. status = "okay";
  342. };
  343. &prng {
  344. status = "okay";
  345. };
  346. &watchdog {
  347. status = "okay";
  348. };