MIWIFI-MINI.dts 2.4 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 = "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. };
  28. red {
  29. label = "miwifi-mini:red:status";
  30. gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
  31. };
  32. };
  33. gpio-keys-polled {
  34. compatible = "gpio-keys-polled";
  35. poll-interval = <20>;
  36. reset {
  37. label = "reset";
  38. gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
  39. linux,code = <KEY_RESTART>;
  40. };
  41. };
  42. };
  43. &gpio0 {
  44. status = "okay";
  45. };
  46. &gpio1 {
  47. status = "okay";
  48. };
  49. &gpio2 {
  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. };
  66. partition@30000 {
  67. label = "u-boot-env";
  68. reg = <0x30000 0x10000>;
  69. read-only;
  70. };
  71. factory: partition@40000 {
  72. label = "factory";
  73. reg = <0x40000 0x10000>;
  74. read-only;
  75. };
  76. partition@50000 {
  77. compatible = "denx,uimage";
  78. label = "firmware";
  79. reg = <0x50000 0xf80000>;
  80. };
  81. partition@fd0000 {
  82. label = "crash";
  83. reg = <0xfd0000 0x10000>;
  84. };
  85. partition@fe0000 {
  86. label = "reserved";
  87. reg = <0xfe0000 0x10000>;
  88. read-only;
  89. };
  90. partition@ff0000 {
  91. label = "Bdata";
  92. reg = <0xff0000 0x10000>;
  93. };
  94. };
  95. };
  96. };
  97. &ehci {
  98. status = "okay";
  99. };
  100. &ohci {
  101. status = "okay";
  102. };
  103. &ethernet {
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&ephy_pins>;
  106. mtd-mac-address = <&factory 0x28>;
  107. mediatek,portmap = "llllw";
  108. };
  109. &wmac {
  110. ralink,mtd-eeprom = <&factory 0>;
  111. pinctrl-names = "default";
  112. pinctrl-0 = <&pa_pins>;
  113. };
  114. &pcie {
  115. status = "okay";
  116. };
  117. &pcie0 {
  118. mt76@0,0 {
  119. reg = <0x0000 0 0 0 0>;
  120. mediatek,mtd-eeprom = <&factory 0x8000>;
  121. ieee80211-freq-limit = <5000000 6000000>;
  122. };
  123. };
  124. &pinctrl {
  125. state_default: pinctrl0 {
  126. gpio {
  127. ralink,group = "i2c", "rgmii1";
  128. ralink,function = "gpio";
  129. };
  130. };
  131. };