2
0

qcom-ipq8064-ad7200.dts 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. //SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "qcom-ipq8064-v2.0.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. / {
  5. model = "TP-Link Talon AD7200";
  6. compatible = "tplink,ad7200", "qcom,ipq8064";
  7. memory@0 {
  8. reg = <0x42000000 0x1e000000>;
  9. device_type = "memory";
  10. };
  11. aliases {
  12. mdio-gpio0 = &mdio0;
  13. led-boot = &power;
  14. led-failsafe = &power;
  15. led-running = &power;
  16. led-upgrade = &power;
  17. label-mac-device = &gmac2;
  18. };
  19. keys {
  20. compatible = "gpio-keys";
  21. pinctrl-0 = <&button_pins>;
  22. pinctrl-names = "default";
  23. wifi {
  24. label = "wifi";
  25. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  26. linux,code = <KEY_RFKILL>;
  27. };
  28. reset {
  29. label = "reset";
  30. gpios = <&qcom_pinmux 7 GPIO_ACTIVE_LOW>;
  31. linux,code = <KEY_RESTART>;
  32. };
  33. wps {
  34. label = "wps";
  35. gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
  36. linux,code = <KEY_WPS_BUTTON>;
  37. };
  38. ledgeneral {
  39. label = "led-enable";
  40. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_LOW>;
  41. linux,code = <KEY_LIGHTS_TOGGLE>;
  42. };
  43. };
  44. leds {
  45. compatible = "gpio-leds";
  46. pinctrl-0 = <&led_pins>;
  47. pinctrl-names = "default";
  48. lan {
  49. label = "blue:lan";
  50. gpios = <&qcom_pinmux 2 GPIO_ACTIVE_HIGH>;
  51. };
  52. usb1 {
  53. label = "blue:usb1";
  54. gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
  55. };
  56. wlan5g {
  57. label = "blue:wlan5g";
  58. gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
  59. };
  60. usb3 {
  61. label = "blue:usb3";
  62. gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
  63. };
  64. wlan2g {
  65. label = "blue:wlan2g";
  66. gpios = <&qcom_pinmux 17 GPIO_ACTIVE_HIGH>;
  67. };
  68. wan_orange {
  69. label = "orange:wan";
  70. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
  71. };
  72. wan_blue {
  73. label = "blue:wan";
  74. gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
  75. };
  76. wps {
  77. label = "blue:wps";
  78. gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
  79. };
  80. wlan60g {
  81. label = "blue:wlan60g";
  82. gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
  83. };
  84. power: status {
  85. label = "blue:status";
  86. gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
  87. };
  88. };
  89. };
  90. &qcom_pinmux {
  91. button_pins: button_pins {
  92. mux {
  93. pins = "gpio53", "gpio54", "gpio67";
  94. function = "gpio";
  95. drive-strength = <2>;
  96. bias-pull-up;
  97. };
  98. };
  99. led_pins: led_pins {
  100. mux {
  101. pins = "gpio2", "gpio8", "gpio15", "gpio16", "gpio17", "gpio26",
  102. "gpio33", "gpio55", "gpio56", "gpio66";
  103. function = "gpio";
  104. drive-strength = <2>;
  105. bias-pull-up;
  106. };
  107. };
  108. spi_pins: spi_pins {
  109. mux {
  110. pins = "gpio18", "gpio19", "gpio21";
  111. function = "gsbi5";
  112. bias-pull-down;
  113. };
  114. data {
  115. pins = "gpio18", "gpio19";
  116. drive-strength = <10>;
  117. };
  118. cs {
  119. pins = "gpio20";
  120. function = "gpio";
  121. drive-strength = <10>;
  122. bias-pull-up;
  123. };
  124. clk {
  125. pins = "gpio21";
  126. drive-strength = <12>;
  127. };
  128. };
  129. usb0_pwr_en_pin: usb0_pwr_en_pin {
  130. mux {
  131. pins = "gpio25";
  132. function = "gpio";
  133. drive-strength = <10>;
  134. bias-pull-up;
  135. output-high;
  136. };
  137. };
  138. usb1_pwr_en_pin: usb1_pwr_en_pin {
  139. mux {
  140. pins = "gpio23";
  141. function = "gpio";
  142. drive-strength = <10>;
  143. bias-pull-up;
  144. output-high;
  145. };
  146. };
  147. };
  148. &gsbi5 {
  149. qcom,mode = <GSBI_PROT_SPI>;
  150. status = "okay";
  151. spi4: spi@1a280000 {
  152. status = "okay";
  153. pinctrl-0 = <&spi_pins>;
  154. pinctrl-names = "default";
  155. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  156. m25p80@0 {
  157. compatible = "jedec,spi-nor";
  158. #address-cells = <1>;
  159. #size-cells = <1>;
  160. spi-max-frequency = <50000000>;
  161. reg = <0>;
  162. partition@0 {
  163. label = "SBL1";
  164. reg = <0x0 0x20000>;
  165. read-only;
  166. };
  167. partition@20000 {
  168. label = "MIBIB";
  169. reg = <0x20000 0x20000>;
  170. read-only;
  171. };
  172. partition@40000 {
  173. label = "SBL2";
  174. reg = <0x40000 0x20000>;
  175. read-only;
  176. };
  177. partition@60000 {
  178. label = "SBL3";
  179. reg = <0x60000 0x30000>;
  180. read-only;
  181. };
  182. partition@90000 {
  183. label = "DDRCONFIG";
  184. reg = <0x90000 0x10000>;
  185. read-only;
  186. };
  187. partition@a0000 {
  188. label = "SSD";
  189. reg = <0xa0000 0x10000>;
  190. read-only;
  191. };
  192. partition@b0000 {
  193. label = "TZ";
  194. reg = <0xb0000 0x30000>;
  195. read-only;
  196. };
  197. partition@e0000 {
  198. label = "RPM";
  199. reg = <0xe0000 0x20000>;
  200. read-only;
  201. };
  202. partition@100000 {
  203. label = "fs-uboot";
  204. reg = <0x100000 0x70000>;
  205. read-only;
  206. };
  207. partition@170000 {
  208. label = "uboot-env";
  209. reg = <0x170000 0x40000>;
  210. read-only;
  211. };
  212. partition@1b0000 {
  213. label = "radio";
  214. reg = <0x1b0000 0x40000>;
  215. read-only;
  216. };
  217. partition@1f0000 {
  218. label = "os-image";
  219. reg = <0x1f0000 0x400000>;
  220. };
  221. partition@5f0000 {
  222. label = "rootfs";
  223. reg = <0x5f0000 0x1900000>;
  224. };
  225. defaultmac: partition@1ef0000 {
  226. label = "default-mac";
  227. reg = <0x1ef0000 0x00200>;
  228. read-only;
  229. };
  230. partition@1ef0200 {
  231. label = "pin";
  232. reg = <0x1ef0200 0x00200>;
  233. read-only;
  234. };
  235. partition@1ef0400 {
  236. label = "device-id";
  237. reg = <0x1ef0400 0x00200>;
  238. read-only;
  239. };
  240. partition@1ef0600 {
  241. label = "product-info";
  242. reg = <0x1ef0600 0x0fa00>;
  243. read-only;
  244. };
  245. partition@1f00000 {
  246. label = "partition-table";
  247. reg = <0x1f00000 0x10000>;
  248. read-only;
  249. };
  250. partition@1f10000 {
  251. label = "soft-version";
  252. reg = <0x1f10000 0x10000>;
  253. read-only;
  254. };
  255. partition@1f20000 {
  256. label = "support-list";
  257. reg = <0x1f20000 0x10000>;
  258. read-only;
  259. };
  260. partition@1f30000 {
  261. label = "profile";
  262. reg = <0x1f30000 0x10000>;
  263. read-only;
  264. };
  265. partition@1f40000 {
  266. label = "default-config";
  267. reg = <0x1f40000 0x10000>;
  268. read-only;
  269. };
  270. partition@1f50000 {
  271. label = "user-config";
  272. reg = <0x1f50000 0x40000>;
  273. read-only;
  274. };
  275. partition@1f90000 {
  276. label = "qos-db";
  277. reg = <0x1f90000 0x40000>;
  278. read-only;
  279. };
  280. partition@1fd0000 {
  281. label = "usb-config";
  282. reg = <0x1fd0000 0x10000>;
  283. read-only;
  284. };
  285. partition@1fe0000 {
  286. label = "log";
  287. reg = <0x1fe0000 0x20000>;
  288. read-only;
  289. };
  290. };
  291. };
  292. };
  293. &usb3_0 {
  294. status = "okay";
  295. pinctrl-0 = <&usb0_pwr_en_pin>;
  296. pinctrl-names = "default";
  297. };
  298. &usb3_1 {
  299. status = "okay";
  300. pinctrl-0 = <&usb1_pwr_en_pin>;
  301. pinctrl-names = "default";
  302. };
  303. &pcie0 {
  304. status = "okay";
  305. };
  306. &pcie1 {
  307. status = "okay";
  308. max-link-speed = <1>;
  309. };
  310. &pcie2 {
  311. status = "okay";
  312. max-link-speed = <1>;
  313. };
  314. &mdio0 {
  315. status = "okay";
  316. pinctrl-0 = <&mdio0_pins>;
  317. pinctrl-names = "default";
  318. phy0: ethernet-phy@0 {
  319. reg = <0>;
  320. qca,ar8327-initvals = <
  321. 0x00004 0x7600000 /* PAD0_MODE */
  322. 0x00008 0x1000000 /* PAD5_MODE */
  323. 0x0000c 0x80 /* PAD6_MODE */
  324. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  325. 0x000e0 0xc74164de /* SGMII_CTRL */
  326. 0x0007c 0x4e /* PORT0_STATUS */
  327. 0x00094 0x4e /* PORT6_STATUS */
  328. >;
  329. };
  330. phy4: ethernet-phy@4 {
  331. reg = <4>;
  332. };
  333. };
  334. &gmac1 {
  335. status = "okay";
  336. phy-mode = "rgmii";
  337. qcom,id = <1>;
  338. pinctrl-0 = <&rgmii2_pins>;
  339. pinctrl-names = "default";
  340. mtd-mac-address = <&defaultmac 0x8>;
  341. mtd-mac-address-increment = <1>;
  342. fixed-link {
  343. speed = <1000>;
  344. full-duplex;
  345. };
  346. };
  347. &gmac2 {
  348. status = "okay";
  349. phy-mode = "sgmii";
  350. qcom,id = <2>;
  351. mtd-mac-address = <&defaultmac 0x8>;
  352. fixed-link {
  353. speed = <1000>;
  354. full-duplex;
  355. };
  356. };
  357. &adm_dma {
  358. status = "okay";
  359. };