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