WHR-G300N.dts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /dts-v1/;
  2. #include "rt3050.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "buffalo,whr-g300n", "ralink,rt3052-soc";
  7. model = "Buffalo WHR-G300N";
  8. aliases {
  9. led-boot = &led_router;
  10. led-failsafe = &led_router;
  11. led-running = &led_router;
  12. led-upgrade = &led_router;
  13. };
  14. cfi@1f000000 {
  15. compatible = "cfi-flash";
  16. reg = <0x1f000000 0x800000>;
  17. bank-width = <2>;
  18. device-width = <2>;
  19. partitions {
  20. compatible = "fixed-partitions";
  21. #address-cells = <1>;
  22. #size-cells = <1>;
  23. partition@0 {
  24. label = "u-boot";
  25. reg = <0x0 0x30000>;
  26. read-only;
  27. };
  28. partition@30000 {
  29. label = "u-boot-env";
  30. reg = <0x30000 0x10000>;
  31. read-only;
  32. };
  33. factory: partition@40000 {
  34. label = "factory";
  35. reg = <0x40000 0x10000>;
  36. read-only;
  37. };
  38. partition@50000 {
  39. label = "firmware";
  40. reg = <0x50000 0x3a0000>;
  41. };
  42. partition@3f0000 {
  43. label = "user";
  44. reg = <0x3f0000 0x10000>;
  45. read-only;
  46. };
  47. };
  48. };
  49. gpio-leds {
  50. compatible = "gpio-leds";
  51. diag {
  52. label = "whr-g300n:red:diag";
  53. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  54. };
  55. led_router: router {
  56. label = "whr-g300n:green:router";
  57. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  58. };
  59. security {
  60. label = "whr-g300n:amber:security";
  61. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  62. };
  63. };
  64. gpio-keys-polled {
  65. compatible = "gpio-keys-polled";
  66. poll-interval = <20>;
  67. reset {
  68. label = "reset";
  69. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  70. linux,code = <KEY_RESTART>;
  71. };
  72. aoss {
  73. label = "aoss";
  74. gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  75. linux,code = <KEY_WPS_BUTTON>;
  76. };
  77. router-off {
  78. label = "router-off";
  79. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  80. linux,code = <BTN_2>;
  81. };
  82. router-on {
  83. label = "router-on";
  84. gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
  85. linux,code = <BTN_3>;
  86. };
  87. };
  88. };
  89. &pinctrl {
  90. state_default: pinctrl0 {
  91. gpio {
  92. ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
  93. ralink,function = "gpio";
  94. };
  95. };
  96. };
  97. &ethernet {
  98. mtd-mac-address = <&factory 0x4>;
  99. };
  100. &esw {
  101. mediatek,portmap = <0x2f>;
  102. };
  103. &wmac {
  104. ralink,mtd-eeprom = <&factory 0>;
  105. };