1
0

WHR-300HP2.dts 2.6 KB

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