ramips: fix TP-Link Archer MAC address for ethernet
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_glinet_vixmini_microuter.dtsi
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 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_power_blue;
12 led-failsafe = &led_power_blue;
13 led-running = &led_power_blue;
14 led-upgrade = &led_power_blue;
15
16 label-mac-device = &ethernet;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 leds {
24 compatible = "gpio-leds";
25
26 led_power_blue: power {
27 function = LED_FUNCTION_POWER;
28 color = <LED_COLOR_ID_BLUE>;
29 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
30 };
31
32 wlan {
33 function = LED_FUNCTION_WLAN;
34 color = <LED_COLOR_ID_WHITE>;
35 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy0tpt";
37 };
38 };
39
40 keys {
41 compatible = "gpio-keys";
42
43 reset {
44 label = "reset";
45 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
46 linux,code = <KEY_RESTART>;
47 };
48 };
49 };
50
51 &state_default {
52 gpio {
53 groups = "wdt", "wled_an", "p1led_an";
54 function = "gpio";
55 };
56 };
57
58 &ethernet {
59 nvmem-cells = <&macaddr_factory_4>;
60 nvmem-cell-names = "mac-address";
61 };
62
63 &wmac {
64 status = "okay";
65
66 nvmem-cells = <&eeprom_factory_0>;
67 nvmem-cell-names = "eeprom";
68 };
69
70 &spi0 {
71 status = "okay";
72
73 flash@0 {
74 compatible = "jedec,spi-nor";
75 reg = <0>;
76 spi-max-frequency = <10000000>;
77
78 partitions {
79 compatible = "fixed-partitions";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 partition@0 {
84 label = "u-boot";
85 reg = <0x0 0x30000>;
86 read-only;
87 };
88
89 partition@30000 {
90 label = "u-boot-env";
91 reg = <0x30000 0x10000>;
92 read-only;
93 };
94
95 partition@40000 {
96 label = "factory";
97 reg = <0x40000 0x10000>;
98 read-only;
99
100 nvmem-layout {
101 compatible = "fixed-layout";
102 #address-cells = <1>;
103 #size-cells = <1>;
104
105 eeprom_factory_0: eeprom@0 {
106 reg = <0x0 0x400>;
107 };
108
109 macaddr_factory_4: macaddr@4 {
110 reg = <0x4 0x6>;
111 };
112 };
113 };
114
115 /*
116 * Firmware-partition size is model-specific
117 * due to different flash sizes.
118 */
119 firmware_part: partition@50000 {
120 compatible = "denx,uimage";
121 label = "firmware";
122 };
123 };
124 };
125 };