MIWIFI-MINI.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
  7. model = "Xiaomi MiWiFi Mini";
  8. aliases {
  9. led-boot = &led_blue;
  10. led-failsafe = &led_blue;
  11. led-running = &led_blue;
  12. led-upgrade = &led_blue;
  13. };
  14. chosen {
  15. bootargs = "console=ttyS0,115200";
  16. };
  17. gpio-leds {
  18. compatible = "gpio-leds";
  19. led_blue: blue {
  20. label = "miwifi-mini:blue:status";
  21. gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
  22. default-state = "on";
  23. };
  24. yellow {
  25. label = "miwifi-mini:yellow:status";
  26. gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
  27. default-state = "off";
  28. };
  29. red {
  30. label = "miwifi-mini:red:status";
  31. gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
  32. default-state = "off";
  33. };
  34. };
  35. gpio-keys-polled {
  36. compatible = "gpio-keys-polled";
  37. poll-interval = <20>;
  38. reset {
  39. label = "reset";
  40. gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
  41. linux,code = <KEY_RESTART>;
  42. };
  43. };
  44. };
  45. &gpio0 {
  46. status = "okay";
  47. };
  48. &gpio1 {
  49. status = "okay";
  50. };
  51. &gpio2 {
  52. status = "okay";
  53. };
  54. &spi0 {
  55. status = "okay";
  56. m25p80@0 {
  57. compatible = "jedec,spi-nor";
  58. reg = <0>;
  59. spi-max-frequency = <10000000>;
  60. partitions {
  61. compatible = "fixed-partitions";
  62. #address-cells = <1>;
  63. #size-cells = <1>;
  64. partition@0 {
  65. label = "u-boot";
  66. reg = <0x0 0x30000>;
  67. };
  68. partition@30000 {
  69. label = "u-boot-env";
  70. reg = <0x30000 0x10000>;
  71. read-only;
  72. };
  73. factory: partition@40000 {
  74. label = "factory";
  75. reg = <0x40000 0x10000>;
  76. read-only;
  77. };
  78. partition@50000 {
  79. label = "firmware";
  80. reg = <0x50000 0xf80000>;
  81. };
  82. partition@fd0000 {
  83. label = "crash";
  84. reg = <0xfd0000 0x10000>;
  85. };
  86. partition@fe0000 {
  87. label = "reserved";
  88. reg = <0xfe0000 0x10000>;
  89. read-only;
  90. };
  91. partition@ff0000 {
  92. label = "Bdata";
  93. reg = <0xff0000 0x10000>;
  94. };
  95. };
  96. };
  97. };
  98. &ehci {
  99. status = "okay";
  100. };
  101. &ohci {
  102. status = "okay";
  103. };
  104. &ethernet {
  105. pinctrl-names = "default";
  106. pinctrl-0 = <&ephy_pins>;
  107. mtd-mac-address = <&factory 0x28>;
  108. mediatek,portmap = "llllw";
  109. };
  110. &wmac {
  111. ralink,mtd-eeprom = <&factory 0>;
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&pa_pins>;
  114. };
  115. &pcie {
  116. status = "okay";
  117. };
  118. &pcie0 {
  119. mt76@0,0 {
  120. reg = <0x0000 0 0 0 0>;
  121. mediatek,mtd-eeprom = <&factory 0x8000>;
  122. ieee80211-freq-limit = <5000000 6000000>;
  123. };
  124. };
  125. &pinctrl {
  126. state_default: pinctrl0 {
  127. gpio {
  128. ralink,group = "i2c", "rgmii1";
  129. ralink,function = "gpio";
  130. };
  131. };
  132. };