ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_iptime_a604m.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 = "iptime,a604m", "mediatek,mt7628an-soc";
11         model = "ipTIME A604M";
12
13         aliases {
14                 led-boot = &led_cpu;
15                 led-failsafe = &led_cpu;
16                 led-running = &led_cpu;
17                 led-upgrade = &led_cpu;
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 wlan5g {
24                         label = "a604m:blue:wlan5g";
25                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
26                         linux,default-trigger = "phy1tpt";
27                 };
28
29                 led_cpu: cpu {
30                         label = "a604m:blue:cpu";
31                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
32                 };
33
34                 wlan2g {
35                         label = "a604m:blue:wlan2g";
36                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
37                         linux,default-trigger = "phy0tpt";
38                 };
39         };
40
41         keys {
42                 compatible = "gpio-keys";
43
44                 reset {
45                         label = "reset";
46                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
47                         linux,code = <KEY_RESTART>;
48                         debounce-interval = <60>;
49                 };
50
51                 wps {
52                         label = "wps";
53                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
54                         linux,code = <KEY_WPS_BUTTON>;
55                         debounce-interval = <60>;
56                 };
57         };
58 };
59
60 &spi0 {
61         status = "okay";
62
63         flash@0 {
64                 compatible = "jedec,spi-nor";
65                 reg = <0>;
66                 spi-max-frequency = <40000000>;
67
68                 partitions {
69                         compatible = "fixed-partitions";
70                         #address-cells = <1>;
71                         #size-cells = <1>;
72
73                         uboot: partition@0 {
74                                 label = "u-boot";
75                                 reg = <0x0 0x20000>;
76                                 read-only;
77                         };
78
79                         partition@20000 {
80                                 label = "config";
81                                 reg = <0x20000 0x10000>;
82                                 read-only;
83                         };
84
85                         factory: partition@30000 {
86                                 label = "factory";
87                                 reg = <0x30000 0x10000>;
88                                 read-only;
89                         };
90
91                         partition@40000 {
92                                 compatible = "denx,uimage";
93                                 label = "firmware";
94                                 reg = <0x40000 0x7c0000>;
95                         };
96                 };
97         };
98 };
99
100 &pinctrl {
101         state_default: pinctrl0 {
102                 gpio {
103                         ralink,group = "i2c", "uart1", "wdt";
104                         ralink,function = "gpio";
105                 };
106         };
107 };
108
109 &ehci {
110         status = "disabled";
111 };
112
113 &ohci {
114         status = "disabled";
115 };
116
117 &ethernet {
118         mtd-mac-address = <&uboot 0x1fc20>;
119 };
120
121 &pcie {
122         status = "okay";
123 };
124
125 &pcie0 {
126         wifi@0,0 {
127                 compatible = "mediatek,mt76";
128                 reg = <0x0000 0 0 0 0>;
129                 mediatek,mtd-eeprom = <&factory 0x8000>;
130                 ieee80211-freq-limit = <5000000 6000000>;
131         };
132 };
133
134 &wmac {
135         status = "okay";
136 };