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