ar9331_tl_mr3020.dts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /dts-v1/;
  2. #include <dt-bindings/gpio/gpio.h>
  3. #include <dt-bindings/input/input.h>
  4. #include "ar9331.dtsi"
  5. / {
  6. model = "TP-Link TL-MR3020";
  7. compatible = "tplink,tl-mr3020";
  8. aliases {
  9. serial0 = &uart;
  10. };
  11. memory@0 {
  12. device_type = "memory";
  13. reg = <0x0 0x2000000>;
  14. };
  15. leds {
  16. compatible = "gpio-leds";
  17. wlan {
  18. label = "tp-link:green:wlan";
  19. gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
  20. default-state = "off";
  21. };
  22. lan {
  23. label = "tp-link:green:lan";
  24. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  25. default-state = "off";
  26. };
  27. wps {
  28. label = "tp-link:green:wps";
  29. gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
  30. default-state = "off";
  31. };
  32. led3g {
  33. label = "tp-link:green:3g";
  34. gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
  35. default-state = "off";
  36. };
  37. };
  38. gpio-keys-polled {
  39. compatible = "gpio-keys-polled";
  40. #address-cells = <1>;
  41. #size-cells = <0>;
  42. poll-interval = <100>;
  43. button@0 {
  44. label = "wps";
  45. linux,code = <KEY_WPS_BUTTON>;
  46. gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
  47. };
  48. button@1 {
  49. label = "sw1";
  50. linux,code = <BTN_0>;
  51. gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
  52. };
  53. button@2 {
  54. label = "sw2";
  55. linux,code = <BTN_1>;
  56. gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
  57. };
  58. };
  59. reg_usb_vbus: reg_usb_vbus {
  60. compatible = "regulator-fixed";
  61. regulator-name = "usb_vbus";
  62. regulator-min-microvolt = <5000000>;
  63. regulator-max-microvolt = <5000000>;
  64. gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
  65. enable-active-high;
  66. };
  67. };
  68. &ref {
  69. clock-frequency = <25000000>;
  70. };
  71. &uart {
  72. status = "okay";
  73. };
  74. &gpio {
  75. status = "okay";
  76. };
  77. &usb {
  78. dr_mode = "host";
  79. vbus-supply = <&reg_usb_vbus>;
  80. status = "okay";
  81. };
  82. &usb_phy {
  83. status = "okay";
  84. };
  85. &spi {
  86. num-chipselects = <1>;
  87. status = "okay";
  88. /* Spansion S25FL032PIF SPI flash */
  89. spiflash: s25sl032p@0 {
  90. #address-cells = <1>;
  91. #size-cells = <1>;
  92. compatible = "spansion,s25sl032p", "jedec,spi-nor";
  93. spi-max-frequency = <104000000>;
  94. reg = <0>;
  95. };
  96. };