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