qcom-ipq4019-mf286d.dts 7.4 KB

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