028324410fbe5cb840e00a2b9e565504e4653499
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_rosinson_wr818.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 "qca956x.dtsi"
8
9 / {
10         model = "ROSINSON WR818";
11         compatible = "rosinson,wr818", "qca,qca9563";
12
13         chosen {
14                 bootargs = "console=ttyS0,115200n8";
15         };
16
17         aliases {
18                 led-boot = &led_system;
19                 led-failsafe = &led_system;
20                 led-running = &led_system;
21                 led-upgrade = &led_system;
22         };
23
24         leds {
25                 compatible = "gpio-leds";
26
27                 led_system: system {
28                         label = "wr818:red:system";
29                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
30                 };
31
32                 wifi_2g {
33                         label = "wr818:red:wifi2g";
34                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
35                         linux,default-trigger = "phy0tpt";
36                 };
37         };
38
39         keys {
40                 compatible = "gpio-keys";
41
42                 reset {
43                         label = "reset";
44                         linux,code = <KEY_RESTART>;
45                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
46                         debounce-interval = <60>;
47                 };
48         };
49 };
50
51 &uart {
52         status = "okay";
53 };
54
55 &gpio {
56         status = "okay";
57 };
58
59 &spi {
60         status = "okay";
61
62         num-cs = <1>;
63
64         flash@0 {
65                 compatible = "jedec,spi-nor";
66                 reg = <0>;
67                 spi-max-frequency = <25000000>;
68
69                 partitions {
70                         compatible = "fixed-partitions";
71                         #address-cells = <1>;
72                         #size-cells = <1>;
73
74                         partition@0 {
75                                 label = "u-boot";
76                                 reg = <0x000000 0x040000>;
77                                 read-only;
78                         };
79
80                         partition@40000 {
81                                 label = "u-boot-env";
82                                 reg = <0x040000 0x010000>;
83                                 read-only;
84                         };
85
86                         info: partition@50000 {
87                                 label = "factory";
88                                 reg = <0x050000 0x010000>;
89                                 read-only;
90                         };
91
92                         partition@60000 {
93                                 compatible = "denx,uimage";
94                                 label = "firmware";
95                                 reg = <0x060000 0xf80000>;
96                         };
97
98                         art: partition@ff0000 {
99                                 label = "art";
100                                 reg = <0xff0000 0x010000>;
101                                 read-only;
102                         };
103                 };
104         };
105 };
106
107 &mdio0 {
108         status = "okay";
109
110         phy-mask = <0>;
111         phy0: ethernet-phy@0 {
112                 reg = <0>;
113                 phy-mode = "sgmii";
114
115                 qca,ar8327-initvals = <
116                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
117                         0x7c 0x0000007e /* PORT0_STATUS */
118                 >;
119         };
120 };
121
122 &eth0 {
123         status = "okay";
124
125         mtd-mac-address = <&info 0x0>;
126         phy-mode = "sgmii";
127         phy-handle = <&phy0>;
128 };
129
130 &wmac {
131         status = "okay";
132
133         mtd-cal-data = <&art 0x1000>;
134 };
135
136 &usb_phy0 {
137         status = "okay";
138 };
139
140 &usb0 {
141         #address-cells = <1>;
142         #size-cells = <0>;
143         status = "okay";
144
145         port@1 {
146                 reg = <1>;
147                 #trigger-source-cells = <0>;
148         };
149 };
150
151 &usb_phy1 {
152         status = "okay";
153 };
154
155 &usb1 {
156         #address-cells = <1>;
157         #size-cells = <0>;
158         status = "okay";
159
160         port@2 {
161                 reg = <2>;
162                 #trigger-source-cells = <0>;
163         };
164 };