bb1993516eef3cdd289cd8c1a3fc18f897c13782
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_tl-wr941n-v7-cn.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "tplink,tl-wr941n-v7-cn", "qca,qca9558";
10 model = "TP-Link TL-WR941N v7 (CN)";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-running = &led_system;
16 led-upgrade = &led_system;
17 label-mac-device = &eth0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_system: system {
24 label = "green:system";
25 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
26 default-state = "on";
27 };
28
29 wlan {
30 label = "green:wlan";
31 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy0tpt";
33 };
34
35 qss {
36 label = "green:qss";
37 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "reset";
46 linux,code = <KEY_RESTART>;
47 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
48 debounce-interval = <60>;
49 };
50
51 wps {
52 label = "qss";
53 linux,code = <KEY_WPS_BUTTON>;
54 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
55 debounce-interval = <60>;
56 };
57 };
58 };
59
60 &uart {
61 status = "okay";
62 };
63
64 &spi {
65 status = "okay";
66
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <25000000>;
71
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 uboot: partition@0 {
78 label = "u-boot";
79 reg = <0x000000 0x020000>;
80 read-only;
81 };
82
83 partition@20000 {
84 compatible = "tplink,firmware";
85 label = "firmware";
86 reg = <0x020000 0x3d0000>;
87 };
88
89 art: partition@7f0000 {
90 label = "art";
91 reg = <0x3f0000 0x010000>;
92 read-only;
93 };
94 };
95 };
96 };
97
98 &mdio0 {
99 status = "okay";
100
101 switch0@1f {
102 compatible = "qca,ar8236";
103 reg = <0x1f>;
104 };
105 };
106
107 &eth0 {
108 status = "okay";
109 phy-mode = "mii";
110 mtd-mac-address = <&uboot 0x1fc00>;
111 fixed-link {
112 speed = <100>;
113 full-duplex;
114 };
115 };
116
117 &wmac {
118 status = "okay";
119 mtd-cal-data = <&art 0x1000>;
120 mtd-mac-address = <&uboot 0x1fc00>;
121 };