ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_youku_yk-l2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "youku,yk-l2", "mediatek,mt7621-soc";
11         model = "Youku YK-L2";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_power;
16                 led-running = &led_power;
17                 led-upgrade = &led_wps;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "yk-l2:blue:power";
29                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
30                         default-state = "on";
31                 };
32
33                 led_wps: wps {
34                         label = "yk-l2:blue:wps";
35                         gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
36                 };
37
38                 usb {
39                         label = "yk-l2:blue:usb";
40                         gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
41                         trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
42                         linux,default-trigger = "usbport";
43                 };
44         };
45
46         keys {
47                 compatible = "gpio-keys-polled";
48                 poll-interval = <20>;
49
50                 reset {
51                         label = "reset";
52                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
53                         linux,code = <KEY_RESTART>;
54                 };
55
56                 wps {
57                         label = "wps";
58                         gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
59                         linux,code = <KEY_WPS_BUTTON>;
60                 };
61         };
62 };
63
64 &sdhci {
65         status = "okay";
66 };
67
68 &xhci {
69         status = "okay";
70 };
71
72 &spi0 {
73         status = "okay";
74
75         flash@0 {
76                 compatible = "jedec,spi-nor";
77                 reg = <0>;
78                 spi-max-frequency = <10000000>;
79
80                 partitions {
81                         compatible = "fixed-partitions";
82                         #address-cells = <1>;
83                         #size-cells = <1>;
84
85                         partition@0 {
86                                 label = "u-boot";
87                                 reg = <0x0 0x30000>;
88                                 read-only;
89                         };
90
91                         partition@30000 {
92                                 label = "u-boot-env";
93                                 reg = <0x30000 0x10000>;
94                                 read-only;
95                         };
96
97                         factory: partition@40000 {
98                                 label = "factory";
99                                 reg = <0x40000 0x10000>;
100                                 read-only;
101                         };
102
103                         partition@50000 {
104                                 compatible = "denx,uimage";
105                                 label = "firmware";
106                                 reg = <0x50000 0xfb0000>;
107                         };
108                 };
109         };
110 };
111
112 &pcie {
113         status = "okay";
114 };
115
116 &pcie0 {
117         wifi@0,0 {
118                 compatible = "pci14c3,7603";
119                 reg = <0x0000 0 0 0 0>;
120                 mediatek,mtd-eeprom = <&factory 0x0000>;
121                 ieee80211-freq-limit = <2400000 2500000>;
122                 led {
123                         led-active-low;
124                 };
125         };
126 };
127
128 &pcie1 {
129         wifi@0,0 {
130                 compatible = "pci14c3,7662";
131                 reg = <0x0000 0 0 0 0>;
132                 mediatek,mtd-eeprom = <&factory 0x8000>;
133                 ieee80211-freq-limit = <5000000 6000000>;
134                 led {
135                         led-sources = <2>;
136                         led-active-low;
137                 };
138         };
139 };
140
141 &ethernet {
142         mtd-mac-address = <&factory 0xe000>;
143 };
144
145 &pinctrl {
146         state_default: pinctrl0 {
147                 gpio {
148                         ralink,group = "jtag", "wdt";
149                         ralink,function = "gpio";
150                 };
151         };
152 };