ramips: reset mt7620 ethernet phy via reset controller
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_wac104.dts
1 // SPDX-License-Identifier: GPL-2.0-only 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 = "netgear,wac104", "mediatek,mt7621-soc";
10 model = "Netgear WAC104";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac0;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 wps {
24 label = "wps";
25 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 wifi {
30 label = "wifi";
31 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RFKILL>;
33 };
34
35 reset {
36 label = "reset";
37 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 };
41
42 leds {
43 compatible = "gpio-leds";
44
45 wps {
46 label = "green:wps";
47 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
48 };
49
50 led_power: power {
51 label = "green:power";
52 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
53 };
54
55 wifi {
56 label = "green:wifi";
57 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60 };
61 };
62
63 &gmac0 {
64 nvmem-cells = <&macaddr_factory_4>;
65 nvmem-cell-names = "mac-address";
66 };
67
68 &nand {
69 status = "okay";
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x0 0x100000>;
79 read-only;
80 };
81
82 partition@100000 {
83 label = "SC PID";
84 reg = <0x100000 0x100000>;
85 read-only;
86 };
87
88 partition@200000 {
89 label = "kernel";
90 reg = <0x200000 0x400000>;
91 };
92
93 partition@600000 {
94 label = "ubi";
95 reg = <0x600000 0x1c00000>;
96 };
97
98 factory: partition@2e00000 {
99 label = "factory";
100 reg = <0x2e00000 0x100000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x400>;
110 };
111
112 eeprom_factory_8000: eeprom@8000 {
113 reg = <0x8000 0x200>;
114 };
115
116 macaddr_factory_4: macaddr@4 {
117 reg = <0x4 0x6>;
118 };
119 };
120 };
121
122 partition@4200000 {
123 label = "reserved";
124 reg = <0x4200000 0x3c00000>;
125 read-only;
126 };
127 };
128 };
129
130 &pcie {
131 status = "okay";
132 };
133
134 &pcie0 {
135 wifi@0,0 {
136 compatible = "mediatek,mt76";
137 reg = <0x0 0 0 0 0>;
138 nvmem-cells = <&eeprom_factory_8000>;
139 nvmem-cell-names = "eeprom";
140 ieee80211-freq-limit = <5000000 6000000>;
141 };
142 };
143
144 &pcie2 {
145 wifi@0,0 {
146 compatible = "mediatek,mt76";
147 reg = <0x0 0 0 0 0>;
148 nvmem-cells = <&eeprom_factory_0>;
149 nvmem-cell-names = "eeprom";
150 ieee80211-freq-limit = <2400000 2500000>;
151 };
152 };
153
154 &state_default {
155 gpio {
156 groups = "uart3", "jtag", "wdt";
157 function = "gpio";
158 };
159 };
160
161 &gmac1 {
162 status = "okay";
163 label = "lan4";
164 phy-handle = <&ethphy0>;
165
166 nvmem-cells = <&macaddr_factory_4>;
167 nvmem-cell-names = "mac-address";
168 };
169
170 &mdio {
171 ethphy0: ethernet-phy@0 {
172 reg = <0>;
173 };
174 };
175
176 &switch0 {
177 ports {
178 port@1 {
179 status = "okay";
180 label = "lan3";
181 };
182
183 port@2 {
184 status = "okay";
185 label = "lan2";
186 };
187
188 port@3 {
189 status = "okay";
190 label = "lan1";
191 };
192 };
193 };
194
195 &xhci {
196 status = "disabled";
197 };