f2f0a4c56f68905b574dd2ccee7c931e037dd65a
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dir-8xx-a1.dtsi
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 aliases {
10 label-mac-device = &gmac0;
11 };
12
13 chosen {
14 bootargs = "console=ttyS0,57600";
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_RESTART>;
24 };
25
26 wps {
27 label = "wps";
28 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_WPS_BUTTON>;
30 };
31
32 wifi {
33 label = "wifi";
34 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RFKILL>;
36 };
37 };
38 };
39
40 &spi0 {
41 status = "okay";
42
43 flash@0 {
44 compatible = "jedec,spi-nor";
45 reg = <0>;
46 spi-max-frequency = <50000000>;
47
48 partitions {
49 compatible = "fixed-partitions";
50 #address-cells = <1>;
51 #size-cells = <1>;
52
53 partition@0 {
54 label = "u-boot";
55 reg = <0x0 0x30000>;
56 read-only;
57 };
58
59 partition@30000 {
60 label = "u-boot-env";
61 reg = <0x30000 0x10000>;
62 read-only;
63 };
64
65 factory: partition@40000 {
66 label = "factory";
67 reg = <0x40000 0x20000>;
68 read-only;
69 };
70
71 partition@60000 {
72 compatible = "sge,uimage";
73 label = "firmware";
74 reg = <0x60000 0xfa0000>;
75 };
76 };
77 };
78 };
79
80 &pcie {
81 status = "okay";
82 };
83
84 &pcie0 {
85 wifi@0,0 {
86 compatible = "mediatek,mt76";
87 reg = <0x0000 0 0 0 0>;
88 mediatek,mtd-eeprom = <&factory 0x0000>;
89 ieee80211-freq-limit = <2400000 2500000>;
90
91 led {
92 led-active-low;
93 };
94 };
95 };
96
97 &pcie1 {
98 wifi@0,0 {
99 compatible = "mediatek,mt76";
100 reg = <0x0000 0 0 0 0>;
101 mediatek,mtd-eeprom = <&factory 0x8000>;
102 ieee80211-freq-limit = <5000000 6000000>;
103
104 led {
105 led-active-low;
106 };
107 };
108 };
109
110 &gmac0 {
111 mtd-mac-address = <&factory 0xe000>;
112 };
113
114 &switch0 {
115 ports {
116 port@0 {
117 status = "okay";
118 label = "lan4";
119 };
120
121 port@1 {
122 status = "okay";
123 label = "lan3";
124 };
125
126 port@2 {
127 status = "okay";
128 label = "lan2";
129 };
130
131 port@3 {
132 status = "okay";
133 label = "lan1";
134 };
135
136 port@4 {
137 status = "okay";
138 label = "wan";
139 mtd-mac-address = <&factory 0xe006>;
140 };
141 };
142 };
143
144 &state_default {
145 gpio {
146 groups = "i2c", "uart3", "jtag", "wdt";
147 function = "gpio";
148 };
149 };