ramips: mt76x8: fix bogus mediatek,portmap
[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";
27
28                 reset {
29                         label = "reset";
30                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
31                         linux,code = <KEY_RESTART>;
32                 };
33         };
34
35         leds {
36                 compatible = "gpio-leds";
37
38                 lan {
39                         label = "tl-wr841n-v14:green:lan";
40                         gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
41                 };
42
43                 wan_green {
44                         label = "tl-wr841n-v14:green:wan";
45                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
46                 };
47
48                 led_wlan: wlan {
49                         label = "tl-wr841n-v14:green:wlan";
50                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
51                         linux,default-trigger = "phy0tpt";
52                 };
53
54                 wan_orange {
55                         label = "tl-wr841n-v14:orange:wan";
56                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
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 = <10000000>;
68                 m25p,chunked-io = <32>;
69
70                 partitions {
71                         compatible = "fixed-partitions";
72                         #address-cells = <1>;
73                         #size-cells = <1>;
74
75                         partition@0 {
76                                 label = "boot";
77                                 reg = <0x0 0x10000>;
78                                 read-only;
79                         };
80
81                         partition@10000 {
82                                 compatible = "tplink,firmware";
83                                 label = "firmware";
84                                 reg = <0x10000 0x3e0000>;
85                         };
86
87                         factory: partition@3f0000 {
88                                 label = "factory";
89                                 reg = <0x3f0000 0x10000>;
90                                 read-only;
91                         };
92                 };
93         };
94 };
95
96 &ehci {
97         status = "disabled";
98 };
99
100 &ohci {
101         status = "disabled";
102 };
103
104 &wmac {
105         status = "okay";
106         mtd-mac-address = <&factory 0xf100>;
107         mediatek,mtd-eeprom = <&factory 0x10000>;
108 };
109
110 &ethernet {
111         mtd-mac-address = <&factory 0xf100>;
112 };
113
114 &esw {
115         mediatek,portmap = <0x3e>;
116 };
117
118 &state_default {
119         gpio {
120                 ralink,group = "p4led_an", "p3led_an", "p2led_an", "p1led_an", "p0led_an", "wdt";
121                 ralink,function = "gpio";
122         };
123 };
124
125 &gpio1 {
126         led_wlan_enable {
127                 gpio-hog;
128                 gpios = <11 GPIO_ACTIVE_HIGH>;
129                 output-high;
130         };
131 };