ramips: fix switch setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_tama_w06.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 = "tama,w06", "mediatek,mt7628an-soc";
10         model = "Tama W06";
11
12         leds {
13                 compatible = "gpio-leds";
14
15                 wps {
16                         label = "w06:green:wps";
17                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
18                 };
19
20                 wan {
21                         label = "w06:green:wan";
22                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
23                 };
24
25                 wireless {
26                         label = "w06:green:wlan";
27                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
28                 };
29         };
30
31         keys {
32                 compatible = "gpio-keys";
33
34                 reset {
35                         label = "reset";
36                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
37                         linux,code = <KEY_RESTART>;
38                 };
39         };
40 };
41
42 &ehci {
43         status = "okay";
44 };
45
46 &ethernet {
47         mtd-mac-address = <&factory 0x28>;
48 };
49
50 &ohci {
51         status = "okay";
52 };
53
54 &state_default {
55         gpio {
56                 ralink,group = "uart1", "p0led_an", "wdt";
57                 ralink,function = "gpio";
58         };
59 };
60
61 &spi0 {
62         status = "okay";
63
64         m25p80@0 {
65                 compatible = "jedec,spi-nor";
66                 reg = <0>;
67                 spi-max-frequency = <10000000>;
68
69                 partitions {
70                         compatible = "fixed-partitions";
71                         #address-cells = <1>;
72                         #size-cells = <1>;
73
74                         partition@0 {
75                                 label = "u-boot";
76                                 reg = <0x0 0x30000>;
77                                 read-only;
78                         };
79
80                         partition@30000 {
81                                 label = "u-boot-env";
82                                 reg = <0x30000 0x10000>;
83                                 read-only;
84                         };
85
86                         factory: partition@40000 {
87                                 label = "factory";
88                                 reg = <0x40000 0x10000>;
89                                 read-only;
90                         };
91
92                         partition@50000 {
93                                 compatible = "denx,uimage";
94                                 label = "firmware";
95                                 reg = <0x50000 0xeb0000>;
96                         };
97
98                         partition@f00000 {
99                                 label = "user-data";
100                                 reg = <0xf00000 0x100000>;
101                                 read-only;
102                         };
103                 };
104         };
105 };
106
107 &wmac {
108         status = "okay";
109 };