Advertisement
Guest User

mt7628an_xiaomi_mi-router-4c-MT0-WR300N-X-V1.3.dts

a guest
May 21st, 2022
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2.  
  3. #include "mt7628an.dtsi"
  4.  
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/input/input.h>
  7.  
  8. / {
  9. compatible = "xiaomi,mi-router-4c-MT0-WR300N-X-V1.3", "mediatek,mt7628an-soc";
  10. model = "Xiaomi Mi Router 4C MT0-WR300N-X-V1.3";
  11.  
  12. aliases {
  13. led-boot = &led_power_yellow;
  14. led-failsafe = &led_power_yellow;
  15. led-running = &led_power_blue;
  16. led-upgrade = &led_power_yellow;
  17. label-mac-device = &ethernet;
  18. };
  19.  
  20. chosen {
  21. bootargs = "console=ttyS0,115200";
  22. };
  23.  
  24. leds {
  25. compatible = "gpio-leds";
  26.  
  27. led_power_blue: power_blue {
  28. label = "blue:power";
  29. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  30. };
  31.  
  32. led_power_yellow: power_yellow {
  33. label = "yellow:power";
  34. gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
  35. };
  36. };
  37.  
  38. keys {
  39. compatible = "gpio-keys";
  40.  
  41. reset {
  42. label = "reset";
  43. gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
  44. linux,code = <KEY_RESTART>;
  45. };
  46. };
  47. };
  48.  
  49. &state_default {
  50. gpio {
  51. groups = "gpio", "refclk", "wdt", "wled_an";
  52. function = "gpio";
  53. };
  54. };
  55.  
  56. &spi0 {
  57. status = "okay";
  58.  
  59. flash@0 {
  60. compatible = "jedec,spi-nor";
  61. reg = <0>;
  62. spi-max-frequency = <40000000>;
  63. partitions {
  64. compatible = "fixed-partitions";
  65. #address-cells = <1>;
  66. #size-cells = <1>;
  67.  
  68. partition@0 {
  69. label = "u-boot";
  70. reg = <0x0 0x30000>;
  71. // read-only;
  72. };
  73.  
  74. partition@30000 {
  75. label = "u-boot-env";
  76. reg = <0x30000 0x10000>;
  77. // read-only;
  78. };
  79.  
  80. factory: partition@40000 {
  81. label = "factory";
  82. reg = <0x40000 0x10000>;
  83. // read-only;
  84. };
  85.  
  86. partition@50000 {
  87. compatible = "denx,uimage";
  88. label = "firmware";
  89. reg = <0x50000 0xfb0000>;
  90. };
  91. };
  92. };
  93. };
  94.  
  95. &factory {
  96. compatible = "nvmem-cells";
  97. #address-cells = <1>;
  98. #size-cells = <1>;
  99.  
  100. macaddr_factory_28: macaddr@28 {
  101. reg = <0x28 0x6>;
  102. };
  103. };
  104.  
  105. &wmac {
  106. status = "okay";
  107. mediatek,mtd-eeprom = <&factory 0x0>;
  108. };
  109.  
  110.  
  111. &ehci {
  112. status = "disabled";
  113. };
  114.  
  115. &ohci {
  116. status = "disabled";
  117. };
  118.  
  119. &ethernet {
  120. nvmem-cells = <&macaddr_factory_28>;
  121. nvmem-cell-names = "mac-address";
  122. };
  123.  
  124. &esw {
  125. mediatek,portmap = <0x3d>;
  126. mediatek,portdisable = <0x29>;
  127. };
  128.  
  129.  
  130.  
  131.  
  132.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement