ath79: drop and consolidate redundant chosen/bootargs
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9558_mikrotik_routerboard-922uags-5hpacd.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 "qca955x.dtsi"
8
9 / {
10         compatible = "mikrotik,routerboard-922uags-5hpacd", "qca,qca9558";
11         model = "MikroTik RouterBOARD 922UAGS-5HPacD";
12
13         aliases {
14                 led-boot = &led_user;
15                 led-failsafe = &led_user;
16                 led-upgrade = &led_user;
17                 serial0 = &uart;
18         };
19
20         leds {
21                 compatible = "gpio-leds";
22
23                 led_user: user {
24                         label = "mikrotik:green:user";
25                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
26                 };
27         };
28
29         ath10k-leds {
30                 compatible = "gpio-leds";
31
32                 wlan5g {
33                         label = "mikrotik:green:wlan5g";
34                         gpios = <&ath10k 0 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 20 GPIO_ACTIVE_LOW>;
46                         debounce-interval = <60>;
47                 };
48         };
49
50         gpio-export {
51                 compatible = "gpio-export";
52
53                 gpio_usb_power {
54                         gpio-export,name = "mikrotik:power:usb";
55                         gpio-export,output = <0>;
56                         gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
57                 };
58
59                 gpio_nand_power {
60                         gpio-export,name = "mikrotik:power:nand";
61                         gpio-export,output = <0>;
62                         gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
63                 };
64         };
65 };
66
67 &mdio0 {
68         status = "okay";
69
70         phy4: ethernet-phy@4 {
71                 reg = <4>;
72         };
73 };
74
75 &eth0 {
76         status = "okay";
77
78         phy-handle = <&phy4>;
79         pll-data = <0x8f000000 0xa0000101 0xa0001313>;
80
81         gmac-config {
82                 device = <&gmac>;
83                 rgmii-enabled = <1>;
84         };
85 };
86
87 &spi {
88         status = "okay";
89
90         flash@0 {
91                 compatible = "jedec,spi-nor";
92                 reg = <0>;
93                 spi-max-frequency = <25000000>;
94
95                 partitions {
96                         compatible = "mikrotik,routerboot-partitions";
97                         #address-cells = <1>;
98                         #size-cells = <1>;
99
100                         partition@0 {
101                                 label = "routerboot";
102                                 reg = <0x0 0x0>;
103                                 read-only;
104                         };
105
106                         hard_config: hard_config {
107                                 read-only;
108                         };
109
110                         bios {
111                                 read-only;
112                         };
113
114                         soft_config {
115                         };
116                 };
117         };
118 };
119
120 &nand {
121         status = "okay";
122
123         nand-ecc-mode = "soft";
124         qca,nand-swap-dma;
125         qca,nand-scan-fixup;
126
127         partitions {
128                 compatible = "fixed-partitions";
129                 #size-cells = <1>;
130
131                 partition@0 {
132                         label = "booter";
133                         reg = <0x0000000 0x0040000>;
134                         read-only;
135                 };
136
137                 partition@40000 {
138                         label = "kernel";
139                         reg = <0x0040000 0x03c0000>;
140                 };
141
142                 partition@400000 {
143                         label = "ubi";
144                         reg = <0x0400000 0x7c00000>;
145                 };
146         };
147 };
148
149 &uart {
150         status = "okay";
151 };
152
153 &pcie0 {
154         status = "okay";
155
156         ath10k: wifi@0,0 {
157                 compatible = "qcom,ath10k";
158                 reg = <0 0 0 0 0>;
159                 #gpio-cells = <2>;
160                 gpio-controller;
161         };
162 };
163
164 &pcie1 {
165         status = "okay";
166 };
167
168 &usb0 {
169         status = "okay";
170 };
171
172 &usb_phy0 {
173         status = "okay";
174 };