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