058acda7469b1ea4f93decdd908c9d75f62b3228
[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 &spi {
61 status = "okay";
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <25000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 uboot: partition@0 {
74 label = "u-boot";
75 reg = <0x000000 0x020000>;
76 read-only;
77 };
78
79 partition@20000 {
80 compatible = "tplink,firmware";
81 label = "firmware";
82 reg = <0x020000 0x3d0000>;
83 };
84
85 art: partition@7f0000 {
86 label = "art";
87 reg = <0x3f0000 0x010000>;
88 read-only;
89 };
90 };
91 };
92 };
93
94 &mdio0 {
95 status = "okay";
96
97 switch0@1f {
98 compatible = "qca,ar8236";
99 reg = <0x1f>;
100 };
101 };
102
103 &eth0 {
104 status = "okay";
105 phy-mode = "mii";
106 mtd-mac-address = <&uboot 0x1fc00>;
107 fixed-link {
108 speed = <100>;
109 full-duplex;
110 };
111 };
112
113 &wmac {
114 status = "okay";
115 mtd-cal-data = <&art 0x1000>;
116 mtd-mac-address = <&uboot 0x1fc00>;
117 };