ramips: add support for EnGenius ESR600
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_tplink_tl-wr841n-v14.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 = "tplink,tl-wr841n-v14", "mediatek,mt7628an-soc";
11         model = "TP-Link TL-WR841N v14";
12
13         aliases {
14                 led-boot = &led_wlan;
15                 led-failsafe = &led_wlan;
16                 led-upgrade = &led_wlan;
17
18                 led-wlan = &led_wlan;
19         };
20
21         chosen {
22                 bootargs = "console=ttyS0,115200";
23         };
24
25         keys {
26                 compatible = "gpio-keys-polled";
27                 poll-interval = <20>;
28
29                 reset {
30                         label = "reset";
31                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
32                         linux,code = <KEY_RESTART>;
33                 };
34         };
35
36         leds {
37                 compatible = "gpio-leds";
38
39                 lan {
40                         label = "tl-wr841n-v14:green:lan";
41                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
42                 };
43
44                 wan_green {
45                         label = "tl-wr841n-v14:green:wan";
46                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
47                 };
48
49                 led_wlan: wlan {
50                         label = "tl-wr841n-v14:green:wlan";
51                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
52                         linux,default-trigger = "phy0tpt";
53                 };
54
55                 wan_orange {
56                         label = "tl-wr841n-v14:orange:wan";
57                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
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 = <10000000>;
69                 m25p,chunked-io = <32>;
70
71                 partitions {
72                         compatible = "fixed-partitions";
73                         #address-cells = <1>;
74                         #size-cells = <1>;
75
76                         partition@0 {
77                                 label = "boot";
78                                 reg = <0x0 0x10000>;
79                                 read-only;
80                         };
81
82                         partition@10000 {
83                                 compatible = "tplink,firmware";
84                                 label = "firmware";
85                                 reg = <0x10000 0x3e0000>;
86                         };
87
88                         factory: partition@3f0000 {
89                                 label = "factory";
90                                 reg = <0x3f0000 0x10000>;
91                                 read-only;
92                         };
93                 };
94         };
95 };
96
97 &ehci {
98         status = "disabled";
99 };
100
101 &ohci {
102         status = "disabled";
103 };
104
105 &wmac {
106         status = "okay";
107         mtd-mac-address = <&factory 0xf100>;
108         mediatek,mtd-eeprom = <&factory 0x10000>;
109 };
110
111 &ethernet {
112         mtd-mac-address = <&factory 0xf100>;
113         mediatek,portmap = "wllll";
114 };
115
116 &pinctrl {
117         state_default: pinctrl0 {
118                 gpio {
119                         ralink,group = "p4led_an", "p3led_an", "p2led_an", "p1led_an", "p0led_an", "wdt";
120                         ralink,function = "gpio";
121                 };
122         };
123 };
124
125 &gpio1 {
126         led_wlan_enable {
127                 gpio-hog;
128                 gpios = <11 GPIO_ACTIVE_HIGH>;
129                 output-high;
130         };
131 };