qcom-ipq8065-r7800.dts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. #include "qcom-ipq8065.dtsi"
  2. #include <dt-bindings/input/input.h>
  3. / {
  4. model = "Netgear Nighthawk X4S R7800";
  5. compatible = "netgear,r7800", "qcom,ipq8065", "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. rsvd@5fe00000 {
  19. reg = <0x5fe00000 0x200000>;
  20. reusable;
  21. };
  22. };
  23. aliases {
  24. serial0 = &gsbi4_serial;
  25. mdio-gpio0 = &mdio0;
  26. led-boot = &power_white;
  27. led-failsafe = &power_amber;
  28. led-running = &power_white;
  29. led-upgrade = &power_amber;
  30. label-mac-device = &gmac2;
  31. };
  32. chosen {
  33. stdout-path = "serial0:115200n8";
  34. };
  35. soc {
  36. pinmux@800000 {
  37. button_pins: button_pins {
  38. mux {
  39. pins = "gpio6", "gpio54", "gpio65";
  40. function = "gpio";
  41. drive-strength = <2>;
  42. bias-pull-up;
  43. };
  44. };
  45. i2c4_pins: i2c4_pinmux {
  46. mux {
  47. pins = "gpio12", "gpio13";
  48. function = "gsbi4";
  49. drive-strength = <12>;
  50. bias-disable;
  51. };
  52. };
  53. led_pins: led_pins {
  54. pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
  55. "gpio24","gpio26", "gpio53", "gpio64";
  56. function = "gpio";
  57. drive-strength = <2>;
  58. bias-pull-down;
  59. };
  60. nand_pins: nand_pins {
  61. disable {
  62. pins = "gpio34", "gpio35", "gpio36",
  63. "gpio37", "gpio38";
  64. function = "nand";
  65. drive-strength = <10>;
  66. bias-disable;
  67. };
  68. pullups {
  69. pins = "gpio39";
  70. function = "nand";
  71. drive-strength = <10>;
  72. bias-pull-up;
  73. };
  74. hold {
  75. pins = "gpio40", "gpio41", "gpio42",
  76. "gpio43", "gpio44", "gpio45",
  77. "gpio46", "gpio47";
  78. function = "nand";
  79. drive-strength = <10>;
  80. bias-bus-hold;
  81. };
  82. };
  83. mdio0_pins: mdio0_pins {
  84. mux {
  85. pins = "gpio0", "gpio1";
  86. function = "gpio";
  87. drive-strength = <8>;
  88. bias-disable;
  89. };
  90. clk {
  91. pins = "gpio1";
  92. input-disable;
  93. };
  94. };
  95. rgmii2_pins: rgmii2_pins {
  96. mux {
  97. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
  98. "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
  99. function = "rgmii2";
  100. drive-strength = <8>;
  101. bias-disable;
  102. };
  103. tx {
  104. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
  105. input-disable;
  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. drive-strength = <10>;
  121. bias-pull-up;
  122. };
  123. clk {
  124. pins = "gpio21";
  125. drive-strength = <12>;
  126. };
  127. };
  128. spi6_pins: spi6_pins {
  129. mux {
  130. pins = "gpio55", "gpio56", "gpio58";
  131. function = "gsbi6";
  132. bias-pull-down;
  133. };
  134. mosi {
  135. pins = "gpio55";
  136. drive-strength = <12>;
  137. };
  138. miso {
  139. pins = "gpio56";
  140. drive-strength = <14>;
  141. };
  142. cs {
  143. pins = "gpio57";
  144. drive-strength = <12>;
  145. bias-pull-up;
  146. };
  147. clk {
  148. pins = "gpio58";
  149. drive-strength = <12>;
  150. };
  151. reset {
  152. pins = "gpio33";
  153. drive-strength = <10>;
  154. bias-pull-down;
  155. output-high;
  156. };
  157. };
  158. usb0_pwr_en_pins: usb0_pwr_en_pins {
  159. mux {
  160. pins = "gpio15";
  161. function = "gpio";
  162. drive-strength = <12>;
  163. bias-pull-down;
  164. output-high;
  165. };
  166. };
  167. usb1_pwr_en_pins: usb1_pwr_en_pins {
  168. mux {
  169. pins = "gpio16", "gpio68";
  170. function = "gpio";
  171. drive-strength = <12>;
  172. bias-pull-down;
  173. output-high;
  174. };
  175. };
  176. };
  177. gsbi@16300000 {
  178. qcom,mode = <GSBI_PROT_I2C_UART>;
  179. status = "okay";
  180. serial@16340000 {
  181. status = "okay";
  182. };
  183. /*
  184. * The i2c device on gsbi4 should not be enabled.
  185. * On ipq806x designs gsbi4 i2c is meant for exclusive
  186. * RPM usage. Turning this on in kernel manifests as
  187. * i2c failure for the RPM.
  188. */
  189. };
  190. sata-phy@1b400000 {
  191. status = "okay";
  192. };
  193. sata@29000000 {
  194. ports-implemented = <0x1>;
  195. status = "okay";
  196. };
  197. usb3_0: usb3@110f8800 {
  198. status = "okay";
  199. pinctrl-0 = <&usb0_pwr_en_pins>;
  200. pinctrl-names = "default";
  201. };
  202. usb3_1: usb3@100f8800 {
  203. status = "okay";
  204. pinctrl-0 = <&usb1_pwr_en_pins>;
  205. pinctrl-names = "default";
  206. };
  207. pcie0: pci@1b500000 {
  208. status = "okay";
  209. bridge@0,0 {
  210. reg = <0x00000000 0 0 0 0>;
  211. #address-cells = <3>;
  212. #size-cells = <2>;
  213. ranges;
  214. wifi@1,0 {
  215. compatible = "pci168c,0046";
  216. reg = <0x00010000 0 0 0 0>;
  217. mtd-mac-address = <&art 6>;
  218. mtd-mac-address-increment = <(1)>;
  219. };
  220. };
  221. };
  222. pcie1: pci@1b700000 {
  223. status = "okay";
  224. force_gen1 = <1>;
  225. bridge@0,0 {
  226. reg = <0x00000000 0 0 0 0>;
  227. #address-cells = <3>;
  228. #size-cells = <2>;
  229. ranges;
  230. wifi@1,0 {
  231. compatible = "pci168c,0046";
  232. reg = <0x00010000 0 0 0 0>;
  233. mtd-mac-address = <&art 6>;
  234. mtd-mac-address-increment = <(2)>;
  235. };
  236. };
  237. };
  238. nand@1ac00000 {
  239. status = "okay";
  240. pinctrl-0 = <&nand_pins>;
  241. pinctrl-names = "default";
  242. cs0 {
  243. reg = <0>;
  244. compatible = "qcom,nandcs";
  245. nand-ecc-strength = <4>;
  246. nand-bus-width = <8>;
  247. nand-ecc-step-size = <512>;
  248. partitions {
  249. compatible = "fixed-partitions";
  250. #address-cells = <1>;
  251. #size-cells = <1>;
  252. qcadata@0 {
  253. label = "qcadata";
  254. reg = <0x0000000 0x0c80000>;
  255. read-only;
  256. };
  257. APPSBL@c80000 {
  258. label = "APPSBL";
  259. reg = <0x0c80000 0x0500000>;
  260. read-only;
  261. };
  262. APPSBLENV@1180000 {
  263. label = "APPSBLENV";
  264. reg = <0x1180000 0x0080000>;
  265. read-only;
  266. };
  267. art: art@1200000 {
  268. label = "art";
  269. reg = <0x1200000 0x0140000>;
  270. read-only;
  271. };
  272. artbak: art@1340000 {
  273. label = "artbak";
  274. reg = <0x1340000 0x0140000>;
  275. read-only;
  276. };
  277. kernel@1480000 {
  278. label = "kernel";
  279. reg = <0x1480000 0x0400000>;
  280. };
  281. ubi@1880000 {
  282. label = "ubi";
  283. reg = <0x1880000 0x6080000>;
  284. };
  285. reserve@7900000 {
  286. label = "reserve";
  287. reg = <0x7900000 0x0700000>;
  288. read-only;
  289. };
  290. };
  291. };
  292. };
  293. mdio0: mdio {
  294. compatible = "virtual,mdio-gpio";
  295. #address-cells = <1>;
  296. #size-cells = <0>;
  297. gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
  298. <&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
  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 0xaa545 /* MAC_POWER_SEL */
  308. 0x000e0 0xc74164de /* SGMII_CTRL */
  309. 0x0007c 0x4e /* PORT0_STATUS */
  310. 0x00094 0x4e /* PORT6_STATUS */
  311. 0x00970 0x1e864443 /* QM_PORT0_CTRL0 */
  312. 0x00974 0x000001c6 /* QM_PORT0_CTRL1 */
  313. 0x00978 0x19008643 /* QM_PORT1_CTRL0 */
  314. 0x0097c 0x000001c6 /* QM_PORT1_CTRL1 */
  315. 0x00980 0x19008643 /* QM_PORT2_CTRL0 */
  316. 0x00984 0x000001c6 /* QM_PORT2_CTRL1 */
  317. 0x00988 0x19008643 /* QM_PORT3_CTRL0 */
  318. 0x0098c 0x000001c6 /* QM_PORT3_CTRL1 */
  319. 0x00990 0x19008643 /* QM_PORT4_CTRL0 */
  320. 0x00994 0x000001c6 /* QM_PORT4_CTRL1 */
  321. 0x00998 0x1e864443 /* QM_PORT5_CTRL0 */
  322. 0x0099c 0x000001c6 /* QM_PORT5_CTRL1 */
  323. 0x009a0 0x1e864443 /* QM_PORT6_CTRL0 */
  324. 0x009a4 0x000001c6 /* QM_PORT6_CTRL1 */
  325. >;
  326. qca,ar8327-vlans = <
  327. 0x1 0x5e /* VLAN1 Ports 1/2/3/4/6 */
  328. 0x2 0x21 /* VLAN2 Ports 0/5 */
  329. >;
  330. };
  331. phy4: ethernet-phy@4 {
  332. reg = <4>;
  333. qca,ar8327-initvals = <
  334. 0x000e4 0x6a545 /* MAC_POWER_SEL */
  335. 0x0000c 0x80 /* PAD6_MODE */
  336. >;
  337. };
  338. };
  339. gmac1: ethernet@37200000 {
  340. status = "okay";
  341. phy-mode = "rgmii";
  342. qcom,id = <1>;
  343. qcom,phy_mdio_addr = <4>;
  344. qcom,poll_required = <0>;
  345. qcom,rgmii_delay = <1>;
  346. qcom,phy_mii_type = <0>;
  347. qcom,emulation = <0>;
  348. qcom,irq = <255>;
  349. mdiobus = <&mdio0>;
  350. pinctrl-0 = <&rgmii2_pins>;
  351. pinctrl-names = "default";
  352. mtd-mac-address = <&art 6>;
  353. fixed-link {
  354. speed = <1000>;
  355. full-duplex;
  356. };
  357. };
  358. gmac2: ethernet@37400000 {
  359. status = "okay";
  360. phy-mode = "sgmii";
  361. qcom,id = <2>;
  362. qcom,phy_mdio_addr = <0>; /* none */
  363. qcom,poll_required = <0>; /* no polling */
  364. qcom,rgmii_delay = <0>;
  365. qcom,phy_mii_type = <1>;
  366. qcom,emulation = <0>;
  367. qcom,irq = <258>;
  368. mdiobus = <&mdio0>;
  369. mtd-mac-address = <&art 0>;
  370. fixed-link {
  371. speed = <1000>;
  372. full-duplex;
  373. };
  374. };
  375. };
  376. keys {
  377. compatible = "gpio-keys";
  378. pinctrl-0 = <&button_pins>;
  379. pinctrl-names = "default";
  380. wifi {
  381. label = "wifi";
  382. gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
  383. linux,code = <KEY_RFKILL>;
  384. debounce-interval = <60>;
  385. wakeup-source;
  386. };
  387. reset {
  388. label = "reset";
  389. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  390. linux,code = <KEY_RESTART>;
  391. debounce-interval = <60>;
  392. wakeup-source;
  393. };
  394. wps {
  395. label = "wps";
  396. gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
  397. linux,code = <KEY_WPS_BUTTON>;
  398. debounce-interval = <60>;
  399. wakeup-source;
  400. };
  401. };
  402. leds {
  403. compatible = "gpio-leds";
  404. pinctrl-0 = <&led_pins>;
  405. pinctrl-names = "default";
  406. power_white: power_white {
  407. label = "r7800:white:power";
  408. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
  409. default-state = "keep";
  410. };
  411. power_amber: power_amber {
  412. label = "r7800:amber:power";
  413. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  414. };
  415. wan_white {
  416. label = "r7800:white:wan";
  417. gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
  418. };
  419. wan_amber {
  420. label = "r7800:amber:wan";
  421. gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
  422. };
  423. usb1 {
  424. label = "r7800:white:usb1";
  425. gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
  426. };
  427. usb2 {
  428. label = "r7800:white:usb2";
  429. gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
  430. };
  431. esata {
  432. label = "r7800:white:esata";
  433. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
  434. };
  435. wifi {
  436. label = "r7800:white:wifi";
  437. gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
  438. };
  439. wps {
  440. label = "r7800:white:wps";
  441. gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
  442. };
  443. };
  444. };
  445. &adm_dma {
  446. status = "okay";
  447. };