qcom-ipq4019-mf289f.dts 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. // Copyright (c) 2022, Pawel Dembicki <[email protected]>.
  3. // Copyright (c) 2022, Giammarco Marzano <[email protected]>.
  4. #include "qcom-ipq4019.dtsi"
  5. #include <dt-bindings/soc/qcom,tcsr.h>
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. / {
  10. model = "ZTE MF289F";
  11. compatible = "zte,mf289f";
  12. aliases {
  13. led-boot = &led_status;
  14. led-failsafe = &led_status;
  15. led-running = &led_status;
  16. led-upgrade = &led_status;
  17. };
  18. chosen {
  19. /*
  20. * bootargs forced by u-boot bootipq command:
  21. * 'ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait'
  22. */
  23. bootargs-append = " root=/dev/ubiblock0_1";
  24. };
  25. /*
  26. * This node is used to restart modem module to avoid anomalous
  27. * behaviours on initial communication.
  28. */
  29. gpio-restart {
  30. compatible = "gpio-restart";
  31. gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
  32. };
  33. leds {
  34. compatible = "gpio-leds";
  35. led_status: led-0 {
  36. function = LED_FUNCTION_POWER;
  37. color = <LED_COLOR_ID_BLUE>;
  38. gpios = <&tlmm 35 GPIO_ACTIVE_LOW>;
  39. };
  40. led-1 {
  41. function = LED_FUNCTION_WLAN;
  42. color = <LED_COLOR_ID_BLUE>;
  43. gpios = <&tlmm 61 GPIO_ACTIVE_LOW>;
  44. linux,default-trigger = "phy0tpt";
  45. };
  46. };
  47. keys {
  48. compatible = "gpio-keys";
  49. key-reset {
  50. label = "reset";
  51. linux,code = <KEY_RESTART>;
  52. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  53. };
  54. key-wps {
  55. label = "wps";
  56. linux,code = <KEY_WPS_BUTTON>;
  57. gpios = <&tlmm 68 GPIO_ACTIVE_LOW>;
  58. };
  59. };
  60. soc {
  61. tcsr@1949000 {
  62. compatible = "qcom,tcsr";
  63. reg = <0x1949000 0x100>;
  64. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  65. };
  66. tcsr@194b000 {
  67. /* select hostmode */
  68. compatible = "qcom,tcsr";
  69. reg = <0x194b000 0x100>;
  70. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  71. status = "okay";
  72. };
  73. ess_tcsr@1953000 {
  74. compatible = "qcom,tcsr";
  75. reg = <0x1953000 0x1000>;
  76. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  77. };
  78. tcsr@1957000 {
  79. compatible = "qcom,tcsr";
  80. reg = <0x1957000 0x100>;
  81. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  82. };
  83. };
  84. };
  85. &prng {
  86. status = "okay";
  87. };
  88. &mdio {
  89. status = "okay";
  90. pinctrl-0 = <&mdio_pins>;
  91. pinctrl-names = "default";
  92. reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
  93. reset-delay-us = <2000>;
  94. };
  95. &watchdog {
  96. status = "okay";
  97. };
  98. &blsp_dma {
  99. status = "okay";
  100. };
  101. &usb2 {
  102. status = "okay";
  103. };
  104. &usb3 {
  105. status = "okay";
  106. };
  107. &blsp1_spi1 {
  108. pinctrl-0 = <&spi_0_pins>;
  109. pinctrl-names = "default";
  110. status = "okay";
  111. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>,
  112. <&tlmm 54 GPIO_ACTIVE_HIGH>;
  113. flash@0 {
  114. compatible = "jedec,spi-nor";
  115. #address-cells = <1>;
  116. #size-cells = <1>;
  117. reg = <0>;
  118. spi-max-frequency = <24000000>;
  119. partitions {
  120. compatible = "fixed-partitions";
  121. #address-cells = <1>;
  122. #size-cells = <1>;
  123. partition@0 {
  124. label = "0:SBL1";
  125. reg = <0x0 0x40000>;
  126. read-only;
  127. };
  128. partition@40000 {
  129. label = "0:MIBIB";
  130. reg = <0x40000 0x20000>;
  131. read-only;
  132. };
  133. partition@60000 {
  134. label = "0:QSEE";
  135. reg = <0x60000 0x60000>;
  136. read-only;
  137. };
  138. partition@c0000 {
  139. label = "0:CDT";
  140. reg = <0xc0000 0x10000>;
  141. read-only;
  142. };
  143. partition@d0000 {
  144. label = "0:DDRPARAMS";
  145. reg = <0xd0000 0x10000>;
  146. read-only;
  147. };
  148. partition@e0000 {
  149. label = "0:APPSBLENV";
  150. reg = <0xe0000 0x10000>;
  151. read-only;
  152. };
  153. partition@f0000 {
  154. label = "0:APPSBL";
  155. reg = <0xf0000 0xc0000>;
  156. read-only;
  157. };
  158. partition@1b0000 {
  159. label = "0:reserved1";
  160. reg = <0x1b0000 0x50000>;
  161. read-only;
  162. };
  163. };
  164. };
  165. spi-nand@1 { /* flash@1 ? */
  166. compatible = "spi-nand";
  167. reg = <1>;
  168. spi-max-frequency = <24000000>;
  169. partitions {
  170. compatible = "fixed-partitions";
  171. #address-cells = <1>;
  172. #size-cells = <1>;
  173. partition@0 {
  174. label = "fota-flag";
  175. reg = <0x0 0xa0000>;
  176. read-only;
  177. };
  178. partition@a0000 {
  179. label = "ART";
  180. reg = <0xa0000 0x80000>;
  181. read-only;
  182. nvmem-layout {
  183. compatible = "fixed-layout";
  184. #address-cells = <1>;
  185. #size-cells = <1>;
  186. precal_art_1000: precal@1000 {
  187. reg = <0x1000 0x2f20>;
  188. };
  189. precal_art_5000: precal@5000 {
  190. reg = <0x5000 0x2f20>;
  191. };
  192. };
  193. };
  194. partition@120000 {
  195. label = "mac";
  196. reg = <0x120000 0x80000>;
  197. read-only;
  198. nvmem-layout {
  199. compatible = "fixed-layout";
  200. #address-cells = <1>;
  201. #size-cells = <1>;
  202. macaddr_mac_0: macaddr@0 {
  203. compatible = "mac-base";
  204. reg = <0x0 0x6>;
  205. #nvmem-cell-cells = <1>;
  206. };
  207. };
  208. };
  209. partition@1a0000 {
  210. label = "reserved2";
  211. reg = <0x1a0000 0xc0000>;
  212. read-only;
  213. };
  214. partition@260000 {
  215. label = "cfg-param";
  216. reg = <0x260000 0x400000>;
  217. read-only;
  218. };
  219. partition@660000 {
  220. label = "log";
  221. reg = <0x660000 0x400000>;
  222. };
  223. partition@a60000 {
  224. label = "oops";
  225. reg = <0xa60000 0xa0000>;
  226. };
  227. partition@b00000 {
  228. label = "reserved3";
  229. reg = <0xb00000 0x500000>;
  230. read-only;
  231. };
  232. partition@1000000 {
  233. label = "web";
  234. reg = <0x1000000 0x800000>;
  235. };
  236. partition@1800000 {
  237. label = "rootfs";
  238. reg = <0x1800000 0x1d00000>;
  239. };
  240. partition@3500000 {
  241. label = "data";
  242. reg = <0x3500000 0x1900000>;
  243. };
  244. partition@4e00000 {
  245. label = "fota";
  246. reg = <0x4e00000 0x3200000>;
  247. };
  248. };
  249. };
  250. };
  251. &blsp1_uart1 {
  252. pinctrl-0 = <&serial_pins>;
  253. pinctrl-names = "default";
  254. status = "okay";
  255. };
  256. &crypto {
  257. status = "okay";
  258. };
  259. &cryptobam {
  260. status = "okay";
  261. };
  262. &gmac {
  263. status = "okay";
  264. nvmem-cell-names = "mac-address";
  265. nvmem-cells = <&macaddr_mac_0 0>;
  266. };
  267. &switch {
  268. status = "okay";
  269. };
  270. &swport2 {
  271. status = "okay";
  272. label = "wan";
  273. nvmem-cell-names = "mac-address";
  274. nvmem-cells = <&macaddr_mac_0 1>;
  275. };
  276. &swport5 {
  277. status = "okay";
  278. label = "lan";
  279. };
  280. &qpic_bam {
  281. status = "okay";
  282. };
  283. &tlmm {
  284. i2c_0_pins: i2c_0_pinmux {
  285. mux {
  286. pins = "gpio20", "gpio21";
  287. function = "blsp_i2c0";
  288. bias-disable;
  289. };
  290. };
  291. mdio_pins: mdio_pinmux {
  292. mux_1 {
  293. pins = "gpio6";
  294. function = "mdio";
  295. bias-pull-up;
  296. };
  297. mux_2 {
  298. pins = "gpio7";
  299. function = "mdc";
  300. bias-pull-up;
  301. };
  302. };
  303. serial_pins: serial_pinmux {
  304. mux {
  305. pins = "gpio16", "gpio17";
  306. function = "blsp_uart0";
  307. bias-disable;
  308. };
  309. };
  310. spi_0_pins: spi_0_pinmux {
  311. pinmux {
  312. function = "blsp_spi0";
  313. pins = "gpio13", "gpio14", "gpio15";
  314. drive-strength = <12>;
  315. bias-disable;
  316. };
  317. pinmux_cs {
  318. function = "gpio";
  319. pins = "gpio12", "gpio54";
  320. drive-strength = <2>;
  321. bias-disable;
  322. output-high;
  323. };
  324. };
  325. };
  326. &usb2_hs_phy {
  327. status = "okay";
  328. };
  329. &usb3_ss_phy {
  330. status = "okay";
  331. };
  332. &usb3_hs_phy {
  333. status = "okay";
  334. };
  335. &wifi0 {
  336. status = "okay";
  337. nvmem-cell-names = "pre-calibration", "mac-address";
  338. nvmem-cells = <&precal_art_1000>, <&macaddr_mac_0 2>;
  339. qcom,ath10k-calibration-variant = "zte,mf289f";
  340. };
  341. /* This node is used only on AT2 version for 5Ghz on IPQ4019 with board-id=21 */
  342. &wifi1 {
  343. status = "okay";
  344. nvmem-cell-names = "pre-calibration", "mac-address";
  345. nvmem-cells = <&precal_art_5000>, <&macaddr_mac_0 3>;
  346. qcom,ath10k-calibration-variant = "zte,mf289f";
  347. };
  348. /* This node is used only on AT1 version for 5Ghz on QCA9984 */
  349. &pcie0 {
  350. status = "okay";
  351. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  352. wake-gpio = <&tlmm 40 GPIO_ACTIVE_LOW>;
  353. clkreq-gpio = <&tlmm 39 GPIO_ACTIVE_LOW>;
  354. bridge@0,0 {
  355. reg = <0x00000000 0 0 0 0>;
  356. #address-cells = <3>;
  357. #size-cells = <2>;
  358. ranges;
  359. wifi2: wifi@1,0 {
  360. nvmem-cell-names = "mac-address";
  361. nvmem-cells = <&macaddr_mac_0 4>;
  362. compatible = "qcom,ath10k";
  363. reg = <0x00010000 0 0 0 0>;
  364. qcom,ath10k-calibration-variant = "zte,mf289f";
  365. };
  366. };
  367. };