WR1200JS.dts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /dts-v1/;
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "youhua,wr1200js", "mediatek,mt7621-soc";
  7. model = "YouHua WR1200JS";
  8. aliases {
  9. led-boot = &led_wps;
  10. led-failsafe = &led_wps;
  11. };
  12. memory@0 {
  13. device_type = "memory";
  14. reg = <0x0 0x8000000>;
  15. };
  16. chosen {
  17. bootargs = "console=ttyS0,115200";
  18. };
  19. gpio-leds {
  20. compatible = "gpio-leds";
  21. internet {
  22. label = "wr1200js:blue:internet";
  23. gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
  24. };
  25. led_wps: wps {
  26. label = "wr1200js:blue:wps";
  27. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  28. };
  29. usb {
  30. label = "wr1200js:blue:usb";
  31. gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
  32. trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
  33. linux,default-trigger = "usbport";
  34. };
  35. };
  36. gpio-keys-polled {
  37. compatible = "gpio-keys-polled";
  38. poll-interval = <20>;
  39. reset {
  40. label = "reset";
  41. gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
  42. linux,code = <KEY_RESTART>;
  43. };
  44. wps {
  45. label = "wps";
  46. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  47. linux,code = <KEY_WPS_BUTTON>;
  48. };
  49. wifi {
  50. label = "wifi";
  51. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  52. linux,code = <KEY_RFKILL>;
  53. };
  54. };
  55. };
  56. &spi0 {
  57. status = "okay";
  58. m25p80@0 {
  59. compatible = "jedec,spi-nor";
  60. reg = <0>;
  61. spi-max-frequency = <10000000>;
  62. m25p,chunked-io = <32>;
  63. partitions {
  64. compatible = "fixed-partitions";
  65. #address-cells = <1>;
  66. #size-cells = <1>;
  67. partition@0 {
  68. label = "u-boot";
  69. reg = <0x0 0x30000>;
  70. read-only;
  71. };
  72. partition@30000 {
  73. label = "u-boot-env";
  74. reg = <0x30000 0x10000>;
  75. read-only;
  76. };
  77. factory: partition@40000 {
  78. label = "factory";
  79. reg = <0x40000 0x10000>;
  80. read-only;
  81. };
  82. partition@50000 {
  83. label = "firmware";
  84. reg = <0x50000 0xfb0000>;
  85. };
  86. };
  87. };
  88. };
  89. &pcie {
  90. status = "okay";
  91. };
  92. &pcie0 {
  93. mt76@0,0 {
  94. reg = <0x0000 0 0 0 0>;
  95. mediatek,mtd-eeprom = <&factory 0x0000>;
  96. };
  97. };
  98. &pcie1 {
  99. mt76@0,0 {
  100. reg = <0x0000 0 0 0 0>;
  101. mediatek,mtd-eeprom = <&factory 0x8000>;
  102. ieee80211-freq-limit = <5000000 6000000>;
  103. led {
  104. led-sources = <2>;
  105. led-active-low;
  106. };
  107. };
  108. };
  109. &ethernet {
  110. mtd-mac-address = <&factory 0xe000>;
  111. };
  112. &pinctrl {
  113. state_default: pinctrl0 {
  114. gpio {
  115. ralink,group = "i2c", "uart2", "uart3", "wdt";
  116. ralink,function = "gpio";
  117. };
  118. };
  119. };