qcom-ipq4019-wtr-m2133hp.dts 8.0 KB

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