MIWIFI-NANO.dts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /dts-v1/;
  2. #include "mt7628an.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "xiaomi,miwifi-nano", "mediatek,mt7628an-soc";
  7. model = "MiWiFi Nano";
  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. memory@0 {
  18. device_type = "memory";
  19. reg = <0x0 0x4000000>;
  20. };
  21. gpio-leds {
  22. compatible = "gpio-leds";
  23. led_blue: status_blue {
  24. label = "miwifi-nano:blue:status";
  25. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  26. };
  27. status_red {
  28. label = "miwifi-nano:red:status";
  29. gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
  30. };
  31. status_amber {
  32. label = "miwifi-nano:amber:status";
  33. gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
  34. };
  35. };
  36. gpio-keys {
  37. compatible = "gpio-keys-polled";
  38. poll-interval = <20>;
  39. reset {
  40. label = "reset";
  41. gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
  42. linux,code = <KEY_RESTART>;
  43. };
  44. };
  45. };
  46. &pinctrl {
  47. state_default: pinctrl0 {
  48. gpio {
  49. ralink,group = "refclk", "wled_an", "gpio";
  50. ralink,function = "gpio";
  51. };
  52. };
  53. };
  54. &wmac {
  55. status = "okay";
  56. ralink,mtd-eeprom = <&factory 0x4>;
  57. };
  58. &ethernet {
  59. mtd-mac-address = <&factory 0x28>;
  60. };
  61. &spi0 {
  62. status = "okay";
  63. m25p80@0 {
  64. compatible = "jedec,spi-nor";
  65. reg = <0>;
  66. spi-max-frequency = <10000000>;
  67. m25p,chunked-io = <32>;
  68. partitions {
  69. compatible = "fixed-partitions";
  70. #address-cells = <1>;
  71. #size-cells = <1>;
  72. partition@0 {
  73. label = "u-boot";
  74. reg = <0x0 0x30000>;
  75. read-only;
  76. };
  77. partition@30000 {
  78. label = "u-boot-env";
  79. reg = <0x30000 0x10000>;
  80. read-only;
  81. };
  82. factory: partition@40000 {
  83. label = "factory";
  84. reg = <0x40000 0x10000>;
  85. read-only;
  86. };
  87. partition@50000 {
  88. label = "firmware";
  89. reg = <0x50000 0xfb0000>;
  90. };
  91. };
  92. };
  93. };