qcom-ipq4019-rtl30vw.dts 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. // SPDX-License-Identifier: ISC
  2. // Copyright (c) 2015, The Linux Foundation. All rights reserved.
  3. // Copyright (c) 2019, Cezary Jackiewicz <[email protected]>.
  4. // Copyright (c) 2020, Pawel Dembicki <[email protected]>.
  5. #include "qcom-ipq4019.dtsi"
  6. #include <dt-bindings/soc/qcom,tcsr.h>
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/input/input.h>
  9. / {
  10. model = "Cell C RTL30VW";
  11. compatible = "cellc,rtl30vw";
  12. aliases {
  13. led-boot = &led_power_blue;
  14. led-failsafe = &led_power_red;
  15. led-running = &led_power_blue;
  16. led-upgrade = &led_power_red;
  17. };
  18. chosen {
  19. bootargs-append = "ubi.mtd=ubifs root=/dev/ubiblock0_0 rootfstype=squashfs ro";
  20. };
  21. led_spi {
  22. compatible = "spi-gpio";
  23. #address-cells = <1>;
  24. #size-cells = <0>;
  25. num-chipselects = <1>;
  26. mosi-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
  27. cs-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
  28. sck-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
  29. led_gpio: led_gpio@0 {
  30. compatible = "fairchild,74hc595";
  31. reg = <0>;
  32. gpio-controller;
  33. #gpio-cells = <2>;
  34. registers-number = <2>;
  35. spi-max-frequency = <1000000>;
  36. };
  37. };
  38. leds {
  39. compatible = "gpio-leds";
  40. led_power_blue: power_blue {
  41. gpios = <&led_gpio 0 GPIO_ACTIVE_HIGH>;
  42. label = "blue:power";
  43. default-state = "on";
  44. };
  45. led_power_red: power_red {
  46. gpios = <&led_gpio 1 GPIO_ACTIVE_HIGH>;
  47. label = "red:power";
  48. };
  49. tp28 {
  50. gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
  51. label = "ext:tp28";
  52. default-state = "keep";
  53. };
  54. tp27 {
  55. gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
  56. label = "ext:tp27";
  57. default-state = "keep";
  58. };
  59. wlan2g {
  60. gpios = <&led_gpio 8 GPIO_ACTIVE_HIGH>;
  61. label = "blue:wlan2g";
  62. linux,default-trigger = "phy0tpt";
  63. };
  64. wlan5g {
  65. gpios = <&led_gpio 9 GPIO_ACTIVE_HIGH>;
  66. label = "blue:wlan5g";
  67. linux,default-trigger = "phy1tpt";
  68. };
  69. wps {
  70. gpios = <&led_gpio 10 GPIO_ACTIVE_HIGH>;
  71. label = "blue:wps";
  72. };
  73. voip {
  74. gpios = <&led_gpio 11 GPIO_ACTIVE_HIGH>;
  75. label = "blue:voip";
  76. };
  77. s1 {
  78. gpios = <&led_gpio 12 GPIO_ACTIVE_HIGH>;
  79. label = "blue:s1";
  80. };
  81. s2 {
  82. gpios = <&led_gpio 13 GPIO_ACTIVE_HIGH>;
  83. label = "blue:s2";
  84. };
  85. s3 {
  86. gpios = <&led_gpio 14 GPIO_ACTIVE_HIGH>;
  87. label = "blue:s3";
  88. };
  89. s4 {
  90. gpios = <&led_gpio 15 GPIO_ACTIVE_HIGH>;
  91. label = "blue:s4";
  92. };
  93. signal {
  94. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  95. label = "red:signal";
  96. };
  97. };
  98. keys {
  99. compatible = "gpio-keys";
  100. wps {
  101. label = "wps";
  102. linux,code = <KEY_WPS_BUTTON>;
  103. gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
  104. };
  105. reset {
  106. label = "reset";
  107. linux,code = <KEY_RESTART>;
  108. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  109. };
  110. };
  111. soc {
  112. rng@22000 {
  113. status = "okay";
  114. };
  115. mdio@90000 {
  116. status = "okay";
  117. };
  118. tcsr@1949000 {
  119. compatible = "qcom,tcsr";
  120. reg = <0x1949000 0x100>;
  121. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  122. };
  123. tcsr@194b000 {
  124. /* select hostmode */
  125. compatible = "qcom,tcsr";
  126. reg = <0x194b000 0x100>;
  127. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  128. status = "okay";
  129. };
  130. ess_tcsr@1953000 {
  131. compatible = "qcom,tcsr";
  132. reg = <0x1953000 0x1000>;
  133. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  134. };
  135. tcsr@1957000 {
  136. compatible = "qcom,tcsr";
  137. reg = <0x1957000 0x100>;
  138. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  139. };
  140. usb2@60f8800 {
  141. status = "okay";
  142. };
  143. usb3@8af8800 {
  144. status = "okay";
  145. };
  146. crypto@8e3a000 {
  147. status = "okay";
  148. };
  149. watchdog@b017000 {
  150. status = "okay";
  151. };
  152. };
  153. };
  154. &blsp_dma {
  155. status = "okay";
  156. };
  157. &blsp1_spi1 {
  158. pinctrl-0 = <&spi_0_pins>;
  159. pinctrl-names = "default";
  160. status = "okay";
  161. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 59 GPIO_ACTIVE_HIGH>;
  162. flash@0 {
  163. /*"n25q128a11" is required for proper nand recognition in u-boot. */
  164. compatible = "jedec,spi-nor", "n25q128a11";
  165. #address-cells = <1>;
  166. #size-cells = <1>;
  167. reg = <0>;
  168. spi-max-frequency = <24000000>;
  169. partitions {
  170. compatible = "fixed-partitions";
  171. #address-cells = <1>;
  172. #size-cells = <1>;
  173. partition@0 {
  174. label = "0:SBL1";
  175. reg = <0x0 0x40000>;
  176. read-only;
  177. };
  178. partition@40000 {
  179. label = "0:MIBIB";
  180. reg = <0x40000 0x20000>;
  181. read-only;
  182. };
  183. partition@60000 {
  184. label = "0:QSEE";
  185. reg = <0x60000 0x60000>;
  186. read-only;
  187. };
  188. partition@c0000 {
  189. label = "0:CDT";
  190. reg = <0xc0000 0x10000>;
  191. read-only;
  192. };
  193. partition@d0000 {
  194. label = "0:DDRPARAMS";
  195. reg = <0xd0000 0x10000>;
  196. read-only;
  197. };
  198. partition@e0000 {
  199. label = "0:APPSBLENV";
  200. reg = <0xe0000 0x10000>;
  201. read-only;
  202. };
  203. partition@f0000 {
  204. label = "0:APPSBL";
  205. reg = <0xf0000 0x80000>;
  206. read-only;
  207. };
  208. partition@170000 {
  209. label = "0:ART";
  210. reg = <0x170000 0x10000>;
  211. read-only;
  212. };
  213. partition@180000 {
  214. label = "0:BOOTCONFIG";
  215. reg = <0x180000 0x10000>;
  216. read-only;
  217. };
  218. };
  219. };
  220. flash@1 {
  221. /*
  222. * Factory U-boot looks in 0:BOOTCONFIG partition for active
  223. * partitions settings and mangle partition config. So kernel
  224. * /kernel_1 and rootfs/rootfs_1 pairs can be swaped.
  225. * It isn't a problem but we never can be sure where OFW put
  226. * factory images. "spinand,mt29f" value is required for proper
  227. * nand recognition in u-boot.
  228. */
  229. compatible = "spi-nand","spinand,mt29f";
  230. #address-cells = <1>;
  231. #size-cells = <0>;
  232. reg = <1>;
  233. spi-max-frequency = <24000000>;
  234. partitions {
  235. compatible = "fixed-partitions";
  236. #address-cells = <1>;
  237. #size-cells = <1>;
  238. partition@0 {
  239. label = "kernel";
  240. reg = <0x0 0x400000>;
  241. };
  242. partition@400000 {
  243. label = "rootfs";
  244. reg = <0x400000 0x2000000>;
  245. };
  246. partition@2400000 {
  247. label = "kernel_1";
  248. reg = <0x2400000 0x400000>;
  249. };
  250. partition@2800000 {
  251. label = "rootfs_1";
  252. reg = <0x2800000 0x2000000>;
  253. };
  254. partition@4800000 {
  255. label = "ubifs";
  256. reg = <0x4800000 0x3800000>;
  257. };
  258. };
  259. };
  260. };
  261. &blsp1_uart1 {
  262. pinctrl-0 = <&serial_pins>;
  263. pinctrl-names = "default";
  264. status = "okay";
  265. };
  266. &cryptobam {
  267. status = "okay";
  268. };
  269. &tlmm {
  270. serial_pins: serial_pinmux {
  271. mux {
  272. pins = "gpio60", "gpio61";
  273. function = "blsp_uart0";
  274. bias-disable;
  275. };
  276. };
  277. spi_0_pins: spi_0_pinmux {
  278. pinmux {
  279. function = "blsp_spi0";
  280. pins = "gpio55", "gpio56", "gpio57";
  281. drive-strength = <12>;
  282. bias-disable;
  283. };
  284. pinmux_cs {
  285. function = "gpio";
  286. pins = "gpio54", "gpio59";
  287. drive-strength = <2>;
  288. bias-disable;
  289. output-high;
  290. };
  291. };
  292. };
  293. &usb2_hs_phy {
  294. status = "okay";
  295. };
  296. &usb3_ss_phy {
  297. status = "okay";
  298. };
  299. &usb3_hs_phy {
  300. status = "okay";
  301. };
  302. &wifi0 {
  303. status = "okay";
  304. qcom,ath10k-calibration-variant = "cellc,rtl30vw";
  305. };
  306. &wifi1 {
  307. status = "okay";
  308. qcom,ath10k-calibration-variant = "cellc,rtl30vw";
  309. };
  310. &gmac {
  311. status = "okay";
  312. };
  313. &switch {
  314. status = "okay";
  315. };
  316. &swport3 {
  317. status = "okay";
  318. label = "lan1";
  319. };
  320. &swport4 {
  321. status = "okay";
  322. label = "lan2";
  323. };