ramips: move dts-v1 statement to top-level DTSI files
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_tplink_tl-wr841n-v14.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wr841n-v14", "mediatek,mt7628an-soc";
10 model = "TP-Link TL-WR841N v14";
11
12 aliases {
13 led-boot = &led_wlan;
14 led-failsafe = &led_wlan;
15 led-upgrade = &led_wlan;
16
17 led-wlan = &led_wlan;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 lan {
38 label = "tl-wr841n-v14:green:lan";
39 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
40 };
41
42 wan_green {
43 label = "tl-wr841n-v14:green:wan";
44 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
45 };
46
47 led_wlan: wlan {
48 label = "tl-wr841n-v14:green:wlan";
49 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "phy0tpt";
51 };
52
53 wan_orange {
54 label = "tl-wr841n-v14:orange:wan";
55 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
56 };
57 };
58 };
59
60 &spi0 {
61 status = "okay";
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <10000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "boot";
75 reg = <0x0 0x10000>;
76 read-only;
77 };
78
79 partition@10000 {
80 compatible = "tplink,firmware";
81 label = "firmware";
82 reg = <0x10000 0x3e0000>;
83 };
84
85 factory: partition@3f0000 {
86 label = "factory";
87 reg = <0x3f0000 0x10000>;
88 read-only;
89 };
90 };
91 };
92 };
93
94 &ehci {
95 status = "disabled";
96 };
97
98 &ohci {
99 status = "disabled";
100 };
101
102 &wmac {
103 status = "okay";
104
105 mtd-mac-address = <&factory 0xf100>;
106 };
107
108 &ethernet {
109 mtd-mac-address = <&factory 0xf100>;
110 };
111
112 &esw {
113 mediatek,portmap = <0x3e>;
114 };
115
116 &state_default {
117 gpio {
118 groups = "p4led_an", "p3led_an", "p2led_an", "p1led_an", "p0led_an", "wdt";
119 function = "gpio";
120 };
121 };
122
123 &gpio {
124 led_wlan_enable {
125 gpio-hog;
126 gpios = <43 GPIO_ACTIVE_HIGH>;
127 output-high;
128 };
129 };