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