ath79: add generic dtsi for Ubiquiti SW boards
[oweals/openwrt.git] / target / linux / ath79 / dts / tp9343_tplink_tl-wr94x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "qca956x.dtsi"
7
8 / {
9         chosen {
10                 bootargs = "console=ttyS0,115200n8";
11         };
12
13         aliases {
14                 label-mac-device = &wmac;
15         };
16
17         keys {
18                 compatible = "gpio-keys";
19
20                 wifi {
21                         label = "WiFi button";
22                         linux,code = <KEY_RFKILL>;
23                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
24                 };
25
26                 reset {
27                         label = "Reset button";
28                         linux,code = <KEY_RESTART>;
29                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30                 };
31         };
32 };
33
34 &spi {
35         status = "okay";
36         num-cs = <1>;
37
38         flash@0 {
39                 compatible = "jedec,spi-nor";
40                 reg = <0>;
41                 spi-max-frequency = <25000000>;
42
43                 partitions {
44                         compatible = "fixed-partitions";
45                         #address-cells = <1>;
46                         #size-cells = <1>;
47
48                         uboot:  partition@0 {
49                                 label = "u-boot";
50                                 reg = <0x000000 0x020000>;
51                                 read-only;
52                         };
53
54                         partition@20000 {
55                                 compatible = "tplink,firmware";
56                                 label = "firmware";
57                                 reg = <0x020000 0x3d0000>;
58                         };
59
60                         art: partition@3f0000 {
61                                 label = "art";
62                                 reg = <0x3f0000 0x010000>;
63                                 read-only;
64                         };
65                 };
66         };
67 };
68
69 &uart {
70         status = "okay";
71 };
72
73 &eth0 {
74         status = "okay";
75
76         phy-mode = "mii";
77         phy-handle = <&swphy4>;
78
79         mtd-mac-address = <&uboot 0x1fc00>;
80         mtd-mac-address-increment = <1>;
81 };
82
83 &eth1 {
84         status = "okay";
85 };
86
87 &wmac {
88         status = "okay";
89
90         mtd-cal-data = <&art 0x1000>;
91         mtd-mac-address = <&uboot 0x1fc00>;
92 };