qcom-ipq8064-vr2600v.dts 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. #include "qcom-ipq8064-v2.0.dtsi"
  2. #include <dt-bindings/input/input.h>
  3. / {
  4. model = "TP-Link Archer VR2600v";
  5. compatible = "tplink,vr2600v", "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. };
  17. keys {
  18. compatible = "gpio-keys";
  19. pinctrl-0 = <&button_pins>;
  20. pinctrl-names = "default";
  21. wifi {
  22. label = "wifi";
  23. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  24. linux,code = <KEY_RFKILL>;
  25. debounce-interval = <60>;
  26. wakeup-source;
  27. };
  28. reset {
  29. label = "reset";
  30. gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
  31. linux,code = <KEY_RESTART>;
  32. debounce-interval = <60>;
  33. wakeup-source;
  34. };
  35. wps {
  36. label = "wps";
  37. gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
  38. linux,code = <KEY_WPS_BUTTON>;
  39. debounce-interval = <60>;
  40. wakeup-source;
  41. };
  42. dect {
  43. label = "dect";
  44. gpios = <&qcom_pinmux 67 GPIO_ACTIVE_LOW>;
  45. linux,code = <KEY_PHONE>;
  46. debounce-interval = <60>;
  47. wakeup-source;
  48. };
  49. ledswitch {
  50. label = "ledswitch";
  51. gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
  52. linux,code = <KEY_LIGHTS_TOGGLE>;
  53. debounce-interval = <60>;
  54. wakeup-source;
  55. };
  56. };
  57. leds {
  58. compatible = "gpio-leds";
  59. pinctrl-0 = <&led_pins>;
  60. pinctrl-names = "default";
  61. dsl {
  62. label = "white:dsl";
  63. gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
  64. };
  65. usb {
  66. label = "white:usb";
  67. gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
  68. };
  69. lan {
  70. label = "white:lan";
  71. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  72. };
  73. wlan2g {
  74. label = "white:wlan2g";
  75. gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>;
  76. };
  77. wlan5g {
  78. label = "white:wlan5g";
  79. gpios = <&qcom_pinmux 17 GPIO_ACTIVE_HIGH>;
  80. };
  81. power: power {
  82. label = "white:power";
  83. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
  84. default-state = "keep";
  85. };
  86. phone {
  87. label = "white:phone";
  88. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
  89. };
  90. wan {
  91. label = "white:wan";
  92. gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
  93. };
  94. general: general {
  95. label = "white:general";
  96. gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
  97. };
  98. };
  99. };
  100. &qcom_pinmux {
  101. led_pins: led_pins {
  102. mux {
  103. pins = "gpio7", "gpio8", "gpio9", "gpio16", "gpio17",
  104. "gpio26", "gpio53", "gpio56", "gpio66";
  105. function = "gpio";
  106. drive-strength = <2>;
  107. bias-pull-up;
  108. };
  109. };
  110. button_pins: button_pins {
  111. mux {
  112. pins = "gpio54", "gpio64", "gpio65", "gpio67", "gpio68";
  113. function = "gpio";
  114. drive-strength = <2>;
  115. bias-pull-up;
  116. };
  117. };
  118. spi_pins: spi_pins {
  119. mux {
  120. pins = "gpio18", "gpio19", "gpio21";
  121. function = "gsbi5";
  122. bias-pull-down;
  123. };
  124. data {
  125. pins = "gpio18", "gpio19";
  126. drive-strength = <10>;
  127. };
  128. cs {
  129. pins = "gpio20";
  130. drive-strength = <10>;
  131. bias-pull-up;
  132. };
  133. clk {
  134. pins = "gpio21";
  135. drive-strength = <12>;
  136. };
  137. };
  138. };
  139. &gsbi5 {
  140. qcom,mode = <GSBI_PROT_SPI>;
  141. status = "okay";
  142. spi4: spi@1a280000 {
  143. status = "okay";
  144. pinctrl-0 = <&spi_pins>;
  145. pinctrl-names = "default";
  146. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  147. flash@0 {
  148. compatible = "jedec,spi-nor";
  149. #address-cells = <1>;
  150. #size-cells = <1>;
  151. spi-max-frequency = <50000000>;
  152. reg = <0>;
  153. partitions {
  154. compatible = "fixed-partitions";
  155. #address-cells = <1>;
  156. #size-cells = <1>;
  157. partition@0 {
  158. label = "SBL1";
  159. reg = <0x0 0x20000>;
  160. read-only;
  161. };
  162. partition@20000 {
  163. label = "MIBIB";
  164. reg = <0x20000 0x20000>;
  165. read-only;
  166. };
  167. partition@40000 {
  168. label = "SBL2";
  169. reg = <0x40000 0x40000>;
  170. read-only;
  171. };
  172. partition@80000 {
  173. label = "SBL3";
  174. reg = <0x80000 0x80000>;
  175. read-only;
  176. };
  177. partition@100000 {
  178. label = "DDRCONFIG";
  179. reg = <0x100000 0x10000>;
  180. read-only;
  181. };
  182. partition@110000 {
  183. label = "SSD";
  184. reg = <0x110000 0x10000>;
  185. read-only;
  186. };
  187. partition@120000 {
  188. label = "TZ";
  189. reg = <0x120000 0x80000>;
  190. read-only;
  191. };
  192. partition@1a0000 {
  193. label = "RPM";
  194. reg = <0x1a0000 0x80000>;
  195. read-only;
  196. };
  197. partition@220000 {
  198. label = "APPSBL";
  199. reg = <0x220000 0x80000>;
  200. read-only;
  201. };
  202. partition@2a0000 {
  203. label = "APPSBLENV";
  204. reg = <0x2a0000 0x40000>;
  205. read-only;
  206. };
  207. partition@2e0000 {
  208. label = "OLDART";
  209. reg = <0x2e0000 0x40000>;
  210. read-only;
  211. };
  212. partition@320000 {
  213. label = "firmware";
  214. reg = <0x320000 0xc60000>;
  215. compatible = "openwrt,uimage";
  216. openwrt,offset = <512>; /* account for pad-extra 512 */
  217. };
  218. /* hole 0xf80000 - 0xfaf100 */
  219. partition@faf100 {
  220. label = "default-mac";
  221. reg = <0xfaf100 0x00200>;
  222. read-only;
  223. compatible = "nvmem-cells";
  224. #address-cells = <1>;
  225. #size-cells = <1>;
  226. macaddr_defaultmac_0: macaddr@0 {
  227. reg = <0x0 0x6>;
  228. };
  229. };
  230. partition@fc0000 {
  231. label = "ART";
  232. reg = <0xfc0000 0x40000>;
  233. read-only;
  234. compatible = "nvmem-cells";
  235. #address-cells = <1>;
  236. #size-cells = <1>;
  237. precal_ART_1000: precal@1000 {
  238. reg = <0x1000 0x2f20>;
  239. };
  240. precal_ART_5000: precal@5000 {
  241. reg = <0x5000 0x2f20>;
  242. };
  243. };
  244. };
  245. };
  246. };
  247. };
  248. &usb3_0 {
  249. status = "okay";
  250. };
  251. &usb3_1 {
  252. status = "okay";
  253. };
  254. &pcie0 {
  255. status = "okay";
  256. bridge@0,0 {
  257. reg = <0x00000000 0 0 0 0>;
  258. #address-cells = <3>;
  259. #size-cells = <2>;
  260. ranges;
  261. wifi@1,0 {
  262. compatible = "pci168c,0040";
  263. reg = <0x00010000 0 0 0 0>;
  264. nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_1000>;
  265. nvmem-cell-names = "mac-address", "pre-calibration";
  266. mac-address-increment = <(-1)>;
  267. };
  268. };
  269. };
  270. &pcie1 {
  271. status = "okay";
  272. max-link-speed = <1>;
  273. bridge@0,0 {
  274. reg = <0x00000000 0 0 0 0>;
  275. #address-cells = <3>;
  276. #size-cells = <2>;
  277. ranges;
  278. wifi@1,0 {
  279. compatible = "pci168c,0040";
  280. reg = <0x00010000 0 0 0 0>;
  281. nvmem-cells = <&macaddr_defaultmac_0>, <&precal_ART_5000>;
  282. nvmem-cell-names = "mac-address", "pre-calibration";
  283. };
  284. };
  285. };
  286. &mdio0 {
  287. status = "okay";
  288. pinctrl-0 = <&mdio0_pins>;
  289. pinctrl-names = "default";
  290. phy0: ethernet-phy@0 {
  291. reg = <0>;
  292. qca,ar8327-initvals = <
  293. 0x00004 0x7600000 /* PAD0_MODE */
  294. 0x00008 0x1000000 /* PAD5_MODE */
  295. 0x0000c 0x80 /* PAD6_MODE */
  296. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  297. 0x000e0 0xc74164de /* SGMII_CTRL */
  298. 0x0007c 0x4e /* PORT0_STATUS */
  299. 0x00094 0x4e /* PORT6_STATUS */
  300. >;
  301. };
  302. phy4: ethernet-phy@4 {
  303. reg = <4>;
  304. };
  305. };
  306. &gmac1 {
  307. status = "okay";
  308. phy-mode = "rgmii";
  309. qcom,id = <1>;
  310. pinctrl-0 = <&rgmii2_pins>;
  311. pinctrl-names = "default";
  312. nvmem-cells = <&macaddr_defaultmac_0>;
  313. nvmem-cell-names = "mac-address";
  314. mac-address-increment = <1>;
  315. fixed-link {
  316. speed = <1000>;
  317. full-duplex;
  318. };
  319. };
  320. &gmac2 {
  321. status = "okay";
  322. phy-mode = "sgmii";
  323. qcom,id = <2>;
  324. nvmem-cells = <&macaddr_defaultmac_0>;
  325. nvmem-cell-names = "mac-address";
  326. fixed-link {
  327. speed = <1000>;
  328. full-duplex;
  329. };
  330. };
  331. &adm_dma {
  332. status = "okay";
  333. };