ramips: add support for TRENDnet TEW-810DR
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620a_trendnet_tew-810dr.dts
1 //SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620a.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "trendnet,tew-810dr", "ralink,mt7620a-soc";
11 model = "TRENDnet TEW-810DR";
12
13 aliases {
14 led-boot = &led_power_green;
15 led-failsafe = &led_power_green;
16 led-running = &led_power_green;
17 led-upgrade = &led_power_green;
18 label-mac-device = &ethernet;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "wps";
32 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 led_power_green: power_green {
41 label = "tew-810dr:green:power";
42 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
43 };
44
45 wan_orange {
46 label = "tew-810dr:orange:wan";
47 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
48 };
49
50 wan_green {
51 label = "tew-810dr:green:wan";
52 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
53 };
54
55 power_orange {
56 label = "tew-810dr:orange:power";
57 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
58 };
59 };
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <50000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "u-boot-env";
83 reg = <0x30000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 read-only;
91 };
92
93 factory5g: partition@50000 {
94 label = "factory5g";
95 reg = <0x50000 0x10000>;
96 read-only;
97 };
98
99 partition@60000 {
100 label = "Wolf_Config";
101 reg = <0x60000 0x10000>;
102 read-only;
103 };
104
105 partition@70000 {
106 label = "MyDlink";
107 reg = <0x70000 0x80000>;
108 read-only;
109 };
110
111 partition@f0000 {
112 label = "Jffs2";
113 reg = <0xf0000 0x80000>;
114 read-only;
115 };
116
117 partition@170000 {
118 compatible = "denx,uimage";
119 label = "firmware";
120 reg = <0x170000 0x690000>;
121 };
122 };
123 };
124 };
125
126 &state_default {
127 gpio {
128 groups = "i2c", "uartf", "ephy";
129 function = "gpio";
130 };
131 };
132
133 &ethernet {
134 mtd-mac-address = <&factory 0x28>;
135 mediatek,portmap = "llllw";
136 };
137
138 &gsw {
139 mediatek,port4 = "ephy";
140 };
141
142 &pcie {
143 status = "okay";
144 };
145
146 &wmac {
147 pinctrl-names = "default";
148 pinctrl-0 = <&pa_pins>;
149
150 ralink,mtd-eeprom = <&factory 0x0>;
151 mtd-mac-address = <&factory 0x28>;
152 };
153
154 &pcie0 {
155 wifi@0,0 {
156 reg = <0x0000 0 0 0 0>;
157 mediatek,mtd-eeprom = <&factory 0x8000>;
158 ieee80211-freq-limit = <5000000 6000000>;
159 mtd-mac-address = <&factory 0x28>;
160 mtd-mac-address-increment = <2>;
161 };
162 };
163
164 &gpio2 {
165 status = "okay";
166 };