EX2700.dts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /*
  2. * Device Tree file for the Netgear EX2700
  3. *
  4. * Copyright (C) 2016 Joseph C. Lehner <joseph.c.lehner@gmail.com>
  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 = "netgear,ex2700", "ralink,mt7620a-soc";
  16. model = "Netgear EX2700";
  17. aliases {
  18. led-boot = &led_power_green;
  19. led-failsafe = &led_power_green;
  20. led-running = &led_power_green;
  21. led-upgrade = &led_power_green;
  22. };
  23. chosen {
  24. bootargs = "console=ttyS0,57600";
  25. };
  26. gpio-leds {
  27. compatible = "gpio-leds";
  28. led_power_green: power_g {
  29. label = "ex2700:green:power";
  30. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  31. default-state = "on";
  32. };
  33. power_r {
  34. label = "ex2700:red:power";
  35. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  36. };
  37. device_g {
  38. label = "ex2700:green:device";
  39. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  40. };
  41. device_r {
  42. label = "ex2700:red:device";
  43. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  44. };
  45. router_g {
  46. label = "ex2700:green:router";
  47. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  48. };
  49. router_r {
  50. label = "ex2700:red:router";
  51. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  52. };
  53. wps {
  54. label = "ex2700:green:wps";
  55. gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
  56. };
  57. };
  58. gpio-keys-polled {
  59. compatible = "gpio-keys-polled";
  60. poll-interval = <20>;
  61. reset {
  62. label = "reset";
  63. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  64. linux,code = <KEY_RESTART>;
  65. };
  66. wps {
  67. label = "wps";
  68. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  69. linux,code = <KEY_WPS_BUTTON>;
  70. };
  71. };
  72. };
  73. &gpio0 {
  74. status = "okay";
  75. };
  76. &gpio1 {
  77. status = "okay";
  78. };
  79. &spi0 {
  80. status = "okay";
  81. m25p80@0 {
  82. compatible = "jedec,spi-nor";
  83. reg = <0>;
  84. spi-max-frequency = <10000000>;
  85. partitions {
  86. compatible = "fixed-partitions";
  87. #address-cells = <1>;
  88. #size-cells = <1>;
  89. partition@0 {
  90. label = "u-boot";
  91. reg = <0x0 0x30000>;
  92. read-only;
  93. };
  94. partition@30000 {
  95. label = "u-boot-env";
  96. reg = <0x30000 0x10000>;
  97. read-only;
  98. };
  99. partition@40000 {
  100. label = "firmware";
  101. reg = <0x40000 0x3b0000>;
  102. };
  103. art: partition@3f0000 {
  104. label = "art";
  105. reg = <0x3f0000 0x10000>;
  106. read-only;
  107. };
  108. };
  109. };
  110. };
  111. &ethernet {
  112. mtd-mac-address = <&art 0x0>;
  113. };
  114. &wmac {
  115. mtd-mac-address = <&art 0x6>;
  116. ralink,mtd-eeprom = <&art 0x1000>;
  117. };
  118. &pinctrl {
  119. state_default: pinctrl0 {
  120. default {
  121. ralink,group = "i2c", "uartf", "spi refclk";
  122. ralink,function = "gpio";
  123. };
  124. };
  125. };