ramips: move dts-v1 statement to top-level DTSI files
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_edimax_re23s.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 = "edimax,re23s", "mediatek,mt7621-soc";
10 model = "Edimax RE23S";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_wifi_red;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power: power {
24 label = "re23s:green:power";
25 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
26 };
27
28 wifi_green {
29 label = "re23s:green:wifi";
30 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
31 };
32
33 wifi_amber {
34 label = "re23s:amber:wifi";
35 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
36 };
37
38 led_wifi_red: wifi_red {
39 label = "re23s:red:wifi";
40 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_WPS_BUTTON>;
57 };
58 };
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <50000000>;
68 m25p,fast-read;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "bootloader";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "config";
83 reg = <0x30000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 read-only;
91 };
92
93 partition@50000 {
94 label = "cimage";
95 reg = <0x50000 0x20000>;
96 read-only;
97 };
98
99 partition@70000 {
100 compatible = "edimax,uimage";
101 label = "firmware";
102 reg = <0x70000 0xf50000>;
103 };
104
105 partition@fc0000 {
106 label = "freespace";
107 reg = <0xfc0000 0x40000>;
108 read-only;
109 };
110 };
111 };
112 };
113
114 &pcie {
115 status = "okay";
116 };
117
118 &pcie0 {
119 wifi@0,0 {
120 compatible = "mediatek,mt76";
121 reg = <0x0000 0 0 0 0>;
122 mediatek,mtd-eeprom = <&factory 0x0>;
123 ieee80211-freq-limit = <2400000 2500000>;
124 };
125 };
126
127 &pcie1 {
128 wifi@0,0 {
129 compatible = "mediatek,mt76";
130 reg = <0x0000 0 0 0 0>;
131 mediatek,mtd-eeprom = <&factory 0x8000>;
132 ieee80211-freq-limit = <5000000 6000000>;
133 };
134 };
135
136 &gmac0 {
137 mtd-mac-address = <&factory 0x8004>;
138 };
139
140 &switch0 {
141 ports {
142 port@4 {
143 status = "okay";
144 label = "lan";
145 };
146 };
147 };
148
149 &state_default {
150 gpio {
151 groups = "uart3", "uart2", "jtag", "wdt";
152 function = "gpio";
153 };
154 };
155
156 &xhci {
157 status = "disabled";
158 };