GL-MT300A.dts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. / {
  5. compatible = "GL-MT300A", "ralink,mt7620a-soc";
  6. model = "GL-MT300A";
  7. chosen {
  8. bootargs = "console=ttyS0,115200";
  9. };
  10. gpio-leds {
  11. compatible = "gpio-leds";
  12. wan {
  13. label = "gl-mt300a:wan";
  14. gpios = <&gpio2 0 1>;
  15. };
  16. lan {
  17. label = "gl-mt300a:lan";
  18. gpios = <&gpio2 1 1>;
  19. };
  20. wlan {
  21. label = "gl-mt300a:wlan";
  22. gpios = <&gpio3 0 1>;
  23. };
  24. usb {
  25. label = "gl-mt300a:usb";
  26. gpios = <&gpio0 7 1>;
  27. };
  28. };
  29. gpio-keys-polled {
  30. compatible = "gpio-keys-polled";
  31. #address-cells = <1>;
  32. #size-cells = <0>;
  33. poll-interval = <20>;
  34. reset {
  35. label = "reset";
  36. gpios = <&gpio0 13 1>;
  37. linux,code = <KEY_RESTART>;
  38. };
  39. BTN_0 {
  40. label = "BTN_0";
  41. gpios = <&gpio0 1 1>;
  42. linux,code = <BTN_0>;
  43. };
  44. BTN_1 {
  45. label = "BTN_1";
  46. gpios = <&gpio0 2 1>;
  47. linux,code = <BTN_1>;
  48. };
  49. };
  50. };
  51. &gpio0 {
  52. status = "okay";
  53. };
  54. &gpio1 {
  55. status = "okay";
  56. };
  57. &gpio2 {
  58. status = "okay";
  59. };
  60. &gpio3 {
  61. status = "okay";
  62. };
  63. &spi0 {
  64. status = "okay";
  65. m25p80@0 {
  66. #address-cells = <1>;
  67. #size-cells = <1>;
  68. compatible = "w25q128";
  69. reg = <0>;
  70. linux,modalias = "m25p80", "w25q128";
  71. spi-max-frequency = <10000000>;
  72. partition@0 {
  73. label = "u-boot";
  74. reg = <0x0 0x30000>;
  75. };
  76. partition@30000 {
  77. label = "u-boot-env";
  78. reg = <0x30000 0x10000>;
  79. read-only;
  80. };
  81. factory: partition@40000 {
  82. label = "factory";
  83. reg = <0x40000 0x10000>;
  84. read-only;
  85. };
  86. partition@50000 {
  87. label = "firmware";
  88. reg = <0x50000 0xf80000>;
  89. };
  90. partition@ff0000 {
  91. label = "art";
  92. reg = <0xff0000 0x10000>;
  93. };
  94. };
  95. };
  96. &sdhci {
  97. status = "okay";
  98. };
  99. &ehci {
  100. status = "okay";
  101. };
  102. &ohci {
  103. status = "okay";
  104. };
  105. &ethernet {
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&ephy_pins>;
  108. mtd-mac-address = <&factory 0x4000>;
  109. ralink,port-map = "wllll";
  110. };
  111. &wmac {
  112. ralink,mtd-eeprom = <&factory 0>;
  113. };
  114. &pcie {
  115. status = "okay";
  116. pcie-bridge {
  117. mt76@0,0 {
  118. reg = <0x0000 0 0 0 0>;
  119. device_type = "pci";
  120. mediatek,mtd-eeprom = <&factory 0x8000>;
  121. mediatek,2ghz = <0>;
  122. };
  123. };
  124. };
  125. &pinctrl {
  126. state_default: pinctrl0 {
  127. gpio {
  128. ralink,group = "wled","ephy","uartf","i2c";
  129. ralink,function = "gpio";
  130. };
  131. };
  132. };