ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620n_asus_rt-n14u.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "asus,rt-n14u", "ralink,mt7620n-soc";
10         model = "Asus RT-N14U";
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                 wan {
23                         label = "rt-n14u:blue:wan";
24                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
25                 };
26
27                 lan {
28                         label = "rt-n14u:blue:lan";
29                         gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
30                 };
31
32                 usb {
33                         label = "rt-n14u:blue:usb";
34                         gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
35                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
36                         linux,default-trigger = "usbport";
37                 };
38
39                 led_power: power {
40                         label = "rt-n14u:blue:power";
41                         gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
42                 };
43
44                 air {
45                         label = "rt-n14u:blue:air";
46                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
47                 };
48         };
49
50         keys {
51                 compatible = "gpio-keys-polled";
52                 poll-interval = <20>;
53
54                 reset {
55                         label = "reset";
56                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
57                         linux,code = <KEY_RESTART>;
58                 };
59
60                 wps {
61                         label = "wps";
62                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
63                         linux,code = <KEY_WPS_BUTTON>;
64                 };
65         };
66 };
67
68 &gpio2 {
69         status = "okay";
70 };
71
72 &gpio3 {
73         status = "okay";
74 };
75
76 &spi0 {
77         status = "okay";
78
79         m25p80@0 {
80                 compatible = "jedec,spi-nor";
81                 reg = <0>;
82                 spi-max-frequency = <10000000>;
83
84                 partitions {
85                         compatible = "fixed-partitions";
86                         #address-cells = <1>;
87                         #size-cells = <1>;
88
89                         partition@0 {
90                                 label = "u-boot";
91                                 reg = <0x0 0x30000>;
92                                 read-only;
93                         };
94
95                         partition@30000 {
96                                 label = "u-boot-env";
97                                 reg = <0x30000 0x10000>;
98                                 read-only;
99                         };
100
101                         factory: partition@40000 {
102                                 label = "factory";
103                                 reg = <0x40000 0x10000>;
104                                 read-only;
105                         };
106
107                         partition@50000 {
108                                 compatible = "denx,uimage";
109                                 label = "firmware";
110                                 reg = <0x50000 0xfb0000>;
111                         };
112                 };
113         };
114 };
115
116 &ehci {
117         status = "okay";
118 };
119
120 &ohci {
121         status = "okay";
122 };
123
124 &ethernet {
125         mtd-mac-address = <&factory 0x4>;
126         mediatek,portmap = "wllll";
127 };
128
129 &wmac {
130         ralink,mtd-eeprom = <&factory 0>;
131 };
132
133 &pinctrl {
134         state_default: pinctrl0 {
135                 default {
136                         ralink,group = "ephy", "wled", "i2c";
137                         ralink,function = "gpio";
138                 };
139         };
140 };