ramips: fix label-mac for Xiaomi RA75
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_cudy_wr1000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "cudy,wr1000", "mediatek,mt7628an-soc";
10 model = "Cudy WR1000";
11
12 aliases {
13 led-boot = &led_wps;
14 led-failsafe = &led_wps;
15 led-upgrade = &led_wps;
16 label-mac-device = &wmac;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 };
27
28 wps {
29 label = "rfkill";
30 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_WPS_BUTTON>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 lan1 {
39 label = "blue:lan1";
40 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
41 };
42
43 lan2 {
44 label = "blue:lan2";
45 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
46 };
47
48 wan {
49 label = "blue:wan";
50 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
51 };
52
53 wlan2g {
54 label = "blue:wlan2g";
55 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
56 linux,default-trigger = "phy0tpt";
57 };
58
59 led_wps: wps {
60 label = "blue:wps";
61 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 eeprom_factory_0: eeprom@0 {
102 reg = <0x0 0x400>;
103 };
104
105 eeprom_factory_8000: eeprom@8000 {
106 reg = <0x8000 0x200>;
107 };
108
109 macaddr_factory_28: macaddr@28 {
110 reg = <0x28 0x6>;
111 };
112 };
113 };
114
115 partition@50000 {
116 compatible = "denx,uimage";
117 label = "firmware";
118 reg = <0x50000 0x7b0000>;
119 };
120 };
121 };
122 };
123
124 &state_default {
125 gpio {
126 groups = "i2s", "refclk", "wdt", "p4led_an",
127 "p3led_an", "p2led_an", "wled_an";
128 function = "gpio";
129 };
130 };
131
132 &pcie {
133 status = "okay";
134 };
135
136 &pcie0 {
137 wifi@0,0 {
138 compatible = "mediatek,mt76";
139 reg = <0x0000 0 0 0 0>;
140 nvmem-cells = <&eeprom_factory_8000>;
141 nvmem-cell-names = "eeprom";
142 ieee80211-freq-limit = <5000000 6000000>;
143
144 led {
145 led-sources = <2>;
146 led-active-low;
147 };
148 };
149 };
150
151 &wmac {
152 status = "okay";
153
154 nvmem-cells = <&eeprom_factory_0>;
155 nvmem-cell-names = "eeprom";
156 };
157
158 &ethernet {
159 nvmem-cells = <&macaddr_factory_28>;
160 nvmem-cell-names = "mac-address";
161 };
162
163 &esw {
164 mediatek,portmap = <0x2f>;
165 };