DWR-118-A2.dts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "dlink,dwr-118-a2", "ralink,mt7620a-soc";
  7. model = "D-Link DWR-118 A2";
  8. aliases {
  9. led-boot = &led_internet;
  10. led-failsafe = &led_internet;
  11. };
  12. gpio-keys-polled {
  13. compatible = "gpio-keys-polled";
  14. poll-interval = <20>;
  15. wps {
  16. label = "wps";
  17. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  18. linux,code = <KEY_WPS_BUTTON>;
  19. };
  20. reset {
  21. label = "reset";
  22. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  23. linux,code = <KEY_RESTART>;
  24. };
  25. };
  26. gpio-leds {
  27. compatible = "gpio-leds";
  28. wan {
  29. label = "dwr-118-a2:green:wan";
  30. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  31. };
  32. led_internet: internet {
  33. label = "dwr-118-a2:green:internet";
  34. gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
  35. };
  36. lan {
  37. label = "dwr-118-a2:green:lan";
  38. gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
  39. };
  40. wlan2g {
  41. label = "dwr-118-a2:green:wlan2g";
  42. gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
  43. };
  44. usb {
  45. label = "dwr-118-a2:green:usb";
  46. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  47. trigger-sources = <&ohci_port1>, <&ehci_port1>;
  48. linux,default-trigger = "usbport";
  49. };
  50. };
  51. gpio_export {
  52. compatible = "gpio-export";
  53. #size-cells = <0>;
  54. usb {
  55. gpio-export,name = "usb";
  56. gpio-export,output = <1>;
  57. gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
  58. };
  59. };
  60. };
  61. &gpio1 {
  62. status = "okay";
  63. };
  64. &gpio2 {
  65. status = "okay";
  66. };
  67. &gpio3 {
  68. status = "okay";
  69. };
  70. &spi0 {
  71. status = "okay";
  72. flash@0 {
  73. compatible = "jedec,spi-nor";
  74. reg = <0>;
  75. spi-max-frequency = <50000000>;
  76. partitions {
  77. compatible = "fixed-partitions";
  78. #address-cells = <1>;
  79. #size-cells = <1>;
  80. partition@0 {
  81. label = "jboot";
  82. reg = <0x0 0x10000>;
  83. read-only;
  84. };
  85. partition@10000 {
  86. label = "firmware";
  87. reg = <0x10000 0xfe0000>;
  88. };
  89. config: partition@ff0000 {
  90. label = "config";
  91. reg = <0xff0000 0x10000>;
  92. read-only;
  93. };
  94. };
  95. };
  96. };
  97. &ehci {
  98. status = "okay";
  99. };
  100. &ohci {
  101. status = "okay";
  102. };
  103. &pinctrl {
  104. state_default: pinctrl0 {
  105. default {
  106. ralink,group = "ephy", "uartf", "spi refclk", "wled";
  107. ralink,function = "gpio";
  108. };
  109. };
  110. };
  111. &pcie {
  112. status = "okay";
  113. };
  114. &pcie0 {
  115. wifi@0,0 {
  116. reg = <0x0000 0 0 0 0>;
  117. ieee80211-freq-limit = <5000000 6000000>;
  118. mtd-mac-address = <&config 0xe4a8>;
  119. mtd-mac-address-increment = <(2)>;
  120. led {
  121. led-sources = <2>;
  122. led-active-low;
  123. };
  124. };
  125. };
  126. &ethernet {
  127. status = "okay";
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&rgmii1_pins &mdio_pins>;
  130. port@4 {
  131. status = "okay";
  132. phy-handle = <&phy4>;
  133. phy-mode = "rgmii";
  134. };
  135. mdio-bus {
  136. status = "okay";
  137. phy4: ethernet-phy@4 {
  138. reg = <4>;
  139. phy-mode = "rgmii";
  140. };
  141. };
  142. };
  143. &gsw {
  144. mediatek,port4 = "gmac";
  145. };