qcom-ipq4019-rtl30vw.dts 6.9 KB

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