ramips: mt7621: add support for NETGEAR WAC104
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_netgear_wac104.dts
1 // SPDX-License-Identifier: GPL-2.0 or MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "netgear,wac104", "mediatek,mt7621-soc";
11         model = "Netgear WAC104";
12
13         aliases {
14                 led-boot = &led_power;
15                 led-failsafe = &led_power;
16                 led-running = &led_power;
17                 led-upgrade = &led_power;
18                 label-mac-device = &gmac0;
19         };
20
21         chosen {
22                 bootargs = "console=ttyS0,57600";
23         };
24
25         keys {
26                 compatible = "gpio-keys";
27
28                 wps {
29                         label = "wps";
30                         gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
31                         linux,code = <KEY_WPS_BUTTON>;
32                 };
33
34                 wifi {
35                         label = "wifi";
36                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
37                         linux,code = <KEY_RFKILL>;
38                 };
39
40                 reset {
41                         label = "reset";
42                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
43                         linux,code = <KEY_RESTART>;
44                 };
45         };
46
47         leds {
48                 compatible = "gpio-leds";
49
50                 wps {
51                         label = "wac104:green:wps";
52                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
53                 };
54
55                 led_power: power {
56                         label = "wac104:green:power";
57                         gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
58                 };
59
60                 wifi {
61                         label = "wac104:green:wifi";
62                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
63                         linux,default-trigger = "phy0tpt";
64                 };
65         };
66 };
67
68 &gmac0 {
69         mtd-mac-address = <&factory 0x4>;
70 };
71
72 &nand {
73         status = "okay";
74
75         partitions {
76                 compatible = "fixed-partitions";
77                 #address-cells = <1>;
78                 #size-cells = <1>;
79
80                 partition@0 {
81                         label = "u-boot";
82                         reg = <0x0 0x100000>;
83                         read-only;
84                 };
85
86                 partition@100000 {
87                         label = "SC PID";
88                         reg = <0x100000 0x100000>;
89                         read-only;
90                 };
91
92                 partition@200000 {
93                         label = "kernel";
94                         reg = <0x200000 0x400000>;
95                 };
96
97                 partition@600000 {
98                         label = "ubi";
99                         reg = <0x600000 0x1c00000>;
100                 };
101
102                 factory: partition@2e00000 {
103                         label = "factory";
104                         reg = <0x2e00000 0x100000>;
105                         read-only;
106                 };
107
108                 partition@4200000 {
109                         label = "reserved";
110                         reg = <0x4200000 0x3c00000>;
111                         read-only;
112                 };
113         };
114 };
115
116 &pcie {
117         status = "okay";
118 };
119
120 &pcie0 {
121         wifi@0,0 {
122                 compatible = "mediatek,mt76";
123                 reg = <0x0 0 0 0 0>;
124                 mediatek,mtd-eeprom = <&factory 0x8000>;
125                 ieee80211-freq-limit = <5000000 6000000>;
126         };
127 };
128
129 &pcie1 {
130         wifi@0,0 {
131                 compatible = "mediatek,mt76";
132                 reg = <0x0 0 0 0 0>;
133                 mediatek,mtd-eeprom = <&factory 0x0>;
134                 ieee80211-freq-limit = <2400000 2500000>;
135         };
136 };
137
138 &state_default {
139         gpio {
140                 groups = "uart3", "jtag", "wdt";
141                 function = "gpio";
142         };
143 };
144
145 &switch0 {
146         ports {
147                 port@0 {
148                         status = "okay";
149                         label = "lan4";
150                 };
151
152                 port@1 {
153                         status = "okay";
154                         label = "lan3";
155                 };
156
157                 port@2 {
158                         status = "okay";
159                         label = "lan2";
160                 };
161
162                 port@3 {
163                         status = "okay";
164                         label = "lan1";
165                 };
166         };
167 };
168
169 &xhci {
170         status = "disabled";
171 };