2
0

WHR-300HP2.dts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. / {
  5. compatible = "ralink,mt7620a-soc";
  6. model = "Buffalo WHR-300HP2";
  7. gpio-leds {
  8. compatible = "gpio-leds";
  9. power {
  10. label = "whr-300hp2:red:power";
  11. gpios = <&gpio0 7 1>;
  12. };
  13. wifi {
  14. label = "whr-300hp2:green:wifi";
  15. gpios = <&gpio0 8 1>;
  16. };
  17. power2 {
  18. label = "whr-300hp2:green:power";
  19. gpios = <&gpio0 9 1>;
  20. };
  21. wifi2 {
  22. label = "whr-300hp2:orange:wifi";
  23. gpios = <&gpio0 10 1>;
  24. };
  25. internet {
  26. label = "whr-300hp2:green:internet";
  27. gpios = <&gpio2 17 1>;
  28. };
  29. router {
  30. label = "whr-300hp2:green:router";
  31. gpios = <&gpio2 18 1>;
  32. };
  33. router2 {
  34. label = "whr-300hp2:orange:router";
  35. gpios = <&gpio2 19 1>;
  36. };
  37. };
  38. gpio-keys-polled {
  39. compatible = "gpio-keys-polled";
  40. #address-cells = <1>;
  41. #size-cells = <0>;
  42. poll-interval = <20>;
  43. reset {
  44. label = "reset";
  45. gpios = <&gpio2 12 1>;
  46. linux,code = <KEY_RESTART>;
  47. };
  48. aoss {
  49. label = "aoss";
  50. gpios = <&gpio2 13 1>;
  51. linux,code = <KEY_WPS_BUTTON>;
  52. };
  53. ap {
  54. label = "ap";
  55. gpios = <&gpio2 14 1>;
  56. linux,code = <BTN_0>;
  57. linux,input-type = <EV_SW>;
  58. };
  59. bridge {
  60. label = "bridge";
  61. gpios = <&gpio2 15 1>;
  62. linux,code = <BTN_0>;
  63. linux,input-type = <EV_SW>;
  64. };
  65. };
  66. };
  67. &gpio2 {
  68. status = "okay";
  69. };
  70. &spi0 {
  71. status = "okay";
  72. m25p80@0 {
  73. #address-cells = <1>;
  74. #size-cells = <1>;
  75. compatible = "jedec,spi-nor";
  76. reg = <0>;
  77. spi-max-frequency = <10000000>;
  78. partition@0 {
  79. label = "u-boot";
  80. reg = <0x0 0x30000>;
  81. read-only;
  82. };
  83. partition@30000 {
  84. label = "u-boot-env";
  85. reg = <0x30000 0x10000>;
  86. read-only;
  87. };
  88. factory: partition@40000 {
  89. label = "factory";
  90. reg = <0x40000 0x10000>;
  91. read-only;
  92. };
  93. partition@50000 {
  94. label = "firmware";
  95. reg = <0x50000 0x7b0000>;
  96. };
  97. };
  98. };
  99. &pinctrl {
  100. state_default: pinctrl0 {
  101. gpio {
  102. ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd";
  103. ralink,function = "gpio";
  104. };
  105. pa {
  106. ralink,group = "pa";
  107. ralink,function = "pa";
  108. };
  109. };
  110. };
  111. &ethernet {
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&ephy_pins>;
  114. mediatek,portmap = "llllw";
  115. };
  116. &gsw {
  117. mediatek,port4 = "ephy";
  118. };
  119. &wmac {
  120. ralink,mtd-eeprom = <&factory 0>;
  121. };