GL-MT300A.dts 2.2 KB

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