WRH-300CR.dts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /dts-v1/;
  2. #include "mt7620n.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
  7. model = "ELECOM WRH-300CR";
  8. aliases {
  9. led-boot = &led_wps;
  10. led-failsafe = &led_wps;
  11. led-running = &led_wps;
  12. led-upgrade = &led_wps;
  13. };
  14. gpio-leds {
  15. compatible = "gpio-leds";
  16. led_wps: wps {
  17. label = "wrh-300cr:green:wps";
  18. gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
  19. };
  20. ethernet {
  21. label = "wrh-300cr:green:ethernet";
  22. gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
  23. };
  24. wlan {
  25. label = "wrh-300cr:green:wlan";
  26. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  27. };
  28. };
  29. gpio-keys-polled {
  30. compatible = "gpio-keys-polled";
  31. poll-interval = <20>;
  32. reset {
  33. label = "reset";
  34. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  35. linux,code = <KEY_RESTART>;
  36. };
  37. wps {
  38. label = "wps";
  39. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  40. linux,code = <KEY_WPS_BUTTON>;
  41. };
  42. };
  43. };
  44. &gpio1 {
  45. status = "okay";
  46. };
  47. &gpio2 {
  48. status = "okay";
  49. };
  50. &gpio3 {
  51. status = "okay";
  52. };
  53. &spi0 {
  54. status = "okay";
  55. m25p80@0 {
  56. compatible = "jedec,spi-nor";
  57. reg = <0>;
  58. spi-max-frequency = <10000000>;
  59. partitions {
  60. compatible = "fixed-partitions";
  61. #address-cells = <1>;
  62. #size-cells = <1>;
  63. partition@0 {
  64. label = "u-boot";
  65. reg = <0x0 0x30000>;
  66. read-only;
  67. };
  68. partition@30000 {
  69. label = "u-boot-env";
  70. reg = <0x30000 0x10000>;
  71. };
  72. factory: partition@40000 {
  73. label = "factory";
  74. reg = <0x40000 0x10000>;
  75. read-only;
  76. };
  77. partition@50000 {
  78. label = "recover";
  79. reg = <0x50000 0x1c0000>;
  80. read-only;
  81. };
  82. partition@210000 {
  83. label = "firmware";
  84. reg = <0x210000 0xdf0000>;
  85. };
  86. };
  87. };
  88. };
  89. &ehci {
  90. status = "okay";
  91. };
  92. &ohci {
  93. status = "okay";
  94. };
  95. &ethernet {
  96. mtd-mac-address = <&factory 0x2e>;
  97. mediatek,portmap = "llllw";
  98. };
  99. &wmac {
  100. ralink,mtd-eeprom = <&factory 0>;
  101. };
  102. &pinctrl {
  103. state_default: pinctrl0 {
  104. default {
  105. ralink,group = "i2c", "ephy", "wled";
  106. ralink,function = "gpio";
  107. };
  108. };
  109. };