GL-MT300N.dts 2.0 KB

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