qcom-ipq4019-wtr-m2133hp.dts 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. // SPDX-License-Identifier: ISC
  2. /*
  3. * Copyright (c) 2015 - 2016, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2020 Yanase Yuki <[email protected]>
  5. */
  6. #include "qcom-ipq4019.dtsi"
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/soc/qcom,tcsr.h>
  11. / {
  12. model = "Buffalo WTR-M2133HP";
  13. compatible = "buffalo,wtr-m2133hp", "qcom,ipq4019";
  14. memory {
  15. device_type = "memory";
  16. reg = <0x80000000 0x20000000>;
  17. };
  18. chosen {
  19. /*
  20. * U-Boot adds "ubi.mtd=rootfs root=mtd:ubi_rootfs" to
  21. * kernel command line. But we use different partition names,
  22. * so we have to set correct parameters.
  23. */
  24. bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1";
  25. };
  26. aliases {
  27. led-boot = &led_power_blue;
  28. led-failsafe = &led_power_orange;
  29. led-running = &led_power_white;
  30. led-upgrade = &led_power_blue;
  31. };
  32. soc {
  33. rng@22000 {
  34. status = "okay";
  35. };
  36. tcsr@1949000 {
  37. compatible = "qcom,tcsr";
  38. reg = <0x1949000 0x100>;
  39. qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
  40. };
  41. tcsr@194b000 {
  42. compatible = "qcom,tcsr";
  43. reg = <0x194b000 0x100>;
  44. qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
  45. status = "okay";
  46. };
  47. ess_tcsr@1953000 {
  48. compatible = "qcom,tcsr";
  49. reg = <0x1953000 0x1000>;
  50. qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
  51. };
  52. tcsr@1957000 {
  53. compatible = "qcom,tcsr";
  54. reg = <0x1957000 0x100>;
  55. qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
  56. };
  57. crypto@8e3a000 {
  58. status = "okay";
  59. };
  60. watchdog@b017000 {
  61. status = "okay";
  62. };
  63. usb3@8af8800 {
  64. status = "okay";
  65. };
  66. };
  67. leds {
  68. compatible = "gpio-leds";
  69. led_power_white: power_white {
  70. function = LED_FUNCTION_POWER;
  71. color = <LED_COLOR_ID_WHITE>;
  72. gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
  73. };
  74. led_power_orange: power_orange {
  75. function = LED_FUNCTION_POWER;
  76. color = <LED_COLOR_ID_ORANGE>;
  77. gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
  78. };
  79. led_power_blue: power_blue {
  80. function = LED_FUNCTION_POWER;
  81. color = <LED_COLOR_ID_BLUE>;
  82. gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
  83. };
  84. router_white {
  85. label = "white:router";
  86. gpios = <&tlmm 28 GPIO_ACTIVE_HIGH>;
  87. };
  88. router_orange {
  89. label = "orange:router";
  90. gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
  91. };
  92. internet_white {
  93. label = "white:internet";
  94. gpios = <&tlmm 27 GPIO_ACTIVE_HIGH>;
  95. };
  96. internet_orange {
  97. label = "orange:internet";
  98. gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
  99. };
  100. wireless_white {
  101. label = "white:wireless";
  102. gpios = <&tlmm 24 GPIO_ACTIVE_HIGH>;
  103. };
  104. wireless_orange {
  105. label = "orange:wireless";
  106. gpios = <&tlmm 44 GPIO_ACTIVE_HIGH>;
  107. };
  108. };
  109. keys {
  110. compatible = "gpio-keys";
  111. auto_mode {
  112. label = "auto_mode";
  113. gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
  114. linux,code = <BTN_0>;
  115. linux,input-type = <EV_SW>;
  116. };
  117. router_mode {
  118. label = "router_mode";
  119. gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
  120. linux,code = <BTN_1>;
  121. linux,input-type = <EV_SW>;
  122. };
  123. ap_mode {
  124. label = "ap_mode";
  125. gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
  126. linux,code = <BTN_2>;
  127. linux,input-type = <EV_SW>;
  128. };
  129. reset {
  130. label = "reset";
  131. gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
  132. linux,code = <KEY_RESTART>;
  133. };
  134. wps {
  135. label = "AOSS Button";
  136. gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
  137. linux,code = <KEY_WPS_BUTTON>;
  138. };
  139. };
  140. };
  141. &tlmm {
  142. serial_0_pins: serial0_pinmux {
  143. mux {
  144. pins = "gpio16", "gpio17";
  145. function = "blsp_uart0";
  146. bias-disable;
  147. };
  148. };
  149. mdio_pins: mdio_pinmux {
  150. mux_1 {
  151. pins = "gpio6";
  152. function = "mdio";
  153. bias-pull-up;
  154. };
  155. mux_2 {
  156. pins = "gpio7";
  157. function = "mdc";
  158. bias-pull-up;
  159. };
  160. };
  161. nand_pins: nand_pins {
  162. pullups {
  163. pins = "gpio52", "gpio53", "gpio58",
  164. "gpio59";
  165. function = "qpic";
  166. bias-pull-up;
  167. };
  168. pulldowns {
  169. pins = "gpio54", "gpio55", "gpio56",
  170. "gpio57", "gpio60", "gpio61",
  171. "gpio62", "gpio63", "gpio64",
  172. "gpio65", "gpio66", "gpio67",
  173. "gpio68", "gpio69";
  174. function = "qpic";
  175. bias-pull-down;
  176. };
  177. };
  178. usb_power {
  179. line-name = "USB power";
  180. gpios = <34 GPIO_ACTIVE_HIGH>;
  181. gpio-hog;
  182. output-high;
  183. };
  184. };
  185. &blsp_dma {
  186. status = "okay";
  187. };
  188. &blsp1_uart1 {
  189. pinctrl-0 = <&serial_0_pins>;
  190. pinctrl-names = "default";
  191. status = "okay";
  192. };
  193. &cryptobam {
  194. status = "okay";
  195. };
  196. &pcie0 {
  197. status = "okay";
  198. bridge@0,0 {
  199. reg = <0x00000000 0 0 0 0>;
  200. #address-cells = <3>;
  201. #size-cells = <2>;
  202. ranges;
  203. wifi@0,0 {
  204. compatible = "qcom,ath10k";
  205. reg = <0 0 0 0 0>;
  206. nvmem-cell-names = "pre-calibration", "mac-address";
  207. nvmem-cells = <&precal_art_9000>, <&macaddr_orgdata_32>;
  208. qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
  209. };
  210. };
  211. };
  212. &qpic_bam {
  213. status = "okay";
  214. };
  215. &nand {
  216. pinctrl-0 = <&nand_pins>;
  217. pinctrl-names = "default";
  218. status = "okay";
  219. nand@0 {
  220. partitions {
  221. compatible = "fixed-partitions";
  222. #address-cells = <1>;
  223. #size-cells = <1>;
  224. partition@0 {
  225. label = "SBL1";
  226. reg = <0x0000000 0x0100000>;
  227. read-only;
  228. };
  229. partition@100000 {
  230. label = "MIBIB";
  231. reg = <0x0100000 0x0100000>;
  232. read-only;
  233. };
  234. partition@200000 {
  235. label = "BOOTCONFIG";
  236. reg = <0x0200000 0x0100000>;
  237. read-only;
  238. };
  239. partition@300000 {
  240. label = "QSEE";
  241. reg = <0x0300000 0x0100000>;
  242. read-only;
  243. };
  244. partition@400000 {
  245. label = "QSEE_1";
  246. reg = <0x0400000 0x0100000>;
  247. read-only;
  248. };
  249. partition@500000 {
  250. label = "CDT";
  251. reg = <0x0500000 0x0080000>;
  252. read-only;
  253. };
  254. partition@580000 {
  255. label = "CDT_1";
  256. reg = <0x0580000 0x0080000>;
  257. read-only;
  258. };
  259. partition@600000 {
  260. label = "BOOTCONFIG1";
  261. reg = <0x0600000 0x0080000>;
  262. read-only;
  263. };
  264. partition@680000 {
  265. label = "APPSBLENV";
  266. reg = <0x0680000 0x0080000>;
  267. };
  268. partition@700000 {
  269. label = "APPSBL";
  270. reg = <0x0700000 0x0200000>;
  271. read-only;
  272. };
  273. partition@900000 {
  274. label = "APPSBL_1";
  275. reg = <0x0900000 0x0200000>;
  276. read-only;
  277. };
  278. partition@b00000 {
  279. label = "ART";
  280. reg = <0x0b00000 0x0080000>;
  281. read-only;
  282. nvmem-layout {
  283. compatible = "fixed-layout";
  284. #address-cells = <1>;
  285. #size-cells = <1>;
  286. precal_art_1000: precal@1000 {
  287. reg = <0x1000 0x2f20>;
  288. };
  289. precal_art_5000: precal@5000 {
  290. reg = <0x5000 0x2f20>;
  291. };
  292. precal_art_9000: precal@9000 {
  293. reg = <0x5000 0x2f20>;
  294. };
  295. };
  296. };
  297. partition@b80000 {
  298. label = "ART_1";
  299. reg = <0x0b80000 0x0080000>;
  300. read-only;
  301. };
  302. orgdata: partition@c00000 {
  303. label = "ORGDATA";
  304. reg = <0x0c00000 0x0080000>;
  305. read-only;
  306. nvmem-layout {
  307. compatible = "fixed-layout";
  308. #address-cells = <1>;
  309. #size-cells = <1>;
  310. macaddr_orgdata_20: macaddr@20 {
  311. reg = <0x20 0x6>;
  312. };
  313. macaddr_orgdata_26: macaddr@26 {
  314. reg = <0x26 0x6>;
  315. };
  316. macaddr_orgdata_2c: macaddr@2c {
  317. reg = <0x2c 0x6>;
  318. };
  319. macaddr_orgdata_32: macaddr@32 {
  320. reg = <0x32 0x6>;
  321. };
  322. };
  323. };
  324. partition@c80000 {
  325. label = "ORGDATA_1";
  326. reg = <0x0c80000 0x0080000>;
  327. read-only;
  328. };
  329. partition@d00000 {
  330. label = "ubi";
  331. reg = <0x0d00000 0x2900000>;
  332. };
  333. partition@3600000 {
  334. label = "rootfs_recover";
  335. reg = <0x3600000 0x2900000>;
  336. read-only;
  337. };
  338. partition@5f00000 {
  339. label = "user_property";
  340. reg = <0x5f00000 0x1a20000>;
  341. read-only;
  342. };
  343. };
  344. };
  345. };
  346. &wifi0 {
  347. status = "okay";
  348. nvmem-cell-names = "pre-calibration", "mac-address";
  349. nvmem-cells = <&precal_art_1000>, <&macaddr_orgdata_26>;
  350. qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
  351. ieee80211-freq-limit = <2400000 2483000>;
  352. };
  353. &wifi1 {
  354. status = "okay";
  355. nvmem-cell-names = "pre-calibration", "mac-address";
  356. nvmem-cells = <&precal_art_5000>, <&macaddr_orgdata_2c>;
  357. qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
  358. };
  359. &switch {
  360. status = "okay";
  361. };
  362. &swport2 {
  363. status = "okay";
  364. label = "lan3";
  365. };
  366. &swport3 {
  367. status = "okay";
  368. label = "lan2";
  369. };
  370. &swport4 {
  371. status = "okay";
  372. label = "lan1";
  373. };
  374. &swport5 {
  375. status = "okay";
  376. };
  377. &gmac {
  378. status = "okay";
  379. nvmem-cell-names = "mac-address";
  380. nvmem-cells = <&macaddr_orgdata_20>;
  381. };
  382. &mdio {
  383. status = "okay";
  384. pinctrl-0 = <&mdio_pins>;
  385. pinctrl-names = "default";
  386. reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
  387. };
  388. &usb3_ss_phy {
  389. status = "okay";
  390. };
  391. &usb3_hs_phy {
  392. status = "okay";
  393. };