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