WHR-600D.dts 2.5 KB

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