ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_cudy_wr1000.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "cudy,wr1000", "mediatek,mt7628an-soc";
11         model = "Cudy WR1000";
12
13         aliases {
14                 led-boot = &led_wps;
15                 led-failsafe = &led_wps;
16                 led-upgrade = &led_wps;
17                 label-mac-device = &wmac;
18         };
19
20         keys {
21                 compatible = "gpio-keys";
22
23                 reset {
24                         label = "reset";
25                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
26                         linux,code = <KEY_RESTART>;
27                 };
28
29                 wps {
30                         label = "rfkill";
31                         gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
32                         linux,code = <KEY_WPS_BUTTON>;
33                 };
34         };
35
36         leds {
37                 compatible = "gpio-leds";
38
39                 lan1 {
40                         label = "wr1000:blue:lan1";
41                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
42                 };
43
44                 lan2 {
45                         label = "wr1000:blue:lan2";
46                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
47                 };
48
49                 wan {
50                         label = "wr1000:blue:wan";
51                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
52                 };
53
54                 wlan2g {
55                         label = "wr1000:blue:wlan2g";
56                         gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
57                         linux,default-trigger = "phy0tpt";
58                 };
59
60                 led_wps: wps {
61                         label = "wr1000:blue:wps";
62                         gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
63                 };
64         };
65 };
66
67 &spi0 {
68         status = "okay";
69
70         flash@0 {
71                 compatible = "jedec,spi-nor";
72                 reg = <0>;
73                 spi-max-frequency = <10000000>;
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 0x30000>;
83                                 read-only;
84                         };
85
86                         partition@30000 {
87                                 label = "u-boot-env";
88                                 reg = <0x30000 0x10000>;
89                                 read-only;
90                         };
91
92                         factory: partition@40000 {
93                                 label = "factory";
94                                 reg = <0x40000 0x10000>;
95                                 read-only;
96                         };
97
98                         partition@50000 {
99                                 compatible = "denx,uimage";
100                                 label = "firmware";
101                                 reg = <0x50000 0x7b0000>;
102                         };
103                 };
104         };
105 };
106
107 &pinctrl {
108         state_default: pinctrl0 {
109                 gpio {
110                         ralink,group = "i2s", "refclk", "wdt", "p4led_an",
111                                         "p3led_an", "p2led_an", "wled_an";
112                         ralink,function = "gpio";
113                 };
114         };
115 };
116
117 &pcie {
118         status = "okay";
119 };
120
121 &pcie0 {
122         wifi@0,0 {
123                 compatible = "mediatek,mt76";
124                 reg = <0x0000 0 0 0 0>;
125                 mediatek,mtd-eeprom = <&factory 0x8000>;
126                 ieee80211-freq-limit = <5000000 6000000>;
127
128                 led {
129                         led-sources = <2>;
130                         led-active-low;
131                 };
132         };
133 };
134
135 &wmac {
136         status = "okay";
137         ralink,mtd-eeprom = <&factory 0x4>;
138 };
139
140 &ethernet {
141         mtd-mac-address = <&factory 0x28>;
142         mediatek,portmap = "llllw";
143 };