Newifi-D2.dts 2.8 KB

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