W502U.dts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /dts-v1/;
  2. #include "rt3050.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "alfanetworks,w502u", "ralink,rt3052-soc";
  7. model = "ALFA Networks W502U";
  8. aliases {
  9. led-boot = &led_wps;
  10. led-failsafe = &led_wps;
  11. led-running = &led_wps;
  12. led-upgrade = &led_wps;
  13. };
  14. chosen {
  15. bootargs = "console=ttyS0,115200";
  16. };
  17. cfi@1f000000 {
  18. compatible = "cfi-flash";
  19. reg = <0x1f000000 0x800000>;
  20. bank-width = <2>;
  21. device-width = <2>;
  22. partitions {
  23. compatible = "fixed-partitions";
  24. #address-cells = <1>;
  25. #size-cells = <1>;
  26. partition@0 {
  27. label = "u-boot";
  28. reg = <0x0 0x30000>;
  29. read-only;
  30. };
  31. partition@30000 {
  32. label = "u-boot-env";
  33. reg = <0x30000 0x10000>;
  34. read-only;
  35. };
  36. factory: partition@40000 {
  37. label = "factory";
  38. reg = <0x40000 0x10000>;
  39. read-only;
  40. };
  41. partition@50000 {
  42. compatible = "denx,uimage";
  43. label = "firmware";
  44. reg = <0x50000 0x7b0000>;
  45. };
  46. };
  47. };
  48. leds {
  49. compatible = "gpio-leds";
  50. usb {
  51. label = "w502u:blue:usb";
  52. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  53. trigger-sources = <&otg_port1>;
  54. linux,default-trigger = "usbport";
  55. };
  56. led_wps: wps {
  57. label = "w502u:blue:wps";
  58. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  59. };
  60. };
  61. keys {
  62. compatible = "gpio-keys-polled";
  63. poll-interval = <20>;
  64. reset {
  65. label = "reset";
  66. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  67. linux,code = <KEY_RESTART>;
  68. };
  69. wps {
  70. label = "wps";
  71. gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  72. linux,code = <KEY_WPS_BUTTON>;
  73. };
  74. };
  75. };
  76. &pinctrl {
  77. state_default: pinctrl0 {
  78. gpio {
  79. ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
  80. ralink,function = "gpio";
  81. };
  82. };
  83. };
  84. &ethernet {
  85. mtd-mac-address = <&factory 0x28>;
  86. };
  87. &esw {
  88. mediatek,portmap = <0x3e>;
  89. };
  90. &wmac {
  91. ralink,mtd-eeprom = <&factory 0>;
  92. };
  93. &otg {
  94. status = "okay";
  95. };