fd6aa0f08bef73b9557728c96547e0a91e205464
[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 #include <dt-bindings/mtd/partitions/uimage.h>
8
9 / {
10 aliases {
11 label-mac-device = &wmac;
12 };
13
14 keys {
15 compatible = "gpio-keys";
16
17 reset {
18 linux,code = <KEY_RESTART>;
19 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
20 debounce-interval = <60>;
21 };
22 };
23 };
24
25 &ref {
26 clock-frequency = <40000000>;
27 };
28
29 &spi {
30 status = "okay";
31
32 flash@0 {
33 compatible = "jedec,spi-nor";
34 reg = <0>;
35 spi-max-frequency = <25000000>;
36
37 partitions {
38 compatible = "fixed-partitions";
39 #address-cells = <1>;
40 #size-cells = <1>;
41
42 uboot: partition@0 {
43 label = "u-boot";
44 reg = <0x000000 0x020000>;
45 read-only;
46 };
47
48 partition@20000 {
49 label = "partition-table";
50 reg = <0x020000 0x010000>;
51 read-only;
52 };
53
54 info: partition@30000 {
55 label = "info";
56 reg = <0x030000 0x010000>;
57 read-only;
58 };
59
60 partition@40000 {
61 label = "firmware";
62 reg = <0x040000 0x780000>;
63 compatible = "openwrt,uimage", "denx,uimage";
64 openwrt,ih-magic = <IH_MAGIC_OKLI>;
65 openwrt,offset = <0x3000>;
66 };
67
68 partition@7c0000 {
69 label = "config";
70 reg = <0x7c0000 0x030000>;
71 read-only;
72 };
73
74 art: partition@7f0000 {
75 label = "art";
76 reg = <0x7f0000 0x010000>;
77 read-only;
78 };
79 };
80 };
81 };
82
83 &wmac {
84 status = "okay";
85
86 mtd-cal-data = <&art 0x1000>;
87 mtd-mac-address = <&info 0x8>;
88 };
89
90 &eth0 {
91 status = "okay";
92
93 phy-handle = <&swphy4>;
94
95 mtd-mac-address = <&info 0x8>;
96 };
97
98 &eth1 {
99 status = "okay";
100 };
101
102 &gpio {
103 gpio_ext_lna0 {
104 gpio-hog;
105 gpios = <18 GPIO_ACTIVE_HIGH>;
106 output-high;
107 line-name = "tp-link:ext:lna0";
108 };
109
110 gpio_ext_lna1 {
111 gpio-hog;
112 gpios = <19 GPIO_ACTIVE_HIGH>;
113 output-high;
114 line-name = "tp-link:ext:lna1";
115 };
116 };