gperf: build as C++11
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_adslr_g7.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "adslr,g7", "mediatek,mt7621-soc";
10 model = "ADSLR G7";
11
12 aliases {
13 led-boot = &led_sys;
14 led-failsafe = &led_sys;
15 led-running = &led_sys;
16 led-upgrade = &led_sys;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_sys: sys {
24 label = "blue:sys";
25 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
26 };
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
35 debounce-interval = <60>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39 };
40
41 &spi0 {
42 status = "okay";
43
44 flash@0 {
45 compatible = "jedec,spi-nor";
46 reg = <0>;
47 spi-max-frequency = <40000000>;
48
49 partitions {
50 compatible = "fixed-partitions";
51 #address-cells = <1>;
52 #size-cells = <1>;
53
54 partition@0 {
55 label = "u-boot";
56 reg = <0x0 0x30000>;
57 read-only;
58 };
59
60 partition@30000 {
61 label = "u-boot-env";
62 reg = <0x30000 0x10000>;
63 read-only;
64 };
65
66 partition@40000 {
67 label = "factory";
68 reg = <0x40000 0x10000>;
69 read-only;
70
71 nvmem-layout {
72 compatible = "fixed-layout";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 eeprom_factory_0: eeprom@0 {
77 reg = <0x0 0x4da8>;
78 };
79
80 eeprom_factory_8000: eeprom@8000 {
81 reg = <0x8000 0x4da8>;
82 };
83
84 macaddr_factory_e00c: macaddr@e00c {
85 compatible = "mac-base";
86 reg = <0xe00c 0x6>;
87 #nvmem-cell-cells = <1>;
88 };
89 };
90 };
91
92 partition@50000 {
93 compatible = "denx,uimage";
94 label = "firmware";
95 reg = <0x50000 0xfb0000>;
96 };
97 };
98 };
99 };
100
101 &pcie {
102 status = "okay";
103 };
104
105 &pcie0 {
106 wifi@0,0 {
107 compatible = "mediatek,mt76";
108 reg = <0x0000 0 0 0 0>;
109 nvmem-cells = <&eeprom_factory_0>;
110 nvmem-cell-names = "eeprom";
111 ieee80211-freq-limit = <2400000 2500000>;
112 };
113 };
114
115 &pcie1 {
116 wifi@0,0 {
117 compatible = "mediatek,mt76";
118 reg = <0x0000 0 0 0 0>;
119 nvmem-cells = <&eeprom_factory_8000>;
120 nvmem-cell-names = "eeprom";
121 ieee80211-freq-limit = <5000000 6000000>;
122 };
123 };
124
125 &gmac0 {
126 nvmem-cells = <&macaddr_factory_e00c 0>;
127 nvmem-cell-names = "mac-address";
128 };
129
130 &gmac1 {
131 status = "okay";
132 label = "wan";
133 phy-handle = <&ethphy4>;
134
135 nvmem-cells = <&macaddr_factory_e00c 1>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &mdio {
140 ethphy4: ethernet-phy@4 {
141 reg = <4>;
142 };
143 };
144
145 &switch0 {
146 ports {
147 port@0 {
148 status = "okay";
149 label = "lan1";
150 };
151
152 port@1 {
153 status = "okay";
154 label = "lan2";
155 };
156
157 port@2 {
158 status = "okay";
159 label = "lan3";
160 };
161
162 port@3 {
163 status = "okay";
164 label = "lan4";
165 };
166 };
167 };
168
169 &state_default {
170 gpio {
171 groups = "i2c", "uart3", "wdt";
172 function = "gpio";
173 };
174 };