dfe9ef5707cc42965706a2a397dc6f5c9be9ce4c
[openwrt/openwrt.git] / target / linux / ramips / dts / 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 = "MiWiFi Nano";
11
12 chosen {
13 bootargs = "console=ttyS0,115200";
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x4000000>;
19 };
20
21 gpio-leds {
22 compatible = "gpio-leds";
23
24 status_blue {
25 label = "miwifi-nano:blue:status";
26 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
27 };
28 status_red {
29 label = "miwifi-nano:red:status";
30 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
31 };
32 status_amber {
33 label = "miwifi-nano:amber:status";
34 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
35 };
36 };
37
38 gpio-keys {
39 compatible = "gpio-keys-polled";
40 #address-cells = <1>;
41 #size-cells = <0>;
42 poll-interval = <20>;
43
44 reset {
45 label = "reset";
46 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49 };
50 };
51
52 &pinctrl {
53 state_default: pinctrl0 {
54 gpio {
55 ralink,group = "refclk", "wled_an", "gpio";
56 ralink,function = "gpio";
57 };
58 };
59 };
60
61 &wmac {
62 status = "okay";
63 ralink,mtd-eeprom = <&factory 0x4>;
64 };
65
66 &ethernet {
67 mtd-mac-address = <&factory 0x28>;
68 };
69
70 &spi0 {
71 status = "okay";
72
73 m25p80@0 {
74 #address-cells = <1>;
75 #size-cells = <1>;
76 compatible = "jedec,spi-nor";
77 reg = <0>;
78 linux,modalias = "m25p80";
79 spi-max-frequency = <10000000>;
80 m25p,chunked-io = <32>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0 0x30000>;
85 read-only;
86 };
87
88 partition@30000 {
89 label = "u-boot-env";
90 reg = <0x30000 0x10000>;
91 read-only;
92 };
93
94 factory: partition@40000 {
95 label = "factory";
96 reg = <0x40000 0x10000>;
97 read-only;
98 };
99
100 partition@50000 {
101 label = "firmware";
102 reg = <0x50000 0x7b0000>;
103 };
104 };
105 };