MLWG2.dts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /dts-v1/;
  2. #include "mt7620n.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "kingston,mlwg2", "ralink,mt7620n-soc";
  7. model = "Kingston MLWG2";
  8. aliases {
  9. led-boot = &led_system;
  10. led-failsafe = &led_system;
  11. led-running = &led_system;
  12. led-upgrade = &led_system;
  13. };
  14. gpio-leds {
  15. compatible = "gpio-leds";
  16. led_system: system {
  17. label = "mlwg2:blue:system";
  18. gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
  19. };
  20. wifi {
  21. label = "mlwg2:blue:wifi";
  22. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  23. };
  24. };
  25. gpio-keys-polled {
  26. compatible = "gpio-keys-polled";
  27. poll-interval = <20>;
  28. reset {
  29. label = "reset";
  30. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  31. linux,code = <KEY_RESTART>;
  32. };
  33. system {
  34. label = "system";
  35. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  36. linux,code = <KEY_RFKILL>;
  37. };
  38. };
  39. };
  40. &gpio0 {
  41. status = "okay";
  42. };
  43. &gpio2 {
  44. status = "okay";
  45. };
  46. &gpio3 {
  47. status = "okay";
  48. };
  49. &spi0 {
  50. status = "okay";
  51. m25p80@0 {
  52. compatible = "jedec,spi-nor";
  53. reg = <0>;
  54. spi-max-frequency = <10000000>;
  55. partitions {
  56. compatible = "fixed-partitions";
  57. #address-cells = <1>;
  58. #size-cells = <1>;
  59. partition@0 {
  60. label = "u-boot";
  61. reg = <0x0 0x30000>;
  62. read-only;
  63. };
  64. partition@30000 {
  65. label = "u-boot-env";
  66. reg = <0x30000 0x10000>;
  67. read-only;
  68. };
  69. factory: partition@40000 {
  70. label = "factory";
  71. reg = <0x40000 0x10000>;
  72. read-only;
  73. };
  74. partition@50000 {
  75. label = "firmware";
  76. reg = <0x50000 0xf60000>;
  77. };
  78. partition@fb0000 {
  79. label = "user-config";
  80. reg = <0xfb0000 0x50000>;
  81. };
  82. };
  83. };
  84. };
  85. &ehci {
  86. status = "okay";
  87. };
  88. &ohci {
  89. status = "okay";
  90. };
  91. &ethernet {
  92. mtd-mac-address = <&factory 0x4>;
  93. mediatek,portmap = "wllll";
  94. };
  95. &wmac {
  96. ralink,mtd-eeprom = <&factory 0>;
  97. };
  98. &pinctrl {
  99. state_default: pinctrl0 {
  100. default {
  101. ralink,group = "i2c", "ephy", "wled";
  102. ralink,function = "gpio";
  103. };
  104. };
  105. };