ramips: fix MAC address setup for Xiaomi MiWiFi Nano
[oweals/openwrt.git] / target / linux / ramips / dts / rt3050_teltonika_rut5xx.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 = "teltonika,rut5xx", "ralink,rt3050-soc";
10         model = "Teltonika RUT5XX";
11
12         aliases {
13                 led-boot = &led_status;
14                 led-failsafe = &led_status;
15                 led-running = &led_status;
16                 led-upgrade = &led_status;
17         };
18
19         leds {
20                 compatible = "gpio-leds";
21
22                 led_status: status {
23                         label = "rut5xx:green:status";
24                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
25                 };
26         };
27
28         keys {
29                 compatible = "gpio-keys-polled";
30                 poll-interval = <20>;
31
32                 reset {
33                         label = "reset";
34                         gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
35                         linux,code = <KEY_RESTART>;
36                 };
37         };
38 };
39
40 &spi0 {
41         status = "okay";
42
43         m25p80@0 {
44                 compatible = "jedec,spi-nor";
45                 reg = <0>;
46                 spi-max-frequency = <10000000>;
47
48                 partitions {
49                         compatible = "fixed-partitions";
50                         #address-cells = <1>;
51                         #size-cells = <1>;
52
53                         partition@0 {
54                                 label = "u-boot";
55                                 reg = <0x0 0x30000>;
56                                 read-only;
57                         };
58
59                         partition@30000 {
60                                 label = "u-boot-env";
61                                 reg = <0x30000 0x10000>;
62                                 read-only;
63                         };
64
65                         factory: partition@40000 {
66                                 label = "factory";
67                                 reg = <0x40000 0x10000>;
68                                 read-only;
69                         };
70
71                         partition@50000 {
72                                 compatible = "denx,uimage";
73                                 label = "firmware";
74                                 reg = <0x50000 0xfb0000>;
75                         };
76                 };
77         };
78 };
79
80 &pinctrl {
81         state_default: pinctrl0 {
82                 gpio {
83                         ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf";
84                         ralink,function = "gpio";
85                 };
86         };
87 };
88
89 &ethernet {
90         mtd-mac-address = <&factory 0x28>;
91 };
92
93 &esw {
94         mediatek,portmap = <0x3e>;
95 };
96
97 &wmac {
98         ralink,mtd-eeprom = <&factory 0>;
99 };
100
101 &otg {
102         status = "okay";
103 };