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