ramips: further improve support for Xiaomi MiWiFi Nano
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_xiaomi_miwifi-nano.dts
1 /dts-v1/;
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,miwifi-nano", "mediatek,mt7628an-soc";
10 model = "Xiaomi MiWiFi Nano";
11
12 aliases {
13 led-boot = &led_status_amber;
14 led-failsafe = &led_status_red;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_amber;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_status_blue: status_blue {
27 label = "miwifi-nano:blue:status";
28 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
29 };
30
31 led_status_red: status_red {
32 label = "miwifi-nano:red:status";
33 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
34 };
35
36 led_status_amber: status_amber {
37 label = "miwifi-nano:amber:status";
38 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 reset {
46 label = "reset";
47 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51 };
52
53 &state_default {
54 gpio {
55 ralink,group = "gpio", "refclk", "wdt", "wled_an";
56 ralink,function = "gpio";
57 };
58 };
59
60 &ehci {
61 status = "disabled";
62 };
63
64 &ohci {
65 status = "disabled";
66 };
67
68 &wmac {
69 status = "okay";
70 ralink,mtd-eeprom = <&factory 0x4>;
71 };
72
73 &ethernet {
74 mtd-mac-address = <&factory 0x28>;
75 };
76
77 &spi0 {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <40000000>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x30000>;
93 read-only;
94 };
95
96 partition@30000 {
97 label = "u-boot-env";
98 reg = <0x30000 0x10000>;
99 };
100
101 factory: partition@40000 {
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 read-only;
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x50000 0xfb0000>;
111 };
112 };
113 };
114 };