ramips: add support for EnGenius ESR600
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_iptime_a604m.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 = "iptime,a604m", "mediatek,mt7628an-soc";
11         model = "ipTIME A604M";
12
13         aliases {
14                 led-boot = &led_cpu;
15                 led-failsafe = &led_cpu;
16                 led-running = &led_cpu;
17                 led-upgrade = &led_cpu;
18                 label-mac-device = &ethernet;
19         };
20
21         leds {
22                 compatible = "gpio-leds";
23
24                 wlan5g {
25                         label = "a604m:blue:wlan5g";
26                         gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
27                         linux,default-trigger = "phy1tpt";
28                 };
29
30                 led_cpu: cpu {
31                         label = "a604m:blue:cpu";
32                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
33                 };
34
35                 wlan2g {
36                         label = "a604m:blue:wlan2g";
37                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
38                         linux,default-trigger = "phy0tpt";
39                 };
40         };
41
42         keys {
43                 compatible = "gpio-keys";
44
45                 reset {
46                         label = "reset";
47                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
48                         linux,code = <KEY_RESTART>;
49                         debounce-interval = <60>;
50                 };
51
52                 wps {
53                         label = "wps";
54                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
55                         linux,code = <KEY_WPS_BUTTON>;
56                         debounce-interval = <60>;
57                 };
58         };
59 };
60
61 &spi0 {
62         status = "okay";
63
64         flash@0 {
65                 compatible = "jedec,spi-nor";
66                 reg = <0>;
67                 spi-max-frequency = <40000000>;
68
69                 partitions {
70                         compatible = "fixed-partitions";
71                         #address-cells = <1>;
72                         #size-cells = <1>;
73
74                         uboot: partition@0 {
75                                 label = "u-boot";
76                                 reg = <0x0 0x20000>;
77                                 read-only;
78                         };
79
80                         partition@20000 {
81                                 label = "config";
82                                 reg = <0x20000 0x10000>;
83                                 read-only;
84                         };
85
86                         factory: partition@30000 {
87                                 label = "factory";
88                                 reg = <0x30000 0x10000>;
89                                 read-only;
90                         };
91
92                         partition@40000 {
93                                 compatible = "denx,uimage";
94                                 label = "firmware";
95                                 reg = <0x40000 0x7c0000>;
96                         };
97                 };
98         };
99 };
100
101 &pinctrl {
102         state_default: pinctrl0 {
103                 gpio {
104                         ralink,group = "i2c", "uart1", "wdt";
105                         ralink,function = "gpio";
106                 };
107         };
108 };
109
110 &ehci {
111         status = "disabled";
112 };
113
114 &ohci {
115         status = "disabled";
116 };
117
118 &ethernet {
119         mtd-mac-address = <&uboot 0x1fc20>;
120 };
121
122 &pcie {
123         status = "okay";
124 };
125
126 &pcie0 {
127         wifi@0,0 {
128                 compatible = "mediatek,mt76";
129                 reg = <0x0000 0 0 0 0>;
130                 mediatek,mtd-eeprom = <&factory 0x8000>;
131                 ieee80211-freq-limit = <5000000 6000000>;
132         };
133 };
134
135 &wmac {
136         status = "okay";
137 };