ramips: Add support for Cudy WR1300 v3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_unielec_u7621-01.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 compatible = "unielec,u7621-01", "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_status;
13 led-failsafe = &led_status;
14 led-running = &led_status;
15 led-upgrade = &led_status;
16 };
17
18 gpio-export {
19 compatible = "gpio-export";
20 #size-cells = <0>;
21
22 modem_reset {
23 gpio-export,name = "modem_reset";
24 gpio-export,output = <1>;
25 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
26 };
27 };
28
29 keys {
30 compatible = "gpio-keys";
31
32 reset {
33 label = "reset";
34 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_RESTART>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_status: status {
43 label = "green:status";
44 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
45 };
46 };
47 };
48
49 &pcie {
50 status = "okay";
51 };
52
53 &pcie0 {
54 wifi@0,0 {
55 compatible = "mediatek,mt76";
56 reg = <0x0000 0 0 0 0>;
57 nvmem-cells = <&eeprom_factory_0>;
58 nvmem-cell-names = "eeprom";
59 ieee80211-freq-limit = <2400000 2500000>;
60 };
61 };
62
63 &pcie1 {
64 wifi@0,0 {
65 compatible = "mediatek,mt76";
66 reg = <0x0000 0 0 0 0>;
67 nvmem-cells = <&eeprom_factory_8000>;
68 nvmem-cell-names = "eeprom";
69 ieee80211-freq-limit = <5000000 6000000>;
70
71 led {
72 led-sources = <2>;
73 };
74 };
75 };
76
77 &gmac1 {
78 status = "okay";
79 label = "wan";
80 phy-handle = <&ethphy0>;
81 };
82
83 &mdio {
84 ethphy0: ethernet-phy@0 {
85 reg = <0>;
86 };
87 };
88
89 &switch0 {
90 ports {
91 port@1 {
92 status = "okay";
93 label = "lan1";
94 };
95
96 port@2 {
97 status = "okay";
98 label = "lan2";
99 };
100
101 port@3 {
102 status = "okay";
103 label = "lan3";
104 };
105
106 port@4 {
107 status = "okay";
108 label = "lan4";
109 };
110 };
111 };
112
113 &state_default {
114 gpio {
115 groups = "jtag", "uart2", "wdt";
116 function = "gpio";
117 };
118 };