1caae75f1d4f5f6a6051ac16d8b688798f3eb13f
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9531_yuncore_a770.dts
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         model = "YunCore A770";
11         compatible = "yuncore,a770", "qca,qca9531";
12
13         aliases {
14                 led-boot = &led_status;
15                 led-failsafe = &led_status;
16                 led-running = &led_status;
17                 led-upgrade = &led_status;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS0,115200n8";
22         };
23
24         keys {
25                 compatible = "gpio-keys";
26
27                 reset {
28                         label = "reset";
29                         linux,code = <KEY_RESTART>;
30                         gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
31                         debounce-interval = <60>;
32                 };
33         };
34
35         leds {
36                 compatible = "gpio-leds";
37
38                 lan {
39                         label = "a770:green:lan";
40                         gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
41                 };
42
43                 led_status: status {
44                         label = "a770:green:status";
45                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
46                         default-state = "keep";
47                 };
48
49                 wan {
50                         label = "a770:green:wan";
51                         gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
52                 };
53
54                 wlan2g {
55                         label = "a770:red:wlan2g";
56                         gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
57                         linux,default-trigger = "phy1tpt";
58                 };
59         };
60 };
61
62 &eth0 {
63         status = "okay";
64
65         phy-handle = <&swphy4>;
66         mtd-mac-address = <&art 0x0>;
67 };
68
69 &eth1 {
70         mtd-mac-address = <&art 0x6>;
71 };
72
73 &pcie0 {
74         status = "okay";
75 };
76
77 &spi {
78         status = "okay";
79
80         num-cs = <1>;
81
82         flash@0 {
83                 compatible = "jedec,spi-nor";
84                 reg = <0>;
85                 spi-max-frequency = <25000000>;
86
87                 partitions {
88                         compatible = "fixed-partitions";
89                         #address-cells = <1>;
90                         #size-cells = <1>;
91
92                         partition@0 {
93                                 label = "u-boot";
94                                 reg = <0x000000 0x040000>;
95                                 read-only;
96                         };
97
98                         partition@40000 {
99                                 label = "u-boot-env";
100                                 reg = <0x040000 0x010000>;
101                         };
102
103                         partition@50000 {
104                                 compatible = "denx,uimage";
105                                 label = "firmware";
106                                 reg = <0x050000 0xfa0000>;
107                         };
108
109                         art: partition@ff0000 {
110                                 label = "art";
111                                 reg = <0xff0000 0x010000>;
112                                 read-only;
113                         };
114                 };
115         };
116 };
117
118 &uart {
119         status = "okay";
120 };
121
122 &wmac {
123         status = "okay";
124
125         mtd-cal-data = <&art 0x1000>;
126 };