ramips: move dts-v1 statement to top-level DTSI files
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_edimax_rx21s.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 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21
22 wps {
23 label = "wps";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27 };
28 };
29
30 &spi0 {
31 status = "okay";
32
33 flash@0 {
34 compatible = "jedec,spi-nor";
35 reg = <0>;
36 spi-max-frequency = <40000000>;
37
38 partitions {
39 compatible = "fixed-partitions";
40 #address-cells = <1>;
41 #size-cells = <1>;
42
43 partition@0 {
44 label = "u-boot";
45 reg = <0x0 0x30000>;
46 read-only;
47 };
48
49 partition@30000 {
50 label = "u-boot-env";
51 reg = <0x30000 0x10000>;
52 read-only;
53 };
54
55 factory: partition@40000 {
56 label = "factory";
57 reg = <0x40000 0x10000>;
58 read-only;
59 };
60
61 partition@50000 {
62 compatible = "denx,uimage";
63 label = "firmware";
64 reg = <0x50000 0xfb0000>;
65 };
66 };
67 };
68 };
69
70 &pcie {
71 status = "okay";
72 };
73
74 &pcie0 {
75 wifi0: wifi@0,0 {
76 compatible = "mediatek,mt76";
77 reg = <0x0000 0 0 0 0>;
78 mediatek,mtd-eeprom = <&factory 0x0000>;
79 ieee80211-freq-limit = <2400000 2500000>;
80 };
81 };
82
83 &pcie1 {
84 wifi1: wifi@0,0 {
85 compatible = "mediatek,mt76";
86 reg = <0x0000 0 0 0 0>;
87 mediatek,mtd-eeprom = <&factory 0x8000>;
88 ieee80211-freq-limit = <5000000 6000000>;
89 };
90 };
91
92 &gmac0 {
93 mtd-mac-address = <&factory 0x4>;
94 };
95
96 &switch0 {
97 ports {
98 port@0 {
99 status = "okay";
100 label = "wan";
101 };
102
103 port@1 {
104 status = "okay";
105 label = "lan4";
106 };
107
108 port@2 {
109 status = "okay";
110 label = "lan3";
111 };
112
113 port@3 {
114 status = "okay";
115 label = "lan2";
116 };
117
118 port@4 {
119 status = "okay";
120 label = "lan1";
121 };
122 };
123 };
124
125 &state_default {
126 gpio {
127 groups = "uart3", "uart2", "jtag", "wdt";
128 function = "gpio";
129 };
130 };
131
132 &xhci {
133 status = "disabled";
134 };