qcom-ipq4018-nbg6617.dts 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "qcom-ipq4019.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include <dt-bindings/input/linux-event-codes.h>
  7. #include <dt-bindings/soc/qcom,tcsr.h>
  8. / {
  9. model = "ZyXEL NBG6617";
  10. compatible = "zyxel,nbg6617";
  11. chosen {
  12. /*
  13. * the vendor u-boot adds root and mtdparts cmdline parameters
  14. * which we don't want... but we have to overwrite them or else
  15. * the kernel will take them at face value.
  16. */
  17. bootargs-append = " mtdparts= root=31:13";
  18. };
  19. aliases {
  20. led-boot = &power;
  21. led-failsafe = &power;
  22. led-running = &power;
  23. led-upgrade = &power;
  24. };
  25. soc {
  26. rng@22000 {
  27. status = "okay";
  28. };
  29. mdio@90000 {
  30. status = "okay";
  31. };
  32. tcsr@1949000 {
  33. compatible = "qcom,tcsr";
  34. reg = <0x1949000 0x100>;
  35. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  36. };
  37. tcsr@194b000 {
  38. compatible = "qcom,tcsr";
  39. reg = <0x194b000 0x100>;
  40. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  41. };
  42. ess_tcsr@1953000 {
  43. compatible = "qcom,tcsr";
  44. reg = <0x1953000 0x1000>;
  45. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  46. };
  47. tcsr@1957000 {
  48. compatible = "qcom,tcsr";
  49. reg = <0x1957000 0x100>;
  50. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  51. };
  52. usb2@60f8800 {
  53. status = "okay";
  54. dwc3@6000000 {
  55. #address-cells = <1>;
  56. #size-cells = <0>;
  57. usb2_port1: port@1 {
  58. reg = <1>;
  59. #trigger-source-cells = <0>;
  60. };
  61. };
  62. };
  63. usb3@8af8800 {
  64. status = "okay";
  65. dwc3@8a00000 {
  66. #address-cells = <1>;
  67. #size-cells = <0>;
  68. usb3_port1: port@1 {
  69. reg = <1>;
  70. #trigger-source-cells = <0>;
  71. };
  72. usb3_port2: port@2 {
  73. reg = <2>;
  74. #trigger-source-cells = <0>;
  75. };
  76. };
  77. };
  78. crypto@8e3a000 {
  79. status = "okay";
  80. };
  81. watchdog@b017000 {
  82. status = "okay";
  83. };
  84. };
  85. keys {
  86. compatible = "gpio-keys";
  87. wlan {
  88. label = "wlan";
  89. gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
  90. linux,code = <KEY_RFKILL>;
  91. linux,input-type = <EV_SW>;
  92. };
  93. wps {
  94. label = "wps";
  95. gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
  96. linux,code = <KEY_WPS_BUTTON>;
  97. };
  98. reset {
  99. label = "reset";
  100. gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
  101. linux,code = <KEY_RESTART>;
  102. };
  103. };
  104. leds {
  105. compatible = "gpio-leds";
  106. pinctrl-0 = <&led_pins>;
  107. pinctrl-names = "default";
  108. power: power {
  109. function = LED_FUNCTION_POWER;
  110. color = <LED_COLOR_ID_GREEN>;
  111. gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
  112. };
  113. usb {
  114. function = LED_FUNCTION_USB;
  115. color = <LED_COLOR_ID_GREEN>;
  116. gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
  117. trigger-sources = <&usb2_port1>, <&usb3_port1>, <&usb3_port2>;
  118. linux,default-trigger = "usbport";
  119. };
  120. wlan2g {
  121. label = "green:wlan2g";
  122. gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
  123. };
  124. wlan5g {
  125. label = "green:wlan5g";
  126. gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
  127. };
  128. wps {
  129. function = LED_FUNCTION_WPS;
  130. color = <LED_COLOR_ID_GREEN>;
  131. gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
  132. };
  133. };
  134. };
  135. &tlmm {
  136. serial_pins: serial_pinmux {
  137. mux {
  138. pins = "gpio60", "gpio61";
  139. function = "blsp_uart0";
  140. bias-disable;
  141. };
  142. };
  143. spi_0_pins: spi_0_pinmux {
  144. mux {
  145. function = "blsp_spi0";
  146. pins = "gpio55", "gpio56", "gpio57";
  147. drive-strength = <12>;
  148. bias-disable;
  149. };
  150. mux_cs {
  151. function = "gpio";
  152. pins = "gpio54";
  153. drive-strength = <2>;
  154. bias-disable;
  155. output-low;
  156. };
  157. };
  158. led_pins: led_pinmux {
  159. mux {
  160. pins = "gpio0", "gpio1", "gpio3", "gpio5", "gpio58";
  161. drive-strength = <0x8>;
  162. bias-disable;
  163. output-low;
  164. };
  165. };
  166. };
  167. &blsp1_spi1 { /* BLSP1 QUP1 */
  168. pinctrl-0 = <&spi_0_pins>;
  169. pinctrl-names = "default";
  170. status = "okay";
  171. cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
  172. flash@0 {
  173. compatible = "jedec,spi-nor";
  174. reg = <0>;
  175. spi-max-frequency = <50000000>;
  176. status = "okay";
  177. m25p,fast-read;
  178. partitions {
  179. compatible = "fixed-partitions";
  180. #address-cells = <1>;
  181. #size-cells = <1>;
  182. partition0@0 {
  183. label = "SBL1";
  184. reg = <0x00000000 0x00040000>;
  185. read-only;
  186. };
  187. partition1@40000 {
  188. label = "MIBIB";
  189. reg = <0x00040000 0x00020000>;
  190. read-only;
  191. };
  192. partition2@60000 {
  193. label = "QSEE";
  194. reg = <0x00060000 0x00060000>;
  195. read-only;
  196. };
  197. partition3@c0000 {
  198. label = "CDT";
  199. reg = <0x000c0000 0x00010000>;
  200. read-only;
  201. };
  202. partition4@d0000 {
  203. label = "DDRPARAMS";
  204. reg = <0x000d0000 0x00010000>;
  205. read-only;
  206. };
  207. partition5@e0000 {
  208. label = "APPSBL"; /* u-boot */
  209. reg = <0x000e0000 0x00080000>;
  210. /* U-Boot Standalone App "zloader" is located at 0x64000 */
  211. read-only;
  212. };
  213. partition6@160000 {
  214. label = "APPSBLENV"; /* u-boot env */
  215. reg = <0x00160000 0x00010000>;
  216. };
  217. partition7@170000 {
  218. /* make a backup of this partition! */
  219. label = "ART";
  220. reg = <0x00170000 0x00010000>;
  221. read-only;
  222. };
  223. partition8@180000 {
  224. label = "kernel";
  225. reg = <0x00180000 0x00400000>;
  226. };
  227. partition9@580000 {
  228. label = "dualflag";
  229. reg = <0x00580000 0x00010000>;
  230. read-only;
  231. };
  232. partition10@590000 {
  233. label = "header";
  234. reg = <0x00590000 0x00010000>;
  235. };
  236. partition11@5a0000 {
  237. label = "romd";
  238. reg = <0x005a0000 0x00100000>;
  239. read-only;
  240. };
  241. partition12@6a0000 {
  242. label = "not_root_data";
  243. /*
  244. * for some strange reason, someone at ZyXEL
  245. * had the "great" idea to put the rootfs_data
  246. * in front of rootfs... Don't do that!
  247. * As a result this one, full MebiByte remains
  248. * unused.
  249. */
  250. reg = <0x006a0000 0x00100000>;
  251. };
  252. partition13@7a0000 {
  253. label = "rootfs";
  254. reg = <0x007a0000 0x01860000>;
  255. };
  256. };
  257. };
  258. };
  259. &blsp1_uart1 {
  260. pinctrl-0 = <&serial_pins>;
  261. pinctrl-names = "default";
  262. status = "okay";
  263. };
  264. &cryptobam {
  265. status = "okay";
  266. };
  267. &blsp_dma {
  268. status = "okay";
  269. };
  270. &gmac {
  271. status = "okay";
  272. };
  273. &switch {
  274. status = "okay";
  275. };
  276. &swport1 {
  277. status = "okay";
  278. label = "lan4";
  279. };
  280. &swport2 {
  281. status = "okay";
  282. label = "lan3";
  283. };
  284. &swport3 {
  285. status = "okay";
  286. label = "lan2";
  287. };
  288. &swport4 {
  289. status = "okay";
  290. label = "lan1";
  291. };
  292. &swport5 {
  293. status = "okay";
  294. };
  295. &wifi0 {
  296. status = "okay";
  297. qcom,ath10k-calibration-variant = "ZyXEL-NBG6617";
  298. };
  299. &wifi1 {
  300. status = "okay";
  301. qcom,ath10k-calibration-variant = "ZyXEL-NBG6617";
  302. };
  303. &usb3_ss_phy {
  304. status = "okay";
  305. };
  306. &usb3_hs_phy {
  307. status = "okay";
  308. };
  309. &usb2_hs_phy {
  310. status = "okay";
  311. };