ath79: provide label MAC address
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9533_tplink_tl-wr841.dtsi
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 "qca953x.dtsi"
8
9 / {
10         chosen {
11                 bootargs = "console=ttyS0,115200n8";
12         };
13
14         aliases {
15                 label-mac-device = &wmac;
16         };
17
18         gpio_leds: leds {
19                 compatible = "gpio-leds";
20
21                 wifi {
22                         label = "tp-link:green:wlan";
23                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
24                         linux,default-trigger = "phy0tpt";
25                 };
26
27                 qss_led: qss {
28                         label = "tp-link:green:qss";
29                         gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
30                 };
31
32                 wan {
33                         label = "tp-link:green:wan";
34                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
35                 };
36
37                 lan1 {
38                         label = "tp-link:green:lan1";
39                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
40                 };
41
42                 lan2 {
43                         label = "tp-link:green:lan2";
44                         gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
45                 };
46
47                 lan3 {
48                         label = "tp-link:green:lan3";
49                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
50                 };
51
52                 lan4 {
53                         label = "tp-link:green:lan4";
54                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
55                 };
56         };
57
58         keys {
59                 compatible = "gpio-keys";
60
61                 reset {
62                         label = "Reset button";
63                         linux,code = <KEY_RESTART>;
64                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
65                         debounce-interval = <60>;
66                 };
67
68                 rfkill {
69                         label = "RFKILL button";
70                         linux,code = <KEY_RFKILL>;
71                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
72                         debounce-interval = <60>;
73                 };
74         };
75 };
76
77 &uart {
78         status = "okay";
79 };
80
81 &spi {
82         status = "okay";
83         num-cs = <1>;
84
85         flash@0 {
86                 compatible = "jedec,spi-nor";
87                 reg = <0>;
88                 spi-max-frequency = <25000000>;
89
90                 partitions {
91                         compatible = "fixed-partitions";
92                         #address-cells = <1>;
93                         #size-cells = <1>;
94
95                         uboot:  partition@0 {
96                                 label = "u-boot";
97                                 reg = <0x000000 0x020000>;
98                                 read-only;
99                         };
100
101                         partition@20000 {
102                                 compatible = "tplink,firmware";
103                                 label = "firmware";
104                                 reg = <0x020000 0x3d0000>;
105                         };
106
107                         art: partition@3f0000 {
108                                 label = "art";
109                                 reg = <0x3f0000 0x010000>;
110                                 read-only;
111                         };
112                 };
113         };
114 };
115
116 &eth1 {
117         mtd-mac-address = <&uboot 0x1fc00>;
118 };
119
120 &eth0 {
121         status = "okay";
122         phy-handle = <&swphy4>;
123
124         mtd-mac-address = <&uboot 0x1fc00>;
125         mtd-mac-address-increment = <1>;
126 };
127
128 &wmac {
129         status = "okay";
130         mtd-cal-data = <&art 0x1000>;
131         mtd-mac-address = <&uboot 0x1fc00>;
132 };