qcom-ipq4019-wpj419.dts 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
  2. * Copyright (c) 2019, Nguyen Dinh Phi <[email protected]>
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. *
  16. */
  17. #include "qcom-ipq4019.dtsi"
  18. #include <dt-bindings/gpio/gpio.h>
  19. #include <dt-bindings/input/input.h>
  20. #include <dt-bindings/soc/qcom,tcsr.h>
  21. / {
  22. model = "Compex WPJ419";
  23. compatible = "compex,wpj419", "qcom,ipq4019";
  24. memory {
  25. device_type = "memory";
  26. reg = <0x80000000 0x10000000>;
  27. };
  28. reserved-memory {
  29. ranges;
  30. rsvd1@87000000 {
  31. /* Reserved for other subsystem */
  32. reg = <0x87000000 0x500000>;
  33. no-map;
  34. };
  35. wifi_dump@87500000 {
  36. reg = <0x87500000 0x600000>;
  37. no-map;
  38. };
  39. rsvd2@87B00000 {
  40. /* Reserved for other subsystem */
  41. reg = <0x87B00000 0x500000>;
  42. no-map;
  43. };
  44. };
  45. chosen {
  46. bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1";
  47. };
  48. soc {
  49. pinctrl@1000000 {
  50. mdio_pins: mdio_pinmux {
  51. mux_1 {
  52. pins = "gpio6";
  53. function = "mdio";
  54. bias-pull-up;
  55. };
  56. mux_2 {
  57. pins = "gpio7";
  58. function = "mdc";
  59. bias-pull-up;
  60. };
  61. };
  62. serial_0_pins: serial_pinmux {
  63. mux {
  64. pins = "gpio16", "gpio17";
  65. function = "blsp_uart0";
  66. bias-disable;
  67. };
  68. };
  69. serial_1_pins: serial1_pinmux {
  70. mux {
  71. pins = "gpio8", "gpio9", "gpio10", "gpio11";
  72. function = "blsp_uart1";
  73. bias-disable;
  74. };
  75. };
  76. spi_0_pins: spi_0_pinmux {
  77. pinmux {
  78. function = "blsp_spi0";
  79. pins = "gpio13", "gpio14", "gpio15";
  80. bias-disable;
  81. };
  82. pinmux_cs {
  83. function = "gpio";
  84. pins = "gpio12";
  85. bias-disable;
  86. output-high;
  87. };
  88. };
  89. i2c_0_pins: i2c_0_pinmux {
  90. mux {
  91. pins = "gpio20", "gpio21";
  92. function = "blsp_i2c0";
  93. bias-disable;
  94. };
  95. };
  96. nand_pins: nand_pins {
  97. pullups {
  98. pins = "gpio52", "gpio53", "gpio58", "gpio59";
  99. function = "qpic";
  100. bias-pull-up;
  101. };
  102. pulldowns {
  103. pins = "gpio54", "gpio55", "gpio56",
  104. "gpio57", "gpio60", "gpio61",
  105. "gpio62", "gpio63", "gpio64",
  106. "gpio65", "gpio66", "gpio67",
  107. "gpio68", "gpio69";
  108. function = "qpic";
  109. bias-pull-down;
  110. };
  111. };
  112. led_0_pins: led0_pinmux {
  113. mux_1 {
  114. pins = "gpio36";
  115. function = "led0";
  116. bias-pull-down;
  117. };
  118. mux_2 {
  119. pins = "gpio40";
  120. function = "led4";
  121. bias-pull-down;
  122. };
  123. };
  124. };
  125. blsp_dma: dma@7884000 {
  126. status = "okay";
  127. };
  128. spi_0: spi@78b5000 {
  129. pinctrl-0 = <&spi_0_pins>;
  130. pinctrl-names = "default";
  131. status = "okay";
  132. cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>, <&tlmm 41 GPIO_ACTIVE_HIGH>;
  133. num-cs = <2>;
  134. flash0@0 {
  135. reg = <0>;
  136. compatible = "jedec,spi-nor";
  137. spi-max-frequency = <24000000>;
  138. broken-flash-reset;
  139. partitions {
  140. compatible = "fixed-partitions";
  141. #address-cells = <1>;
  142. #size-cells = <1>;
  143. partition@0 {
  144. label = "0:SBL1";
  145. reg = <0x000000 0x040000>;
  146. read-only;
  147. };
  148. partition@40000 {
  149. label = "0:MIBIB";
  150. reg = <0x040000 0x020000>;
  151. read-only;
  152. };
  153. partition@60000 {
  154. label = "0:QSEE";
  155. reg = <0x060000 0x060000>;
  156. read-only;
  157. };
  158. partition@c0000 {
  159. label = "0:CDT";
  160. reg = <0x0c0000 0x010000>;
  161. read-only;
  162. };
  163. partition@d0000 {
  164. label = "0:DDRPARAMS";
  165. reg = <0x0d0000 0x010000>;
  166. read-only;
  167. };
  168. partition@e0000 {
  169. label = "u-boot-env";
  170. reg = <0x0e0000 0x010000>;
  171. };
  172. partition@f0000 {
  173. label = "u-boot";
  174. reg = <0x0f0000 0x080000>;
  175. read-only;
  176. };
  177. partition@170000 {
  178. label = "0:ART";
  179. reg = <0x170000 0x010000>;
  180. read-only;
  181. nvmem-layout {
  182. compatible = "fixed-layout";
  183. #address-cells = <1>;
  184. #size-cells = <1>;
  185. precal_art_1000: precal@1000 {
  186. reg = <0x1000 0x2f20>;
  187. };
  188. precal_art_5000: precal@5000 {
  189. reg = <0x5000 0x2f20>;
  190. };
  191. };
  192. };
  193. };
  194. };
  195. nand@1 {
  196. reg = <1>;
  197. status = "okay";
  198. compatible = "spi-nand";
  199. spi-max-frequency = <24000000>;
  200. partitions {
  201. compatible = "fixed-partitions";
  202. #address-cells = <1>;
  203. #size-cells = <1>;
  204. /* The device has 128MB, but we can only address
  205. * 64MB because of the bootloader's default settings.
  206. * This is due to the old mt29f driver,
  207. * which detected the deivce with only 64MB
  208. */
  209. partition@0 {
  210. label = "ubi";
  211. reg = <0x0000000 0x4000000>;
  212. };
  213. };
  214. };
  215. };
  216. mdio@90000 {
  217. status = "okay";
  218. pinctrl-0 = <&mdio_pins>;
  219. pinctrl-names = "default";
  220. reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
  221. reset-delay-us = <5000>;
  222. };
  223. tcsr@194b000 {
  224. /* select hostmode */
  225. compatible = "qcom,tcsr";
  226. reg = <0x194b000 0x100>;
  227. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  228. status = "okay";
  229. };
  230. tcsr@1949000 {
  231. compatible = "qcom,tcsr";
  232. reg = <0x1949000 0x100>;
  233. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  234. };
  235. ess_tcsr@1953000 {
  236. compatible = "qcom,tcsr";
  237. reg = <0x1953000 0x1000>;
  238. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  239. };
  240. tcsr@1957000 {
  241. compatible = "qcom,tcsr";
  242. reg = <0x1957000 0x100>;
  243. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  244. };
  245. i2c_0: i2c@78b7000 {
  246. pinctrl-0 = <&i2c_0_pins>;
  247. pinctrl-names = "default";
  248. status = "okay";
  249. };
  250. serial@78af000 {
  251. pinctrl-0 = <&serial_0_pins>;
  252. pinctrl-names = "default";
  253. status = "okay";
  254. };
  255. serial@78b0000 {
  256. pinctrl-0 = <&serial_1_pins>;
  257. pinctrl-names = "default";
  258. status = "okay";
  259. };
  260. usb3_ss_phy: ssphy@9a000 {
  261. status = "okay";
  262. };
  263. usb3_hs_phy: hsphy@a6000 {
  264. status = "okay";
  265. };
  266. usb3: usb3@8af8800 {
  267. status = "okay";
  268. };
  269. usb2_hs_phy: hsphy@a8000 {
  270. status = "okay";
  271. };
  272. usb2: usb2@60f8800 {
  273. status = "okay";
  274. };
  275. cryptobam: dma@8e04000 {
  276. status = "okay";
  277. };
  278. crypto@8e3a000 {
  279. status = "okay";
  280. };
  281. watchdog@b017000 {
  282. status = "okay";
  283. };
  284. qpic_bam: dma@7984000 {
  285. status = "okay";
  286. };
  287. pcie0: pci@40000000 {
  288. status = "okay";
  289. perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
  290. wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
  291. };
  292. };
  293. keys {
  294. compatible = "gpio-keys";
  295. reset {
  296. label = "reset";
  297. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  298. linux,code = <KEY_RESTART>;
  299. };
  300. };
  301. };
  302. &nand {
  303. pinctrl-0 = <&nand_pins>;
  304. pinctrl-names = "default";
  305. status = "okay";
  306. };
  307. &wifi0 {
  308. status = "okay";
  309. nvmem-cell-names = "pre-calibration";
  310. nvmem-cells = <&precal_art_1000>;
  311. };
  312. &wifi1 {
  313. status = "okay";
  314. nvmem-cell-names = "pre-calibration";
  315. nvmem-cells = <&precal_art_5000>;
  316. };