RT-N12-PLUS.dts 1.9 KB

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