ramips: add support for I-O DATA WN-DEAX1800GR
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_renkforce_ws-wn530hp3-a.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 = "renkforce,ws-wn530hp3-a", "mediatek,mt7621-soc";
10 model = "Renkforce WS-WN530HP3-A";
11
12 aliases {
13 label-mac-device = &gmac0;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_RESTART>;
27 };
28 };
29
30 leds {
31 compatible = "gpio-leds";
32
33 led_power: led_1 {
34 label = "red:led1";
35 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
36 };
37
38 led_2 {
39 label = "blue:led2";
40 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
41 };
42 };
43 };
44
45 &spi0 {
46 status = "okay";
47
48 flash@0 {
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <40000000>;
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@40000 {
71 label = "factory";
72 reg = <0x40000 0x10000>;
73 read-only;
74 };
75
76 partition@50000 {
77 compatible = "denx,uimage";
78 label = "firmware";
79 reg = <0x50000 0xf30000>;
80 };
81 };
82 };
83 };
84
85 &pcie {
86 status = "okay";
87 };
88
89 &pcie0 {
90 wifi0: wifi@0,0 {
91 compatible = "mediatek,mt76";
92 reg = <0x0000 0 0 0 0>;
93 mediatek,mtd-eeprom = <&factory 0x0000>;
94 ieee80211-freq-limit = <2400000 2500000>;
95 nvmem-cells = <&macaddr_factory_4>;
96 nvmem-cell-names = "mac-address";
97 };
98 };
99
100 &pcie1 {
101 wifi1: wifi@0,0 {
102 compatible = "mediatek,mt76";
103 reg = <0x0000 0 0 0 0>;
104 mediatek,mtd-eeprom = <&factory 0x8000>;
105 ieee80211-freq-limit = <5000000 6000000>;
106 nvmem-cells = <&macaddr_factory_4>;
107 nvmem-cell-names = "mac-address";
108 mac-address-increment = <1>;
109 };
110 };
111
112 &gmac0 {
113 nvmem-cells = <&macaddr_factory_4>;
114 nvmem-cell-names = "mac-address";
115 mac-address-increment = <(-2)>;
116 };
117
118 &gmac1 {
119 status = "okay";
120 label = "wan";
121 phy-handle = <&ethphy4>;
122
123 nvmem-cells = <&macaddr_factory_4>;
124 nvmem-cell-names = "mac-address";
125 mac-address-increment = <(-1)>;
126 };
127
128 &mdio {
129 ethphy4: ethernet-phy@4 {
130 reg = <4>;
131 };
132 };
133
134 &switch0 {
135 ports {
136 port@0 {
137 status = "okay";
138 label = "lan2";
139 };
140
141 port@1 {
142 status = "okay";
143 label = "lan1";
144 };
145 };
146 };
147
148 &state_default {
149 gpio {
150 groups = "uart2", "jtag", "wdt";
151 function = "gpio";
152 };
153 };
154
155 &xhci {
156 status = "disabled";
157 };
158
159 &factory {
160 compatible = "nvmem-cells";
161 #address-cells = <1>;
162 #size-cells = <1>;
163
164 macaddr_factory_4: macaddr@4 {
165 reg = <0x4 0x6>;
166 };
167 };