2
0

qcom-ipq8064-c2600.dts 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. #include "qcom-ipq8064-v1.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. reserved-memory {
  11. #address-cells = <1>;
  12. #size-cells = <1>;
  13. ranges;
  14. rsvd@41200000 {
  15. reg = <0x41200000 0x300000>;
  16. no-map;
  17. };
  18. };
  19. aliases {
  20. serial0 = &gsbi4_serial;
  21. mdio-gpio0 = &mdio0;
  22. led-boot = &power;
  23. led-failsafe = &general;
  24. led-running = &power;
  25. led-upgrade = &general;
  26. };
  27. chosen {
  28. linux,stdout-path = "serial0:115200n8";
  29. };
  30. soc {
  31. pinmux@800000 {
  32. button_pins: button_pins {
  33. mux {
  34. pins = "gpio16", "gpio54", "gpio65";
  35. function = "gpio";
  36. drive-strength = <2>;
  37. bias-pull-up;
  38. };
  39. };
  40. i2c4_pins: i2c4_pinmux {
  41. mux {
  42. pins = "gpio12", "gpio13";
  43. function = "gsbi4";
  44. drive-strength = <12>;
  45. bias-disable;
  46. };
  47. };
  48. led_pins: led_pins {
  49. mux {
  50. pins = "gpio6", "gpio7", "gpio8", "gpio9", "gpio26", "gpio33",
  51. "gpio53", "gpio66";
  52. function = "gpio";
  53. drive-strength = <2>;
  54. bias-pull-up;
  55. };
  56. };
  57. spi_pins: spi_pins {
  58. mux {
  59. pins = "gpio18", "gpio19", "gpio21";
  60. function = "gsbi5";
  61. bias-pull-down;
  62. };
  63. data {
  64. pins = "gpio18", "gpio19";
  65. drive-strength = <10>;
  66. };
  67. cs {
  68. pins = "gpio20";
  69. function = "gpio";
  70. drive-strength = <10>;
  71. bias-pull-up;
  72. };
  73. clk {
  74. pins = "gpio21";
  75. drive-strength = <12>;
  76. };
  77. };
  78. mdio0_pins: mdio0_pins {
  79. mux {
  80. pins = "gpio0", "gpio1";
  81. function = "gpio";
  82. drive-strength = <8>;
  83. bias-disable;
  84. };
  85. };
  86. rgmii2_pins: rgmii2_pins {
  87. mux {
  88. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
  89. "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
  90. function = "rgmii2";
  91. drive-strength = <8>;
  92. bias-disable;
  93. };
  94. };
  95. usb0_pwr_en_pin: usb0_pwr_en_pin {
  96. mux {
  97. pins = "gpio25";
  98. function = "gpio";
  99. drive-strength = <10>;
  100. bias-pull-up;
  101. output-high;
  102. };
  103. };
  104. usb1_pwr_en_pin: usb1_pwr_en_pin {
  105. mux {
  106. pins = "gpio23";
  107. function = "gpio";
  108. drive-strength = <10>;
  109. bias-pull-up;
  110. output-high;
  111. };
  112. };
  113. };
  114. gsbi@16300000 {
  115. qcom,mode = <GSBI_PROT_I2C_UART>;
  116. status = "ok";
  117. serial@16340000 {
  118. status = "ok";
  119. };
  120. /*
  121. * The i2c device on gsbi4 should not be enabled.
  122. * On ipq806x designs gsbi4 i2c is meant for exclusive
  123. * RPM usage. Turning this on in kernel manifests as
  124. * i2c failure for the RPM.
  125. */
  126. };
  127. gsbi5: gsbi@1a200000 {
  128. qcom,mode = <GSBI_PROT_SPI>;
  129. status = "ok";
  130. spi5: spi@1a280000 {
  131. status = "ok";
  132. pinctrl-0 = <&spi_pins>;
  133. pinctrl-names = "default";
  134. cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
  135. flash: m25p80@0 {
  136. compatible = "jedec,spi-nor";
  137. #address-cells = <1>;
  138. #size-cells = <1>;
  139. spi-max-frequency = <50000000>;
  140. reg = <0>;
  141. SBL1@0 {
  142. label = "SBL1";
  143. reg = <0x0 0x20000>;
  144. read-only;
  145. };
  146. MIBIB@20000 {
  147. label = "MIBIB";
  148. reg = <0x20000 0x20000>;
  149. read-only;
  150. };
  151. SBL2@40000 {
  152. label = "SBL2";
  153. reg = <0x40000 0x20000>;
  154. read-only;
  155. };
  156. SBL3@60000 {
  157. label = "SBL3";
  158. reg = <0x60000 0x30000>;
  159. read-only;
  160. };
  161. DDRCONFIG@90000 {
  162. label = "DDRCONFIG";
  163. reg = <0x90000 0x10000>;
  164. read-only;
  165. };
  166. SSD@a0000 {
  167. label = "SSD";
  168. reg = <0xa0000 0x10000>;
  169. read-only;
  170. };
  171. TZ@b0000 {
  172. label = "TZ";
  173. reg = <0xb0000 0x30000>;
  174. read-only;
  175. };
  176. RPM@e0000 {
  177. label = "RPM";
  178. reg = <0xe0000 0x20000>;
  179. read-only;
  180. };
  181. fs-uboot@100000 {
  182. label = "fs-uboot";
  183. reg = <0x100000 0x70000>;
  184. read-only;
  185. };
  186. uboot-env@170000 {
  187. label = "uboot-env";
  188. reg = <0x170000 0x40000>;
  189. read-only;
  190. };
  191. radio@1b0000 {
  192. label = "radio";
  193. reg = <0x1b0000 0x40000>;
  194. read-only;
  195. };
  196. os-image@1f0000 {
  197. label = "os-image";
  198. reg = <0x1f0000 0x200000>;
  199. };
  200. rootfs@3f0000 {
  201. label = "rootfs";
  202. reg = <0x3f0000 0x1b00000>;
  203. };
  204. defaultmac: default-mac@1ef0000 {
  205. label = "default-mac";
  206. reg = <0x1ef0000 0x00200>;
  207. read-only;
  208. };
  209. pin@1ef0200 {
  210. label = "pin";
  211. reg = <0x1ef0200 0x00200>;
  212. read-only;
  213. };
  214. product-info@1ef0400 {
  215. label = "product-info";
  216. reg = <0x1ef0400 0x0fc00>;
  217. read-only;
  218. };
  219. partition-table@1f00000 {
  220. label = "partition-table";
  221. reg = <0x1f00000 0x10000>;
  222. read-only;
  223. };
  224. soft-version@1f10000 {
  225. label = "soft-version";
  226. reg = <0x1f10000 0x10000>;
  227. read-only;
  228. };
  229. support-list@1f20000 {
  230. label = "support-list";
  231. reg = <0x1f20000 0x10000>;
  232. read-only;
  233. };
  234. profile@1f30000 {
  235. label = "profile";
  236. reg = <0x1f30000 0x10000>;
  237. read-only;
  238. };
  239. default-config@1f40000 {
  240. label = "default-config";
  241. reg = <0x1f40000 0x10000>;
  242. read-only;
  243. };
  244. user-config@1f50000 {
  245. label = "user-config";
  246. reg = <0x1f50000 0x40000>;
  247. read-only;
  248. };
  249. qos-db@1f90000 {
  250. label = "qos-db";
  251. reg = <0x1f90000 0x40000>;
  252. read-only;
  253. };
  254. usb-config@1fd0000 {
  255. label = "usb-config";
  256. reg = <0x1fd0000 0x10000>;
  257. read-only;
  258. };
  259. log@1fe0000 {
  260. label = "log";
  261. reg = <0x1fe0000 0x20000>;
  262. read-only;
  263. };
  264. };
  265. };
  266. };
  267. phy@100f8800 { /* USB3 port 1 HS phy */
  268. status = "ok";
  269. };
  270. phy@100f8830 { /* USB3 port 1 SS phy */
  271. status = "ok";
  272. };
  273. phy@110f8800 { /* USB3 port 0 HS phy */
  274. status = "ok";
  275. };
  276. phy@110f8830 { /* USB3 port 0 SS phy */
  277. status = "ok";
  278. };
  279. usb30@0 {
  280. status = "ok";
  281. pinctrl-0 = <&usb0_pwr_en_pin>;
  282. pinctrl-names = "default";
  283. };
  284. usb30@1 {
  285. status = "ok";
  286. pinctrl-0 = <&usb1_pwr_en_pin>;
  287. pinctrl-names = "default";
  288. };
  289. pcie0: pci@1b500000 {
  290. status = "ok";
  291. };
  292. pcie1: pci@1b700000 {
  293. status = "ok";
  294. force_gen1 = <1>;
  295. };
  296. mdio0: mdio {
  297. compatible = "virtual,mdio-gpio";
  298. #address-cells = <1>;
  299. #size-cells = <0>;
  300. gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
  301. pinctrl-0 = <&mdio0_pins>;
  302. pinctrl-names = "default";
  303. phy0: ethernet-phy@0 {
  304. device_type = "ethernet-phy";
  305. reg = <0>;
  306. qca,ar8327-initvals = <
  307. 0x00004 0x7600000 /* PAD0_MODE */
  308. 0x00008 0x1000000 /* PAD5_MODE */
  309. 0x0000c 0x80 /* PAD6_MODE */
  310. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  311. 0x000e0 0xc74164de /* SGMII_CTRL */
  312. 0x0007c 0x4e /* PORT0_STATUS */
  313. 0x00094 0x4e /* PORT6_STATUS */
  314. >;
  315. };
  316. phy4: ethernet-phy@4 {
  317. device_type = "ethernet-phy";
  318. reg = <4>;
  319. };
  320. };
  321. gmac1: ethernet@37200000 {
  322. status = "ok";
  323. phy-mode = "rgmii";
  324. qcom,id = <1>;
  325. pinctrl-0 = <&rgmii2_pins>;
  326. pinctrl-names = "default";
  327. mtd-mac-address = <&defaultmac 0x8>;
  328. mtd-mac-address-increment = <1>;
  329. fixed-link {
  330. speed = <1000>;
  331. full-duplex;
  332. };
  333. };
  334. gmac2: ethernet@37400000 {
  335. status = "ok";
  336. phy-mode = "sgmii";
  337. qcom,id = <2>;
  338. mtd-mac-address = <&defaultmac 0x8>;
  339. fixed-link {
  340. speed = <1000>;
  341. full-duplex;
  342. };
  343. };
  344. rpm@108000 {
  345. pinctrl-0 = <&i2c4_pins>;
  346. pinctrl-names = "default";
  347. };
  348. };
  349. gpio-keys {
  350. compatible = "gpio-keys";
  351. pinctrl-0 = <&button_pins>;
  352. pinctrl-names = "default";
  353. wifi {
  354. label = "wifi";
  355. gpios = <&qcom_pinmux 49 GPIO_ACTIVE_LOW>;
  356. linux,code = <KEY_RFKILL>;
  357. };
  358. reset {
  359. label = "reset";
  360. gpios = <&qcom_pinmux 64 GPIO_ACTIVE_LOW>;
  361. linux,code = <KEY_RESTART>;
  362. };
  363. wps {
  364. label = "wps";
  365. gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
  366. linux,code = <KEY_WPS_BUTTON>;
  367. };
  368. ledswitch {
  369. label = "ledswitch";
  370. gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
  371. linux,code = <KEY_LIGHTS_TOGGLE>;
  372. };
  373. };
  374. gpio-leds {
  375. compatible = "gpio-leds";
  376. pinctrl-0 = <&led_pins>;
  377. pinctrl-names = "default";
  378. lan {
  379. label = "c2600:white:lan";
  380. gpios = <&qcom_pinmux 6 GPIO_ACTIVE_HIGH>;
  381. };
  382. usb4 {
  383. label = "c2600:white:usb_4";
  384. gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
  385. };
  386. usb2 {
  387. label = "c2600:white:usb_2";
  388. gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
  389. };
  390. wps {
  391. label = "c2600:white:wps";
  392. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  393. };
  394. wan_amber {
  395. label = "c2600:amber:wan";
  396. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
  397. };
  398. wan_white {
  399. label = "c2600:white:wan";
  400. gpios = <&qcom_pinmux 33 GPIO_ACTIVE_LOW>;
  401. };
  402. power: power {
  403. label = "c2600:white:power";
  404. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
  405. default-state = "keep";
  406. };
  407. general: general {
  408. label = "c2600:white:general";
  409. gpios = <&qcom_pinmux 66 GPIO_ACTIVE_HIGH>;
  410. };
  411. };
  412. };
  413. &adm_dma {
  414. status = "ok";
  415. };