fe04648f0e24b9f948c5f9df028940dfd725bba0
[openwrt/staging/hauke.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 factory: partition@40000 {
67 compatible = "nvmem-cells";
68 label = "factory";
69 reg = <0x40000 0x10000>;
70 #address-cells = <1>;
71 #size-cells = <1>;
72 read-only;
73
74 eeprom_factory_0: eeprom@0 {
75 reg = <0x0 0x4da8>;
76 };
77
78 eeprom_factory_8000: eeprom@8000 {
79 reg = <0x8000 0x4da8>;
80 };
81
82 macaddr_factory_e00c: macaddr@e00c {
83 reg = <0xe00c 0x6>;
84 };
85 };
86
87 partition@50000 {
88 compatible = "denx,uimage";
89 label = "firmware";
90 reg = <0x50000 0xfb0000>;
91 };
92 };
93 };
94 };
95
96 &pcie {
97 status = "okay";
98 };
99
100 &pcie0 {
101 wifi@0,0 {
102 compatible = "mediatek,mt76";
103 reg = <0x0000 0 0 0 0>;
104 nvmem-cells = <&eeprom_factory_0>;
105 nvmem-cell-names = "eeprom";
106 ieee80211-freq-limit = <2400000 2500000>;
107 };
108 };
109
110 &pcie1 {
111 wifi@0,0 {
112 compatible = "mediatek,mt76";
113 reg = <0x0000 0 0 0 0>;
114 nvmem-cells = <&eeprom_factory_8000>;
115 nvmem-cell-names = "eeprom";
116 ieee80211-freq-limit = <5000000 6000000>;
117 };
118 };
119
120 &gmac0 {
121 nvmem-cells = <&macaddr_factory_e00c>;
122 nvmem-cell-names = "mac-address";
123 };
124
125 &gmac1 {
126 status = "okay";
127 label = "wan";
128 phy-handle = <&ethphy4>;
129
130 nvmem-cells = <&macaddr_factory_e00c>;
131 nvmem-cell-names = "mac-address";
132 mac-address-increment = <1>;
133 };
134
135 &mdio {
136 ethphy4: ethernet-phy@4 {
137 reg = <4>;
138 };
139 };
140
141 &switch0 {
142 ports {
143 port@0 {
144 status = "okay";
145 label = "lan1";
146 };
147
148 port@1 {
149 status = "okay";
150 label = "lan2";
151 };
152
153 port@2 {
154 status = "okay";
155 label = "lan3";
156 };
157
158 port@3 {
159 status = "okay";
160 label = "lan4";
161 };
162 };
163 };
164
165 &state_default {
166 gpio {
167 groups = "i2c", "uart3", "wdt";
168 function = "gpio";
169 };
170 };