ath79: add support for Ubiquiti LiteBeam AC Gen2
[oweals/openwrt.git] / target / linux / ath79 / dts / qca953x_tplink_tl-wr810n.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                 led-boot = &led_system;
16                 led-failsafe = &led_system;
17                 led-running = &led_system;
18                 led-upgrade = &led_system;
19                 label-mac-device = &eth1;
20         };
21
22         leds {
23                 compatible = "gpio-leds";
24
25                 led_system: system {
26                         label = "tp-link:blue:system";
27                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
28                 };
29         };
30
31         keys {
32                 compatible = "gpio-keys";
33
34                 reset {
35                         label = "Reset button";
36                         linux,code = <KEY_RESTART>;
37                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
38                         debounce-interval = <60>;
39                 };
40
41                 switch_b0 {
42                         label = "switch_b0";
43                         linux,input-type = <EV_SW>;
44                         linux,code = <BTN_0>;
45                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
46                         debounce-interval = <60>;
47                 };
48
49                 switch_b1 {
50                         label = "switch_b1";
51                         linux,input-type = <EV_SW>;
52                         linux,code = <BTN_1>;
53                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
54                         debounce-interval = <60>;
55                 };
56         };
57 };
58
59 &uart {
60         status = "okay";
61 };
62
63 &spi {
64         status = "okay";
65
66         num-cs = <1>;
67
68         flash@0 {
69                 compatible = "jedec,spi-nor";
70                 reg = <0>;
71                 spi-max-frequency = <25000000>;
72
73                 partitions {
74                         compatible = "fixed-partitions";
75                         #address-cells = <1>;
76                         #size-cells = <1>;
77
78                         uboot:  partition@0 {
79                                 label = "u-boot";
80                                 reg = <0x000000 0x020000>;
81                                 read-only;
82                         };
83
84                         partition@20000 {
85                                 compatible = "tplink,firmware";
86                                 label = "firmware";
87                                 reg = <0x020000 0x7d0000>;
88                         };
89
90                         art: partition@7f0000 {
91                                 label = "art";
92                                 reg = <0x7f0000 0x010000>;
93                                 read-only;
94                         };
95                 };
96         };
97 };
98
99 &eth1 {
100         mtd-mac-address = <&uboot 0x1fc00>;
101 };
102
103 &eth0 {
104         status = "okay";
105
106         phy-handle = <&swphy4>;
107
108         mtd-mac-address = <&uboot 0x1fc00>;
109         mtd-mac-address-increment = <1>;
110 };
111
112 &wmac {
113         status = "okay";
114
115         mtd-cal-data = <&art 0x1000>;
116         mtd-mac-address = <&uboot 0x1fc00>;
117 };