qcom-ipq4019-mf286d.dts 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  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. ess-psgmii@98000 {
  74. status = "okay";
  75. };
  76. tcsr@1949000 {
  77. compatible = "qcom,tcsr";
  78. reg = <0x1949000 0x100>;
  79. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  80. };
  81. tcsr@194b000 {
  82. /* select hostmode */
  83. compatible = "qcom,tcsr";
  84. reg = <0x194b000 0x100>;
  85. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  86. status = "okay";
  87. };
  88. ess_tcsr@1953000 {
  89. compatible = "qcom,tcsr";
  90. reg = <0x1953000 0x1000>;
  91. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  92. };
  93. tcsr@1957000 {
  94. compatible = "qcom,tcsr";
  95. reg = <0x1957000 0x100>;
  96. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  97. };
  98. usb2@60f8800 {
  99. status = "okay";
  100. };
  101. usb3@8af8800 {
  102. status = "okay";
  103. };
  104. crypto@8e3a000 {
  105. status = "okay";
  106. };
  107. watchdog@b017000 {
  108. status = "okay";
  109. };
  110. ess-switch@c000000 {
  111. status = "okay";
  112. };
  113. edma@c080000 {
  114. status = "okay";
  115. };
  116. };
  117. };
  118. &blsp_dma {
  119. status = "okay";
  120. };
  121. &blsp1_spi1 {
  122. pinctrl-0 = <&spi_0_pins>;
  123. pinctrl-names = "default";
  124. status = "okay";
  125. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
  126. flash@0 {
  127. /* u-boot is looking for "n25q128a11" property */
  128. compatible = "jedec,spi-nor", "n25q128a11";
  129. #address-cells = <1>;
  130. #size-cells = <1>;
  131. reg = <0>;
  132. spi-max-frequency = <24000000>;
  133. partitions {
  134. compatible = "fixed-partitions";
  135. #address-cells = <1>;
  136. #size-cells = <1>;
  137. partition@0 {
  138. label = "0:SBL1";
  139. reg = <0x0 0x40000>;
  140. read-only;
  141. };
  142. partition@40000 {
  143. label = "0:MIBIB";
  144. reg = <0x40000 0x20000>;
  145. read-only;
  146. };
  147. partition@60000 {
  148. label = "0:QSEE";
  149. reg = <0x60000 0x60000>;
  150. read-only;
  151. };
  152. partition@c0000 {
  153. label = "0:CDT";
  154. reg = <0xc0000 0x10000>;
  155. read-only;
  156. };
  157. partition@d0000 {
  158. label = "0:DDRPARAMS";
  159. reg = <0xd0000 0x10000>;
  160. read-only;
  161. };
  162. partition@e0000 {
  163. label = "0:APPSBLENV";
  164. reg = <0xe0000 0x10000>;
  165. read-only;
  166. };
  167. partition@f0000 {
  168. label = "0:APPSBL";
  169. reg = <0xf0000 0xc0000>;
  170. read-only;
  171. };
  172. partition@1b0000 {
  173. label = "0:reserved1";
  174. reg = <0x1b0000 0x50000>;
  175. read-only;
  176. };
  177. };
  178. };
  179. };
  180. &blsp1_uart1 {
  181. pinctrl-0 = <&serial_pins>;
  182. pinctrl-names = "default";
  183. status = "okay";
  184. };
  185. &cryptobam {
  186. status = "okay";
  187. };
  188. &gmac0 {
  189. nvmem-cell-names = "mac-address";
  190. nvmem-cells = <&macaddr_config_0>;
  191. };
  192. &gmac1 {
  193. nvmem-cell-names = "mac-address";
  194. nvmem-cells = <&macaddr_config_0>;
  195. mac-address-increment = <1>;
  196. };
  197. &nand {
  198. pinctrl-0 = <&nand_pins>;
  199. pinctrl-names = "default";
  200. status = "okay";
  201. nand@0 {
  202. partitions {
  203. compatible = "fixed-partitions";
  204. #address-cells = <1>;
  205. #size-cells = <1>;
  206. partition@0 {
  207. label = "fota-flag";
  208. reg = <0x0 0xa0000>;
  209. read-only;
  210. };
  211. partition@a0000 {
  212. label = "ART";
  213. reg = <0xa0000 0x80000>;
  214. read-only;
  215. compatible = "nvmem-cells";
  216. #address-cells = <1>;
  217. #size-cells = <1>;
  218. precal_art_1000: precal@1000 {
  219. reg = <0x1000 0x2f20>;
  220. };
  221. precal_art_5000: precal@5000 {
  222. reg = <0x5000 0x2f20>;
  223. };
  224. };
  225. partition@120000 {
  226. label = "mac";
  227. reg = <0x120000 0x80000>;
  228. read-only;
  229. compatible = "nvmem-cells";
  230. #address-cells = <1>;
  231. #size-cells = <1>;
  232. macaddr_config_0: macaddr@0 {
  233. reg = <0x0 0x6>;
  234. };
  235. };
  236. partition@1a0000 {
  237. label = "reserved2";
  238. reg = <0x1a0000 0xc0000>;
  239. read-only;
  240. };
  241. partition@260000 {
  242. label = "cfg-param";
  243. reg = <0x260000 0x400000>;
  244. read-only;
  245. };
  246. partition@660000 {
  247. label = "log";
  248. reg = <0x660000 0x400000>;
  249. };
  250. partition@a60000 {
  251. label = "oops";
  252. reg = <0xa60000 0xa0000>;
  253. };
  254. partition@b00000 {
  255. label = "reserved3";
  256. reg = <0xb00000 0x500000>;
  257. read-only;
  258. };
  259. partition@1000000 {
  260. label = "web";
  261. reg = <0x1000000 0x800000>;
  262. };
  263. partition@1800000 {
  264. label = "rootfs";
  265. reg = <0x1800000 0x1d00000>;
  266. };
  267. partition@3500000 {
  268. label = "data";
  269. reg = <0x3500000 0x1900000>;
  270. };
  271. partition@4e00000 {
  272. label = "fota";
  273. reg = <0x4e00000 0x3200000>;
  274. };
  275. };
  276. };
  277. };
  278. &qpic_bam {
  279. status = "okay";
  280. };
  281. &tlmm {
  282. i2c_0_pins: i2c_0_pinmux {
  283. mux {
  284. pins = "gpio20", "gpio21";
  285. function = "blsp_i2c0";
  286. bias-disable;
  287. };
  288. };
  289. mdio_pins: mdio_pinmux {
  290. mux_1 {
  291. pins = "gpio6";
  292. function = "mdio";
  293. bias-pull-up;
  294. };
  295. mux_2 {
  296. pins = "gpio7";
  297. function = "mdc";
  298. bias-pull-up;
  299. };
  300. };
  301. nand_pins: nand_pins {
  302. pullups {
  303. pins = "gpio52", "gpio53", "gpio58",
  304. "gpio59";
  305. function = "qpic";
  306. bias-pull-up;
  307. };
  308. pulldowns {
  309. pins = "gpio54", "gpio55", "gpio56",
  310. "gpio57", "gpio60",
  311. "gpio62", "gpio63", "gpio64",
  312. "gpio65", "gpio66", "gpio67",
  313. "gpio69";
  314. function = "qpic";
  315. bias-pull-down;
  316. };
  317. };
  318. serial_pins: serial_pinmux {
  319. mux {
  320. pins = "gpio16", "gpio17";
  321. function = "blsp_uart0";
  322. bias-disable;
  323. };
  324. };
  325. spi_0_pins: spi_0_pinmux {
  326. pinmux {
  327. function = "blsp_spi0";
  328. pins = "gpio13", "gpio14", "gpio15";
  329. drive-strength = <12>;
  330. bias-disable;
  331. };
  332. pinmux_cs {
  333. function = "gpio";
  334. pins = "gpio12";
  335. drive-strength = <2>;
  336. bias-disable;
  337. output-high;
  338. };
  339. };
  340. };
  341. &usb2_hs_phy {
  342. status = "okay";
  343. };
  344. &usb3_ss_phy {
  345. status = "okay";
  346. };
  347. &usb3_hs_phy {
  348. status = "okay";
  349. };
  350. &wifi0 {
  351. status = "okay";
  352. nvmem-cell-names = "pre-calibration", "mac-address";
  353. nvmem-cells = <&precal_art_1000>, <&macaddr_config_0>;
  354. mac-address-increment = <2>;
  355. qcom,ath10k-calibration-variant = "zte,mf286d";
  356. };
  357. &wifi1 {
  358. status = "okay";
  359. nvmem-cell-names = "pre-calibration", "mac-address";
  360. nvmem-cells = <&precal_art_5000>, <&macaddr_config_0>;
  361. mac-address-increment = <3>;
  362. qcom,ath10k-calibration-variant = "zte,mf286d";
  363. };