ramips/mt76x8: Name DTS files based on scheme
[openwrt/staging/wigyori.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 memory@0 {
26 device_type = "memory";
27 reg = <0x0 0x2000000>;
28 };
29
30 keys {
31 compatible = "gpio-keys-polled";
32 poll-interval = <20>;
33
34 reset {
35 label = "reset";
36 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_RESTART>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 lan {
45 label = "tl-wr841n-v14:green:lan";
46 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
47 };
48
49 wan_green {
50 label = "tl-wr841n-v14:green:wan";
51 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
52 };
53
54 led_wlan: wlan {
55 label = "tl-wr841n-v14:green:wlan";
56 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
57 linux,default-trigger = "phy0tpt";
58 };
59
60 wan_orange {
61 label = "tl-wr841n-v14:orange:wan";
62 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
63 };
64 };
65 };
66
67 &spi0 {
68 status = "okay";
69
70 flash@0 {
71 compatible = "jedec,spi-nor";
72 reg = <0>;
73 spi-max-frequency = <10000000>;
74 m25p,chunked-io = <32>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "boot";
83 reg = <0x0 0x10000>;
84 read-only;
85 };
86
87 partition@10000 {
88 compatible = "tplink,firmware";
89 label = "firmware";
90 reg = <0x10000 0x3e0000>;
91 };
92
93 factory: partition@3f0000 {
94 label = "factory";
95 reg = <0x3f0000 0x10000>;
96 read-only;
97 };
98 };
99 };
100 };
101
102 &ehci {
103 status = "disabled";
104 };
105
106 &ohci {
107 status = "disabled";
108 };
109
110 &wmac {
111 status = "okay";
112 mtd-mac-address = <&factory 0xf100>;
113 mediatek,mtd-eeprom = <&factory 0x10000>;
114 };
115
116 &ethernet {
117 mtd-mac-address = <&factory 0xf100>;
118 mediatek,portmap = "wllll";
119 };
120
121 &pinctrl {
122 state_default: pinctrl0 {
123 gpio {
124 ralink,group = "p4led_an", "p3led_an", "p2led_an", "p1led_an", "p0led_an", "wdt";
125 ralink,function = "gpio";
126 };
127 };
128 };
129
130 &gpio1 {
131 led_wlan_enable {
132 gpio-hog;
133 gpios = <11 GPIO_ACTIVE_HIGH>;
134 output-high;
135 };
136 };