E1700.dts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /*
  2. * Device Tree file for the Linksys E1700
  3. *
  4. * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. /dts-v1/;
  11. #include "mt7620a.dtsi"
  12. #include <dt-bindings/gpio/gpio.h>
  13. #include <dt-bindings/input/input.h>
  14. / {
  15. compatible = "linksys,e1700", "ralink,mt7620a-soc";
  16. model = "Linksys E1700";
  17. aliases {
  18. led-boot = &led_power;
  19. led-failsafe = &led_power;
  20. led-running = &led_power;
  21. led-upgrade = &led_power;
  22. };
  23. gpio-keys-polled {
  24. compatible = "gpio-keys-polled";
  25. poll-interval = <20>;
  26. reset {
  27. label = "reset";
  28. gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
  29. linux,code = <KEY_RESTART>;
  30. };
  31. wps {
  32. label = "wps";
  33. gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
  34. linux,code = <KEY_WPS_BUTTON>;
  35. };
  36. };
  37. gpio-leds {
  38. compatible = "gpio-leds";
  39. led_power: power {
  40. label = "e1700:green:power";
  41. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  42. };
  43. wan {
  44. label = "e1700:green:wps";
  45. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  46. };
  47. };
  48. };
  49. &spi0 {
  50. status = "okay";
  51. m25p80@0 {
  52. compatible = "jedec,spi-nor";
  53. reg = <0>;
  54. spi-max-frequency = <10000000>;
  55. partitions {
  56. compatible = "fixed-partitions";
  57. #address-cells = <1>;
  58. #size-cells = <1>;
  59. partition@0 {
  60. label = "u-boot";
  61. reg = <0x0 0x30000>;
  62. read-only;
  63. };
  64. partition@30000 {
  65. label = "config";
  66. reg = <0x30000 0x10000>;
  67. read-only;
  68. };
  69. factory: partition@40000 {
  70. label = "factory";
  71. reg = <0x40000 0x10000>;
  72. read-only;
  73. };
  74. partition@50000 {
  75. label = "firmware";
  76. reg = <0x50000 0x7b0000>;
  77. };
  78. };
  79. };
  80. };
  81. &pinctrl {
  82. state_default: pinctrl0 {
  83. gpio {
  84. ralink,group = "i2c", "uartf";
  85. ralink,function = "gpio";
  86. };
  87. };
  88. };
  89. &ethernet {
  90. status = "okay";
  91. mtd-mac-address = <&factory 0x28>;
  92. pinctrl-names = "default";
  93. pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
  94. port@5 {
  95. status = "okay";
  96. mediatek,fixed-link = <1000 1 1 1>;
  97. phy-mode = "rgmii";
  98. };
  99. mdio-bus {
  100. status = "okay";
  101. phy0: ethernet-phy@0 {
  102. reg = <0>;
  103. phy-mode = "rgmii";
  104. };
  105. phy1: ethernet-phy@1 {
  106. reg = <1>;
  107. phy-mode = "rgmii";
  108. };
  109. phy2: ethernet-phy@2 {
  110. reg = <2>;
  111. phy-mode = "rgmii";
  112. };
  113. phy3: ethernet-phy@3 {
  114. reg = <3>;
  115. phy-mode = "rgmii";
  116. };
  117. phy4: ethernet-phy@4 {
  118. reg = <4>;
  119. phy-mode = "rgmii";
  120. };
  121. phy1f: ethernet-phy@1f {
  122. reg = <0x1f>;
  123. phy-mode = "rgmii";
  124. };
  125. };
  126. };
  127. &gsw {
  128. mediatek,port4 = "gmac";
  129. };
  130. &wmac {
  131. ralink,mtd-eeprom = <&factory 0>;
  132. };