ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_glinet_vixmini.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 /{
10         compatible = "glinet,vixmini", "mediatek,mt7628an-soc";
11         model = "GL.iNet VIXMINI";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_power;
16                 led-running = &led_power;
17                 led-upgrade = &led_power;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200";
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_power: power {
28                         label = "vixmini:blue:power";
29                         default-state = "on";
30                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
31                 };
32
33                 wlan {
34                         label = "vixmini:white:wlan";
35                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
36                         linux,default-trigger = "phy0tpt";
37                 };
38         };
39
40         keys {
41                 compatible = "gpio-keys-polled";
42                 poll-interval = <20>;
43
44                 reset {
45                         label = "reset";
46                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
47                         linux,code = <KEY_RESTART>;
48                 };
49         };
50 };
51
52 &pinctrl {
53         state_default: pinctrl0 {
54                 gpio {
55                         ralink,group = "wdt", "wled_an", "p1led_an";
56                         ralink,function = "gpio";
57                 };
58         };
59 };
60
61 &ethernet {
62         mtd-mac-address = <&factory 0x4>;
63 };
64
65 &wmac {
66         status = "okay";
67
68         ralink,mtd-eeprom = <&factory 0x0>;
69 };
70
71 &spi0 {
72         status = "okay";
73
74         flash@0 {
75                 compatible = "jedec,spi-nor";
76                 reg = <0>;
77                 spi-max-frequency = <10000000>;
78
79                 partitions {
80                         compatible = "fixed-partitions";
81                         #address-cells = <1>;
82                         #size-cells = <1>;
83
84                         partition@0 {
85                                 label = "u-boot";
86                                 reg = <0x0 0x30000>;
87                                 read-only;
88                         };
89
90                         partition@30000 {
91                                 label = "u-boot-env";
92                                 reg = <0x30000 0x10000>;
93                                 read-only;
94                         };
95
96                         factory: partition@40000 {
97                                 label = "factory";
98                                 reg = <0x40000 0x10000>;
99                                 read-only;
100                         };
101
102                         partition@50000 {
103                                 compatible = "denx,uimage";
104                                 label = "firmware";
105                                 reg = <0x50000 0x7b0000>;
106                         };
107                 };
108         };
109 };