ath79: enable UART in SoC DTSI files
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_tplink_cpe.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 label-mac-device = &wmac;
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 linux,code = <KEY_RESTART>;
18 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
19 debounce-interval = <60>;
20 };
21 };
22 };
23
24 &ref {
25 clock-frequency = <40000000>;
26 };
27
28 &spi {
29 status = "okay";
30
31 flash@0 {
32 compatible = "jedec,spi-nor";
33 reg = <0>;
34 spi-max-frequency = <25000000>;
35
36 partitions {
37 compatible = "fixed-partitions";
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 uboot: partition@0 {
42 label = "u-boot";
43 reg = <0x000000 0x020000>;
44 read-only;
45 };
46
47 partition@20000 {
48 label = "partition-table";
49 reg = <0x020000 0x010000>;
50 read-only;
51 };
52
53 info: partition@30000 {
54 label = "info";
55 reg = <0x030000 0x010000>;
56 read-only;
57 };
58
59 partition@40000 {
60 label = "firmware";
61 reg = <0x040000 0x780000>;
62
63 compatible = "fixed-partitions";
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 partition@0 {
68 label = "kernel";
69 reg = <0x000000 0x300000>;
70 };
71
72 partition@300000 {
73 label = "rootfs";
74 reg = <0x300000 0x480000>;
75 };
76 };
77
78 partition@7c0000 {
79 label = "config";
80 reg = <0x7c0000 0x030000>;
81 read-only;
82 };
83
84 art: partition@7f0000 {
85 label = "art";
86 reg = <0x7f0000 0x010000>;
87 read-only;
88 };
89 };
90 };
91 };
92
93 &wmac {
94 status = "okay";
95
96 mtd-cal-data = <&art 0x1000>;
97 mtd-mac-address = <&info 0x8>;
98 };
99
100 &eth0 {
101 status = "okay";
102
103 phy-handle = <&swphy4>;
104
105 mtd-mac-address = <&info 0x8>;
106 };
107
108 &eth1 {
109 status = "okay";
110 };
111
112 &gpio {
113 gpio_ext_lna0 {
114 gpio-hog;
115 gpios = <18 GPIO_ACTIVE_HIGH>;
116 output-high;
117 line-name = "tp-link:ext:lna0";
118 };
119
120 gpio_ext_lna1 {
121 gpio-hog;
122 gpios = <19 GPIO_ACTIVE_HIGH>;
123 output-high;
124 line-name = "tp-link:ext:lna1";
125 };
126 };