ArcherC20i.dts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "tplink,c20i", "ralink,mt7620a-soc";
  7. model = "TP-Link Archer C20i";
  8. chosen {
  9. bootargs = "console=ttyS0,115200";
  10. };
  11. gpio-leds {
  12. compatible = "gpio-leds";
  13. lan {
  14. label = "c20i:blue:lan";
  15. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  16. };
  17. usb {
  18. label = "c20i:blue:usb";
  19. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  20. trigger-sources = <&ohci_port1>, <&ehci_port1>;
  21. linux,default-trigger = "usbport";
  22. };
  23. wps {
  24. label = "c20i:blue:wps";
  25. gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
  26. };
  27. wan {
  28. label = "c20i:blue:wan";
  29. gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
  30. };
  31. wlan {
  32. label = "c20i:blue:wlan";
  33. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  34. };
  35. };
  36. gpio-keys {
  37. compatible = "gpio-keys";
  38. rfkill {
  39. label = "rfkill";
  40. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  41. linux,code = <KEY_RFKILL>;
  42. };
  43. reset_wps {
  44. label = "reset_wps";
  45. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  46. linux,code = <KEY_RESTART>;
  47. };
  48. };
  49. };
  50. &gpio1 {
  51. status = "okay";
  52. };
  53. &gpio2 {
  54. status = "okay";
  55. };
  56. &gpio3 {
  57. status = "okay";
  58. };
  59. &spi0 {
  60. status = "okay";
  61. m25p80@0 {
  62. compatible = "jedec,spi-nor";
  63. reg = <0>;
  64. spi-max-frequency = <10000000>;
  65. partitions {
  66. compatible = "fixed-partitions";
  67. #address-cells = <1>;
  68. #size-cells = <1>;
  69. partition@0 {
  70. label = "u-boot";
  71. reg = <0x0 0x20000>;
  72. read-only;
  73. };
  74. partition@20000 {
  75. label = "firmware";
  76. reg = <0x20000 0x7a0000>;
  77. };
  78. partition@7c0000 {
  79. label = "config";
  80. reg = <0x7c0000 0x10000>;
  81. };
  82. rom: partition@7d0000 {
  83. label = "rom";
  84. reg = <0x7d0000 0x10000>;
  85. };
  86. partition@7e0000 {
  87. label = "romfile";
  88. reg = <0x7e0000 0x10000>;
  89. };
  90. radio: partition@7f0000 {
  91. label = "radio";
  92. reg = <0x7f0000 0x10000>;
  93. };
  94. };
  95. };
  96. };
  97. &pinctrl {
  98. state_default: pinctrl0 {
  99. gpio {
  100. ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "ephy", "spi refclk";
  101. ralink,function = "gpio";
  102. };
  103. };
  104. };
  105. &ethernet {
  106. pinctrl-names = "default";
  107. mtd-mac-address = <&rom 0xf100>;
  108. mediatek,portmap = "wllll";
  109. };
  110. &ehci {
  111. status = "okay";
  112. };
  113. &ohci {
  114. status = "okay";
  115. };
  116. &gsw {
  117. mediatek,port4 = "ephy";
  118. };
  119. &wmac {
  120. ralink,mtd-eeprom = <&radio 0>;
  121. };
  122. &pcie {
  123. status = "okay";
  124. };
  125. &pcie0 {
  126. mt76@0,0 {
  127. reg = <0x0000 0 0 0 0>;
  128. mediatek,mtd-eeprom = <&radio 32768>;
  129. };
  130. };