ath79: qca: convert to nvmem-layout
[openwrt/staging/hauke.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 nvmem-layout {
79 compatible = "fixed-layout";
80 #address-cells = <1>;
81 #size-cells = <1>;
82
83 macaddr_uboot_1fc00: macaddr@1fc00 {
84 reg = <0x1fc00 0x6>;
85 };
86 };
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 nvmem-cells = <&macaddr_uboot_1fc00>;
117 nvmem-cell-names = "mac-address";
118 fixed-link {
119 speed = <100>;
120 full-duplex;
121 };
122 };
123
124 &wmac {
125 status = "okay";
126 mtd-cal-data = <&art 0x1000>;
127 nvmem-cells = <&macaddr_uboot_1fc00>;
128 nvmem-cell-names = "mac-address";
129 };