1
0

TINY-AC.dts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "dovado,tiny-ac", "ralink,mt7620a-soc";
  7. model = "Dovado Tiny AC";
  8. chosen {
  9. bootargs = "console=ttyS0,57600";
  10. };
  11. gpio-leds {
  12. compatible = "gpio-leds";
  13. usb {
  14. label = "tiny-ac:green:usb";
  15. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  16. trigger-sources = <&ohci_port1>, <&ehci_port1>;
  17. linux,default-trigger = "usbport";
  18. };
  19. wifi {
  20. label = "tiny-ac:orange:wifi";
  21. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  22. };
  23. };
  24. gpio-keys-polled {
  25. compatible = "gpio-keys-polled";
  26. poll-interval = <20>;
  27. reset {
  28. label = "reset";
  29. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  30. linux,code = <KEY_RESTART>;
  31. };
  32. };
  33. gpio_export {
  34. compatible = "gpio-export";
  35. #size-cells = <0>;
  36. usbpower {
  37. gpio-export,name = "usbpower";
  38. gpio-export,output = <1>;
  39. gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
  40. };
  41. };
  42. };
  43. &gpio0 {
  44. status = "okay";
  45. };
  46. &gpio2 {
  47. status = "okay";
  48. };
  49. &gpio3 {
  50. status = "okay";
  51. };
  52. &spi0 {
  53. status = "okay";
  54. m25p80@0 {
  55. compatible = "jedec,spi-nor";
  56. reg = <0>;
  57. spi-max-frequency = <10000000>;
  58. partitions {
  59. compatible = "fixed-partitions";
  60. #address-cells = <1>;
  61. #size-cells = <1>;
  62. partition@0 {
  63. label = "u-boot";
  64. reg = <0x0 0x30000>;
  65. read-only;
  66. };
  67. partition@30000 {
  68. label = "u-boot-env";
  69. reg = <0x30000 0x10000>;
  70. read-only;
  71. };
  72. factory: partition@40000 {
  73. label = "factory";
  74. reg = <0x40000 0x10000>;
  75. read-only;
  76. };
  77. partition@50000 {
  78. label = "firmware";
  79. reg = <0x50000 0x7b0000>;
  80. };
  81. };
  82. };
  83. };
  84. &ehci {
  85. status = "okay";
  86. };
  87. &ohci {
  88. status = "okay";
  89. };
  90. &ethernet {
  91. status = "okay";
  92. pinctrl-names = "default";
  93. pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
  94. mediatek,portmap = "llllw";
  95. port@4 {
  96. status = "okay";
  97. phy-mode = "rgmii";
  98. phy-handle = <&phy4>;
  99. };
  100. port@5 {
  101. status = "okay";
  102. phy-mode = "rgmii";
  103. phy-handle = <&phy5>;
  104. };
  105. mdio-bus {
  106. status = "okay";
  107. phy4: ethernet-phy@4 {
  108. reg = <4>;
  109. phy-mode = "rgmii";
  110. };
  111. phy5: ethernet-phy@5 {
  112. reg = <5>;
  113. phy-mode = "rgmii";
  114. };
  115. };
  116. };
  117. &gsw {
  118. mediatek,port4 = "gmac";
  119. };
  120. &pcie {
  121. status = "okay";
  122. };
  123. &pinctrl {
  124. state_default: pinctrl0 {
  125. gpio {
  126. ralink,group = "uartf", "nd_sd", "wled";
  127. ralink,function = "gpio";
  128. };
  129. };
  130. };