ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / rt3052_dlink_dap-1350.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "dlink,dap-1350", "ralink,rt3052-soc";
10         model = "D-Link DAP-1350";
11
12         aliases {
13                 led-boot = &led_power_blue;
14                 led-failsafe = &led_power_blue;
15                 led-running = &led_power_blue;
16                 led-upgrade = &led_power_blue;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         cfi@1f000000 {
24                 compatible = "cfi-flash";
25                 reg = <0x1f000000 0x800000>;
26                 bank-width = <2>;
27                 device-width = <2>;
28
29                 partitions {
30                         compatible = "fixed-partitions";
31                         #address-cells = <1>;
32                         #size-cells = <1>;
33
34                         partition@0 {
35                                 label = "u-boot";
36                                 reg = <0x0 0x30000>;
37                                 read-only;
38                         };
39
40                         devdata: partition@30000 {
41                                 label = "devdata";
42                                 reg = <0x30000 0x10000>;
43                                 read-only;
44                         };
45
46                         partition@40000 {
47                                 label = "devconf";
48                                 reg = <0x40000 0x30000>;
49                                 read-only;
50                         };
51
52                         partition@70000 {
53                                 label = "devlang";
54                                 reg = <0x70000 0x40000>;
55                                 read-only;
56                         };
57
58                         partition@b0000 {
59                                 compatible = "denx,uimage";
60                                 label = "firmware";
61                                 reg = <0xb0000 0x750000>;
62                         };
63                 };
64         };
65
66         leds {
67                 compatible = "gpio-leds";
68
69                 led_power_blue: power {
70                         label = "dap-1350:blue:power";
71                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
72                 };
73
74                 power2 {
75                         label = "dap-1350:red:power";
76                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
77                 };
78
79                 wps {
80                         label = "dap-1350:blue:wps";
81                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
82                 };
83         };
84
85         keys {
86                 compatible = "gpio-keys-polled";
87                 poll-interval = <20>;
88
89                 reset {
90                         label = "reset";
91                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
92                         linux,code = <KEY_RESTART>;
93                 };
94
95                 wps {
96                         label = "wps";
97                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
98                         linux,code = <KEY_WPS_BUTTON>;
99                 };
100
101                 rt {
102                         label = "rt";
103                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
104                         linux,code = <BTN_0>;
105                 };
106
107                 ap {
108                         label = "ap";
109                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
110                         linux,code = <BTN_1>;
111                 };
112         };
113 };
114
115 &pinctrl {
116         state_default: pinctrl0 {
117                 gpio {
118                         ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
119                         ralink,function = "gpio";
120                 };
121         };
122 };
123
124 &ethernet {
125         mtd-mac-address = <&devdata 0x2e>;
126 };
127
128 &esw {
129         mediatek,portmap = <0x2f>;
130 };
131
132 &wmac {
133         ralink,mtd-eeprom = <&devdata 0>;
134 };
135
136 &otg {
137         status = "okay";
138 };