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