Advertisement
Guest User

r7800 dts

a guest
Jun 19th, 2019
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.91 KB | None | 0 0
  1. #include "qcom-ipq8065.dtsi"
  2.  
  3. #include <dt-bindings/input/input.h>
  4.  
  5. / {
  6. model = "Netgear Nighthawk X4S R7800";
  7. compatible = "netgear,r7800";
  8.  
  9. memory@0 {
  10. reg = <0x42000000 0x1e000000>;
  11. device_type = "memory";
  12. };
  13.  
  14. reserved-memory {
  15. #address-cells = <1>;
  16. #size-cells = <1>;
  17. ranges;
  18. rsvd@41200000 {
  19. reg = <0x41200000 0x300000>;
  20. no-map;
  21. };
  22.  
  23. rsvd@5fe00000 {
  24. reg = <0x5fe00000 0x200000>;
  25. reusable;
  26. };
  27. };
  28.  
  29. aliases {
  30. serial0 = &gsbi4_serial;
  31. mdio-gpio0 = &mdio0;
  32.  
  33. led-boot = &power_white;
  34. led-failsafe = &power_amber;
  35. led-running = &power_white;
  36. led-upgrade = &power_amber;
  37. };
  38.  
  39. chosen {
  40. stdout-path = "serial0:115200n8";
  41. };
  42.  
  43. soc {
  44. pinmux@800000 {
  45. button_pins: button_pins {
  46. mux {
  47. pins = "gpio6", "gpio54", "gpio65";
  48. function = "gpio";
  49. drive-strength = <2>;
  50. bias-pull-up;
  51. };
  52. };
  53.  
  54. i2c4_pins: i2c4_pinmux {
  55. mux {
  56. pins = "gpio12", "gpio13";
  57. function = "gsbi4";
  58. drive-strength = <12>;
  59. bias-disable;
  60. };
  61. };
  62.  
  63. led_pins: led_pins {
  64. pins = "gpio7", "gpio8", "gpio9", "gpio22", "gpio23",
  65. "gpio24","gpio26", "gpio53", "gpio64";
  66. function = "gpio";
  67. drive-strength = <2>;
  68. bias-pull-down;
  69. };
  70.  
  71. nand_pins: nand_pins {
  72. mux {
  73. pins = "gpio34", "gpio35", "gpio36",
  74. "gpio37", "gpio38", "gpio39",
  75. "gpio40", "gpio41", "gpio42",
  76. "gpio43", "gpio44", "gpio45",
  77. "gpio46", "gpio47";
  78. function = "nand";
  79. drive-strength = <10>;
  80. bias-disable;
  81. };
  82. pullups {
  83. pins = "gpio39";
  84. bias-pull-up;
  85. };
  86. hold {
  87. pins = "gpio40", "gpio41", "gpio42",
  88. "gpio43", "gpio44", "gpio45",
  89. "gpio46", "gpio47";
  90. bias-bus-hold;
  91. };
  92. };
  93.  
  94. mdio0_pins: mdio0_pins {
  95. mux {
  96. pins = "gpio0", "gpio1";
  97. function = "mdio";
  98. drive-strength = <8>;
  99. bias-disable;
  100. };
  101.  
  102. clk {
  103. pins = "gpio1";
  104. input-disable;
  105. };
  106. };
  107.  
  108. rgmii2_pins: rgmii2_pins {
  109. mux {
  110. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
  111. "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ;
  112. function = "rgmii2";
  113. drive-strength = <8>;
  114. bias-disable;
  115. };
  116.  
  117. tx {
  118. pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32" ;
  119. input-disable;
  120. };
  121. };
  122.  
  123. spi_pins: spi_pins {
  124. mux {
  125. pins = "gpio18", "gpio19", "gpio21";
  126. function = "gsbi5";
  127. bias-pull-down;
  128. };
  129.  
  130. data {
  131. pins = "gpio18", "gpio19";
  132. drive-strength = <10>;
  133. };
  134.  
  135. cs {
  136. pins = "gpio20";
  137. drive-strength = <10>;
  138. bias-pull-up;
  139. };
  140.  
  141. clk {
  142. pins = "gpio21";
  143. drive-strength = <12>;
  144. };
  145. };
  146.  
  147. spi6_pins: spi6_pins {
  148. mux {
  149. pins = "gpio55", "gpio56", "gpio58";
  150. function = "gsbi6";
  151. bias-pull-down;
  152. };
  153.  
  154. mosi {
  155. pins = "gpio55";
  156. drive-strength = <12>;
  157. };
  158.  
  159. miso {
  160. pins = "gpio56";
  161. drive-strength = <14>;
  162. };
  163.  
  164. cs {
  165. pins = "gpio57";
  166. drive-strength = <12>;
  167. bias-pull-up;
  168. };
  169.  
  170. clk {
  171. pins = "gpio58";
  172. drive-strength = <12>;
  173. };
  174.  
  175. reset {
  176. pins = "gpio33";
  177. drive-strength = <10>;
  178. bias-pull-down;
  179. output-high;
  180. };
  181. };
  182.  
  183. usb0_pwr_en_pins: usb0_pwr_en_pins {
  184. mux {
  185. pins = "gpio15";
  186. function = "gpio";
  187. drive-strength = <12>;
  188. bias-pull-down;
  189. output-high;
  190. };
  191. };
  192.  
  193. usb1_pwr_en_pins: usb1_pwr_en_pins {
  194. mux {
  195. pins = "gpio16", "gpio68";
  196. function = "gpio";
  197. drive-strength = <12>;
  198. bias-pull-down;
  199. output-high;
  200. };
  201. };
  202. };
  203.  
  204. gsbi@16300000 {
  205. qcom,mode = <GSBI_PROT_I2C_UART>;
  206. status = "okay";
  207. serial@16340000 {
  208. status = "okay";
  209. };
  210. /*
  211. * The i2c device on gsbi4 should not be enabled.
  212. * On ipq806x designs gsbi4 i2c is meant for exclusive
  213. * RPM usage. Turning this on in kernel manifests as
  214. * i2c failure for the RPM.
  215. */
  216. };
  217.  
  218. sata-phy@1b400000 {
  219. status = "okay";
  220. };
  221.  
  222. sata@29000000 {
  223. ports-implemented = <0x1>;
  224. status = "okay";
  225. };
  226.  
  227. usb3_0: usb3@110f8800 {
  228. status = "okay";
  229.  
  230. pinctrl-0 = <&usb0_pwr_en_pins>;
  231. pinctrl-names = "default";
  232. };
  233.  
  234. usb3_1: usb3@100f8800 {
  235. status = "okay";
  236.  
  237. pinctrl-0 = <&usb1_pwr_en_pins>;
  238. pinctrl-names = "default";
  239. };
  240.  
  241. pcie0: pci@1b500000 {
  242. status = "okay";
  243.  
  244. bridge@0,0 {
  245. reg = <0x00000000 0 0 0 0>;
  246. #address-cells = <3>;
  247. #size-cells = <2>;
  248. ranges;
  249.  
  250. wifi@1,0 {
  251. compatible = "pci168c,0046";
  252. reg = <0x00010000 0 0 0 0>;
  253.  
  254. mtd-mac-address = <&art 6>;
  255. mtd-mac-address-increment = <(1)>;
  256. };
  257. };
  258. };
  259.  
  260. pcie1: pci@1b700000 {
  261. status = "okay";
  262. force_gen1 = <1>;
  263.  
  264. bridge@0,0 {
  265. reg = <0x00000000 0 0 0 0>;
  266. #address-cells = <3>;
  267. #size-cells = <2>;
  268. ranges;
  269.  
  270. wifi@1,0 {
  271. compatible = "pci168c,0046";
  272. reg = <0x00010000 0 0 0 0>;
  273.  
  274. mtd-mac-address = <&art 6>;
  275. mtd-mac-address-increment = <(2)>;
  276. };
  277. };
  278. };
  279.  
  280. nand@1ac00000 {
  281. status = "okay";
  282.  
  283. pinctrl-0 = <&nand_pins>;
  284. pinctrl-names = "default";
  285.  
  286. cs0 {
  287. reg = <0>;
  288. compatible = "qcom,nandcs";
  289.  
  290. nand-ecc-strength = <4>;
  291. nand-bus-width = <8>;
  292. nand-ecc-step-size = <512>;
  293.  
  294. partitions {
  295. compatible = "fixed-partitions";
  296. #address-cells = <1>;
  297. #size-cells = <1>;
  298.  
  299. qcadata@0 {
  300. label = "qcadata";
  301. reg = <0x0000000 0x0c80000>;
  302. read-only;
  303. };
  304.  
  305. APPSBL@c80000 {
  306. label = "APPSBL";
  307. reg = <0x0c80000 0x0500000>;
  308. read-only;
  309. };
  310.  
  311. APPSBLENV@1180000 {
  312. label = "APPSBLENV";
  313. reg = <0x1180000 0x0080000>;
  314. read-only;
  315. };
  316.  
  317. art: art@1200000 {
  318. label = "art";
  319. reg = <0x1200000 0x0140000>;
  320. read-only;
  321. };
  322.  
  323. artbak: art@1340000 {
  324. label = "artbak";
  325. reg = <0x1340000 0x0140000>;
  326. read-only;
  327. };
  328.  
  329. kernel@1480000 {
  330. label = "kernel";
  331. reg = <0x1480000 0x0400000>;
  332. };
  333.  
  334. ubi@1880000 {
  335. label = "ubi";
  336. reg = <0x1880000 0x6080000>;
  337. };
  338.  
  339. reserve@7900000 {
  340. label = "reserve";
  341. reg = <0x7900000 0x0700000>;
  342. read-only;
  343. };
  344. };
  345. };
  346. };
  347.  
  348. mdio0: mdio@37000000 {
  349. #address-cells = <1>;
  350. #size-cells = <0>;
  351.  
  352. compatible = "qcom,ipq8064-mdio", "syscon";
  353. reg = <0x37000000 0x200000>;
  354. resets = <&gcc GMAC_CORE1_RESET>;
  355. reset-names = "stmmaceth";
  356. clocks = <&gcc GMAC_CORE1_CLK>;
  357. clock-names = "stmmaceth";
  358.  
  359. pinctrl-0 = <&mdio0_pins>;
  360. pinctrl-names = "default";
  361.  
  362. phy_port1: ethernet-phy@0 {
  363. reg = <0>;
  364. };
  365.  
  366. phy_port2: ethernet-phy@1 {
  367. reg = <1>;
  368. };
  369.  
  370. phy_port3: ethernet-phy@2 {
  371. reg = <2>;
  372. };
  373.  
  374. phy_port4: ethernet-phy@3 {
  375. reg = <3>;
  376. };
  377.  
  378. phy_port5: ethernet-phy@4 {
  379. reg = <4>;
  380. };
  381.  
  382. switch@10 {
  383. compatible = "qca,qca8337";
  384. #address-cells = <1>;
  385. #size-cells = <0>;
  386. reg = <0x10>;
  387.  
  388. ports {
  389. #address-cells = <1>;
  390. #size-cells = <0>;
  391.  
  392. port@0 {
  393. reg = <0>;
  394. label = "cpu";
  395. ethernet = <&gmac1>;
  396. phy-mode = "rgmii";
  397.  
  398. fixed-link {
  399. speed = <1000>;
  400. full-duplex;
  401. pause;
  402. asym-pause;
  403. };
  404. };
  405.  
  406. port@1 {
  407. reg = <1>;
  408. label = "lan1";
  409. phy-handle = <&phy_port1>;
  410. };
  411.  
  412. port@2 {
  413. reg = <2>;
  414. label = "lan2";
  415. phy-handle = <&phy_port2>;
  416. };
  417.  
  418. port@3 {
  419. reg = <3>;
  420. label = "lan3";
  421. phy-handle = <&phy_port3>;
  422. };
  423.  
  424. port@4 {
  425. reg = <4>;
  426. label = "lan4";
  427. phy-handle = <&phy_port4>;
  428. };
  429.  
  430. port@5 {
  431. reg = <5>;
  432. label = "wan";
  433. phy-handle = <&phy_port5>;
  434. };
  435.  
  436. /*
  437. port@6 {
  438. reg = <0>;
  439. label = "cpu";
  440. ethernet = <&gmac2>;
  441. phy-mode = "rgmii";
  442.  
  443. fixed-link {
  444. speed = <1000>;
  445. full-duplex;
  446. pause;
  447. asym-pause;
  448. };
  449. };
  450. */
  451. };
  452. };
  453. };
  454.  
  455. gmac1: ethernet@37200000 {
  456. status = "okay";
  457. phy-mode = "rgmii";
  458. qcom,id = <1>;
  459. qcom,phy_mdio_addr = <4>;
  460. qcom,poll_required = <0>;
  461. qcom,rgmii_delay = <1>;
  462. qcom,phy_mii_type = <0>;
  463. qcom,emulation = <0>;
  464. qcom,irq = <255>;
  465. mdiobus = <&mdio0>;
  466.  
  467. pinctrl-0 = <&rgmii2_pins>;
  468. pinctrl-names = "default";
  469.  
  470. mtd-mac-address = <&art 6>;
  471.  
  472. fixed-link {
  473. speed = <1000>;
  474. full-duplex;
  475. pause;
  476. asym-pause;
  477. };
  478. };
  479.  
  480. gmac2: ethernet@37400000 {
  481. status = "okay";
  482. phy-mode = "sgmii";
  483. qcom,id = <2>;
  484. qcom,phy_mdio_addr = <0>; /* none */
  485. qcom,poll_required = <0>; /* no polling */
  486. qcom,rgmii_delay = <0>;
  487. qcom,phy_mii_type = <1>;
  488. qcom,emulation = <0>;
  489. qcom,irq = <258>;
  490. mdiobus = <&mdio0>;
  491.  
  492. mtd-mac-address = <&art 0>;
  493.  
  494. fixed-link {
  495. speed = <1000>;
  496. full-duplex;
  497. pause;
  498. asym-pause;
  499. };
  500. };
  501. };
  502.  
  503. keys {
  504. compatible = "gpio-keys";
  505. pinctrl-0 = <&button_pins>;
  506. pinctrl-names = "default";
  507.  
  508. wifi {
  509. label = "wifi";
  510. gpios = <&qcom_pinmux 6 GPIO_ACTIVE_LOW>;
  511. linux,code = <KEY_RFKILL>;
  512. debounce-interval = <60>;
  513. wakeup-source;
  514. };
  515.  
  516. reset {
  517. label = "reset";
  518. gpios = <&qcom_pinmux 54 GPIO_ACTIVE_LOW>;
  519. linux,code = <KEY_RESTART>;
  520. debounce-interval = <60>;
  521. wakeup-source;
  522. };
  523.  
  524. wps {
  525. label = "wps";
  526. gpios = <&qcom_pinmux 65 GPIO_ACTIVE_LOW>;
  527. linux,code = <KEY_WPS_BUTTON>;
  528. debounce-interval = <60>;
  529. wakeup-source;
  530. };
  531. };
  532.  
  533. leds {
  534. compatible = "gpio-leds";
  535. pinctrl-0 = <&led_pins>;
  536. pinctrl-names = "default";
  537.  
  538. power_white: power_white {
  539. label = "r7800:white:power";
  540. gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
  541. default-state = "keep";
  542. };
  543.  
  544. power_amber: power_amber {
  545. label = "r7800:amber:power";
  546. gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
  547. };
  548.  
  549. wan_white {
  550. label = "r7800:white:wan";
  551. gpios = <&qcom_pinmux 22 GPIO_ACTIVE_HIGH>;
  552. };
  553.  
  554. wan_amber {
  555. label = "r7800:amber:wan";
  556. gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
  557. };
  558.  
  559. usb1 {
  560. label = "r7800:white:usb1";
  561. gpios = <&qcom_pinmux 7 GPIO_ACTIVE_HIGH>;
  562. };
  563.  
  564. usb2 {
  565. label = "r7800:white:usb2";
  566. gpios = <&qcom_pinmux 8 GPIO_ACTIVE_HIGH>;
  567. };
  568.  
  569. esata {
  570. label = "r7800:white:esata";
  571. gpios = <&qcom_pinmux 26 GPIO_ACTIVE_HIGH>;
  572. };
  573.  
  574. wifi {
  575. label = "r7800:white:wifi";
  576. gpios = <&qcom_pinmux 64 GPIO_ACTIVE_HIGH>;
  577. };
  578.  
  579. wps {
  580. label = "r7800:white:wps";
  581. gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
  582. };
  583. };
  584. };
  585.  
  586. &adm_dma {
  587. status = "okay";
  588. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement