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