qcom-ipq8064-c2600.dts 6.6 KB

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