ramips: clean and improve MAC address setup in 02_network
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_totolink_lr1200.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 = "totolink,lr1200", "mediatek,mt7628dan";
11         model = "TOTOLINK LR1200";
12
13         aliases {
14                 led-boot = &led_sys;
15                 led-failsafe = &led_sys;
16                 led-running = &led_sys;
17                 led-upgrade = &led_sys;
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 led_sys: sys {
24                         label = "lr1200:blue:sys";
25                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
26                 };
27                 sms {
28                         label = "lr1200:blue:sms";
29                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
30                 };
31                 wifi {
32                         label = "lr1200:blue:wifi";
33                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
34                         linux,default-trigger = "phy0tpt";
35                 };
36                 3g {
37                         label = "lr1200:blue:3g";
38                         gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
39                 };
40                 4g {
41                         label = "lr1200:blue:4g";
42                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
43                 };
44                 rssi1 {
45                         label = "lr1200:blue:rssi1";
46                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
47                 };
48                 rssi2 {
49                         label = "lr1200:blue:rssi2";
50                         gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
51                 };
52                 rssi3 {
53                         label = "lr1200:blue:rssi3";
54                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
55                 };
56                 rssi4 {
57                         label = "lr1200:blue:rssi4";
58                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
59                 };
60         };
61
62         keys {
63                 compatible = "gpio-keys-polled";
64                 poll-interval = <20>;
65
66                 reset {
67                         label = "reset";
68                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
69                         linux,code = <KEY_RESTART>;
70                 };
71         };
72 };
73
74 &gpio1 {
75         gpio_modem_reset {
76                 gpio-hog;
77                 gpios = <13 GPIO_ACTIVE_HIGH>;
78                 output-high;
79                 line-name = "modem-reset";
80         };
81 };
82
83 &pinctrl {
84         state_default: pinctrl0 {
85                 gpio {
86                         ralink,group = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an";
87                         ralink,function = "gpio";
88                 };
89         };
90 };
91
92 &pcie {
93         status = "okay";
94 };
95
96 &pcie0 {
97         mt76@0,0 {
98                 reg = <0x0000 0 0 0 0>;
99                 mediatek,mtd-eeprom = <&factory 0x8000>;
100                 ieee80211-freq-limit = <5000000 6000000>;
101         };
102 };
103
104 &wmac {
105         status = "okay";
106         ralink,mtd-eeprom = <&factory 0x4>;
107 };
108
109 &ethernet {
110         mtd-mac-address = <&factory 0x28>;
111 };
112
113 &spi0 {
114         status = "okay";
115
116         m25p80@0 {
117                 compatible = "jedec,spi-nor";
118                 reg = <0>;
119                 spi-max-frequency = <40000000>;
120
121                 partitions {
122                         compatible = "fixed-partitions";
123                         #address-cells = <1>;
124                         #size-cells = <1>;
125
126                         partition@0 {
127                                 label = "u-boot";
128                                 reg = <0x0 0x30000>;
129                                 read-only;
130                         };
131
132                         partition@30000 {
133                                 label = "u-boot-env";
134                                 reg = <0x30000 0x10000>;
135                                 read-only;
136                         };
137
138                         factory: partition@40000 {
139                                 label = "factory";
140                                 reg = <0x40000 0x10000>;
141                                 read-only;
142                         };
143
144                         partition@50000 {
145                                 compatible = "denx,uimage";
146                                 label = "firmware";
147                                 reg = <0x50000 0x7b0000>;
148                         };
149                 };
150         };
151 };