mt7621_afoundry_ew1200.dts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. #include "mt7621.dtsi"
  2. #include <dt-bindings/gpio/gpio.h>
  3. #include <dt-bindings/input/input.h>
  4. / {
  5. compatible = "afoundry,ew1200", "mediatek,mt7621-soc";
  6. model = "EW1200";
  7. aliases {
  8. led-boot = &led_run;
  9. led-failsafe = &led_run;
  10. led-running = &led_run;
  11. led-upgrade = &led_run;
  12. };
  13. keys {
  14. compatible = "gpio-keys";
  15. reset {
  16. label = "reset";
  17. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  18. linux,code = <KEY_RESTART>;
  19. };
  20. };
  21. leds {
  22. compatible = "gpio-leds";
  23. led_run: run {
  24. label = "green:run";
  25. gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
  26. };
  27. usb {
  28. label = "green:usb";
  29. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  30. trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
  31. linux,default-trigger = "usbport";
  32. };
  33. };
  34. };
  35. &sdhci {
  36. status = "okay";
  37. };
  38. &spi0 {
  39. status = "okay";
  40. flash@0 {
  41. compatible = "jedec,spi-nor";
  42. reg = <0>;
  43. spi-max-frequency = <10000000>;
  44. partitions {
  45. compatible = "fixed-partitions";
  46. #address-cells = <1>;
  47. #size-cells = <1>;
  48. partition@0 {
  49. label = "u-boot";
  50. reg = <0x0 0x30000>;
  51. read-only;
  52. };
  53. partition@30000 {
  54. label = "u-boot-env";
  55. reg = <0x30000 0x10000>;
  56. read-only;
  57. };
  58. factory: partition@40000 {
  59. label = "factory";
  60. reg = <0x40000 0x10000>;
  61. read-only;
  62. };
  63. partition@50000 {
  64. compatible = "denx,uimage";
  65. label = "firmware";
  66. reg = <0x50000 0xfb0000>;
  67. };
  68. };
  69. };
  70. };
  71. &pcie {
  72. status = "okay";
  73. };
  74. &pcie0 {
  75. mt76@0,0 {
  76. reg = <0x0000 0 0 0 0>;
  77. mediatek,mtd-eeprom = <&factory 0x8000>;
  78. ieee80211-freq-limit = <5000000 6000000>;
  79. };
  80. };
  81. &pcie1 {
  82. mt76@0,0 {
  83. reg = <0x0000 0 0 0 0>;
  84. mediatek,mtd-eeprom = <&factory 0x0000>;
  85. ieee80211-freq-limit = <2400000 2500000>;
  86. };
  87. };
  88. &gmac0 {
  89. mtd-mac-address = <&factory 0xe000>;
  90. };
  91. &switch0 {
  92. ports {
  93. port@0 {
  94. status = "okay";
  95. label = "lan1";
  96. };
  97. port@1 {
  98. status = "okay";
  99. label = "lan2";
  100. };
  101. port@2 {
  102. status = "okay";
  103. label = "lan3";
  104. };
  105. port@3 {
  106. status = "okay";
  107. label = "lan4";
  108. };
  109. port@4 {
  110. status = "okay";
  111. label = "wan";
  112. mtd-mac-address = <&factory 0xe000>;
  113. mtd-mac-address-increment = <1>;
  114. };
  115. };
  116. };
  117. &state_default {
  118. gpio {
  119. groups = "i2c", "uart3", "wdt";
  120. function = "gpio";
  121. };
  122. };