blob: 489c5edd6249662ab91af7d685d6c6380d0d9118 [file] [log] [blame]
Jagan Tekia4dd7932023-01-30 20:27:46 +05301// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
4 */
5
6#include "rockchip-u-boot.dtsi"
Joseph Chen84445502023-05-17 13:01:00 +03007#include <dt-bindings/phy/phy.h>
Jagan Tekia4dd7932023-01-30 20:27:46 +05308
9/ {
Jonas Karlmana5e28652023-07-28 12:05:41 +000010 aliases {
11 spi0 = &spi0;
12 spi1 = &spi1;
13 spi2 = &spi2;
14 spi3 = &spi3;
15 spi4 = &spi4;
16 spi5 = &sfc;
17 };
18
Jagan Tekia4dd7932023-01-30 20:27:46 +053019 dmc {
20 compatible = "rockchip,rk3588-dmc";
Tom Rinide70b472023-03-27 15:20:19 -040021 bootph-all;
Jagan Tekia4dd7932023-01-30 20:27:46 +053022 status = "okay";
23 };
24
Joseph Chena1d63212023-05-29 13:01:34 +030025 usbdrd3_0: usbdrd3_0 {
26 compatible = "rockchip,rk3588-dwc3", "rockchip,rk3399-dwc3";
27 clocks = <&cru REF_CLK_USB3OTG0>, <&cru SUSPEND_CLK_USB3OTG0>,
28 <&cru ACLK_USB3OTG0>;
29 clock-names = "ref", "suspend", "bus";
30 #address-cells = <2>;
31 #size-cells = <2>;
32 ranges;
33 status = "disabled";
34
35 usbdrd_dwc3_0: usb@fc000000 {
36 compatible = "snps,dwc3";
37 reg = <0x0 0xfc000000 0x0 0x400000>;
38 interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH 0>;
39 power-domains = <&power RK3588_PD_USB>;
40 resets = <&cru SRST_A_USB3OTG0>;
41 reset-names = "usb3-otg";
42 dr_mode = "otg";
43 phys = <&u2phy0_otg>, <&usbdp_phy0_u3>;
44 phy-names = "usb2-phy", "usb3-phy";
45 phy_type = "utmi_wide";
46 snps,dis_enblslpm_quirk;
47 snps,dis-u1-entry-quirk;
48 snps,dis-u2-entry-quirk;
49 snps,dis-u2-freeclk-exists-quirk;
50 snps,dis-del-phy-power-chg-quirk;
51 snps,dis-tx-ipgap-linecheck-quirk;
52 quirk-skip-phy-init;
53 };
54 };
55
Eugen Hristeva856b1a2023-05-15 12:59:45 +030056 usb_host0_ehci: usb@fc800000 {
57 compatible = "generic-ehci";
58 reg = <0x0 0xfc800000 0x0 0x40000>;
59 interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH 0>;
60 clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST_ARB0>;
61 clock-names = "usbhost", "arbiter";
62 power-domains = <&power RK3588_PD_USB>;
63 status = "disabled";
64 };
65
66 usb_host0_ohci: usb@fc840000 {
67 compatible = "generic-ohci";
68 reg = <0x0 0xfc840000 0x0 0x40000>;
69 interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH 0>;
70 clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST_ARB0>;
71 clock-names = "usbhost", "arbiter";
72 power-domains = <&power RK3588_PD_USB>;
73 status = "disabled";
74 };
75
76 usb_host1_ehci: usb@fc880000 {
77 compatible = "generic-ehci";
78 reg = <0x0 0xfc880000 0x0 0x40000>;
79 interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH 0>;
80 clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST_ARB1>;
81 clock-names = "usbhost", "arbiter";
82 power-domains = <&power RK3588_PD_USB>;
83 status = "disabled";
84 };
85
86 usb_host1_ohci: usb@fc8c0000 {
87 compatible = "generic-ohci";
88 reg = <0x0 0xfc8c0000 0x0 0x40000>;
89 interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH 0>;
90 clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST_ARB1>;
91 clock-names = "usbhost", "arbiter";
92 power-domains = <&power RK3588_PD_USB>;
93 status = "disabled";
94 };
95
Jagan Tekia4dd7932023-01-30 20:27:46 +053096 pmu1_grf: syscon@fd58a000 {
Tom Rinide70b472023-03-27 15:20:19 -040097 bootph-all;
Jagan Tekia4dd7932023-01-30 20:27:46 +053098 compatible = "rockchip,rk3588-pmu1-grf", "syscon";
99 reg = <0x0 0xfd58a000 0x0 0x2000>;
100 };
Jagan Teki275d8512023-01-30 20:27:47 +0530101
Joseph Chen84445502023-05-17 13:01:00 +0300102 pipe_phy0_grf: syscon@fd5bc000 {
103 compatible = "rockchip,pipe-phy-grf", "syscon";
104 reg = <0x0 0xfd5bc000 0x0 0x100>;
105 };
106
Joseph Chena1d63212023-05-29 13:01:34 +0300107 usb2phy0_grf: syscon@fd5d0000 {
108 compatible = "rockchip,rk3588-usb2phy-grf", "syscon",
109 "simple-mfd";
110 reg = <0x0 0xfd5d0000 0x0 0x4000>;
111 #address-cells = <1>;
112 #size-cells = <1>;
113
114 u2phy0: usb2-phy@0 {
115 compatible = "rockchip,rk3588-usb2phy";
116 reg = <0x0 0x10>;
117 interrupts = <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH 0>;
118 resets = <&cru SRST_OTGPHY_U3_0>, <&cru SRST_P_USB2PHY_U3_0_GRF0>;
119 reset-names = "phy", "apb";
120 clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
121 clock-names = "phyclk";
122 clock-output-names = "usb480m_phy0";
123 #clock-cells = <0>;
124 rockchip,usbctrl-grf = <&usb_grf>;
125 status = "disabled";
126
127 u2phy0_otg: otg-port {
128 #phy-cells = <0>;
129 status = "disabled";
130 };
131 };
132 };
133
Eugen Hristeva856b1a2023-05-15 12:59:45 +0300134 usb2phy2_grf: syscon@fd5d8000 {
135 compatible = "rockchip,rk3588-usb2phy-grf", "syscon",
136 "simple-mfd";
137 reg = <0x0 0xfd5d8000 0x0 0x4000>;
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 u2phy2: usb2-phy@8000 {
142 compatible = "rockchip,rk3588-usb2phy";
143 reg = <0x8000 0x10>;
144 interrupts = <GIC_SPI 391 IRQ_TYPE_LEVEL_HIGH 0>;
145 clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
146 clock-names = "phyclk";
147 #clock-cells = <0>;
148 status = "disabled";
149
150 u2phy2_host: host-port {
151 #phy-cells = <0>;
152 status = "disabled";
153 };
154 };
155 };
156
Joseph Chena1d63212023-05-29 13:01:34 +0300157 vo0_grf: syscon@fd5a6000 {
158 compatible = "rockchip,rk3588-vo-grf", "syscon";
159 reg = <0x0 0xfd5a6000 0x0 0x2000>;
160 clocks = <&cru PCLK_VO0GRF>;
161 };
162
163 usb_grf: syscon@fd5ac000 {
164 compatible = "rockchip,rk3588-usb-grf", "syscon";
165 reg = <0x0 0xfd5ac000 0x0 0x4000>;
166 };
167
Eugen Hristeva856b1a2023-05-15 12:59:45 +0300168 usb2phy3_grf: syscon@fd5dc000 {
169 compatible = "rockchip,rk3588-usb2phy-grf", "syscon",
170 "simple-mfd";
171 reg = <0x0 0xfd5dc000 0x0 0x4000>;
172 #address-cells = <1>;
173 #size-cells = <1>;
174
175 u2phy3: usb2-phy@c000 {
176 compatible = "rockchip,rk3588-usb2phy";
177 reg = <0xc000 0x10>;
178 interrupts = <GIC_SPI 392 IRQ_TYPE_LEVEL_HIGH 0>;
179 clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
180 clock-names = "phyclk";
181 #clock-cells = <0>;
182 status = "disabled";
183
184 u2phy3_host: host-port {
185 #phy-cells = <0>;
186 status = "disabled";
187 };
188 };
189 };
190
Joseph Chena1d63212023-05-29 13:01:34 +0300191 usbdpphy0_grf: syscon@fd5c8000 {
192 compatible = "rockchip,rk3588-usbdpphy-grf", "syscon";
193 reg = <0x0 0xfd5c8000 0x0 0x4000>;
194 };
195
Joseph Chen84445502023-05-17 13:01:00 +0300196 pcie2x1l2: pcie@fe190000 {
197 compatible = "rockchip,rk3588-pcie", "snps,dw-pcie";
198 #address-cells = <3>;
199 #size-cells = <2>;
200 bus-range = <0x40 0x4f>;
201 clocks = <&cru ACLK_PCIE_1L2_MSTR>, <&cru ACLK_PCIE_1L2_SLV>,
202 <&cru ACLK_PCIE_1L2_DBI>, <&cru PCLK_PCIE_1L2>,
203 <&cru CLK_PCIE_AUX4>, <&cru CLK_PCIE1L2_PIPE>;
204 clock-names = "aclk_mst", "aclk_slv",
205 "aclk_dbi", "pclk",
206 "aux", "pipe";
207 device_type = "pci";
208 interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH 0>,
209 <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH 0>,
210 <GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH 0>,
211 <GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH 0>,
212 <GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH 0>;
213 interrupt-names = "sys", "pmc", "msg", "legacy", "err";
214 #interrupt-cells = <1>;
215 interrupt-map-mask = <0 0 0 7>;
216 interrupt-map = <0 0 0 1 &pcie2x1l2_intc 0>,
217 <0 0 0 2 &pcie2x1l2_intc 1>,
218 <0 0 0 3 &pcie2x1l2_intc 2>,
219 <0 0 0 4 &pcie2x1l2_intc 3>;
220 linux,pci-domain = <4>;
221 num-ib-windows = <8>;
222 num-ob-windows = <8>;
223 num-viewport = <4>;
224 max-link-speed = <2>;
225 msi-map = <0x4000 &gic 0x4000 0x1000>;
226 num-lanes = <1>;
227 phys = <&combphy0_ps PHY_TYPE_PCIE>;
228 phy-names = "pcie-phy";
229 power-domains = <&power RK3588_PD_PCIE>;
230 ranges = <0x01000000 0x0 0xf4100000 0x0 0xf4100000 0x0 0x00100000>,
231 <0x02000000 0x0 0xf4200000 0x0 0xf4200000 0x0 0x00e00000>,
232 <0x03000000 0x0 0x40000000 0xa 0x00000000 0x0 0x40000000>;
233 reg = <0xa 0x41000000 0x0 0x00400000>,
234 <0x0 0xfe190000 0x0 0x00010000>,
235 <0x0 0xf4000000 0x0 0x00100000>;
236 reg-names = "dbi", "apb", "config";
237 resets = <&cru SRST_PCIE4_POWER_UP>, <&cru SRST_P_PCIE4>;
238 reset-names = "pcie", "periph";
239 rockchip,pipe-grf = <&php_grf>;
240 status = "disabled";
241
242 pcie2x1l2_intc: legacy-interrupt-controller {
243 interrupt-controller;
244 #address-cells = <0>;
245 #interrupt-cells = <1>;
246 interrupt-parent = <&gic>;
247 interrupts = <GIC_SPI 250 IRQ_TYPE_EDGE_RISING 0>;
248 };
249 };
250
Jonas Karlmanadb78942023-05-18 15:39:30 +0000251 sfc: spi@fe2b0000 {
252 compatible = "rockchip,sfc";
253 reg = <0x0 0xfe2b0000 0x0 0x4000>;
254 interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH 0>;
255 clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
256 clock-names = "clk_sfc", "hclk_sfc";
257 status = "disabled";
258 };
259
Chris Morgan7f255042023-04-13 09:13:03 -0500260 rng: rng@fe378000 {
261 compatible = "rockchip,trngv1";
262 reg = <0x0 0xfe378000 0x0 0x200>;
263 status = "disabled";
264 };
Joseph Chen84445502023-05-17 13:01:00 +0300265
Joseph Chena1d63212023-05-29 13:01:34 +0300266 usbdp_phy0: phy@fed80000 {
267 compatible = "rockchip,rk3588-usbdp-phy";
268 reg = <0x0 0xfed80000 0x0 0x10000>;
269 rockchip,u2phy-grf = <&usb2phy0_grf>;
270 rockchip,usb-grf = <&usb_grf>;
271 rockchip,usbdpphy-grf = <&usbdpphy0_grf>;
272 rockchip,vo-grf = <&vo0_grf>;
273 clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>,
274 <&cru CLK_USBDP_PHY0_IMMORTAL>,
275 <&cru PCLK_USBDPPHY0>,
276 <&u2phy0>;
277 clock-names = "refclk", "immortal", "pclk", "utmi";
278 resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>,
279 <&cru SRST_USBDP_COMBO_PHY0_CMN>,
280 <&cru SRST_USBDP_COMBO_PHY0_LANE>,
281 <&cru SRST_USBDP_COMBO_PHY0_PCS>,
282 <&cru SRST_P_USBDPPHY0>;
283 reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb";
284 status = "disabled";
285
286 usbdp_phy0_dp: dp-port {
287 #phy-cells = <0>;
288 status = "disabled";
289 };
290
291 usbdp_phy0_u3: usb3-port {
292 #phy-cells = <0>;
293 status = "disabled";
294 };
295 };
296
Joseph Chen84445502023-05-17 13:01:00 +0300297 combphy0_ps: phy@fee00000 {
298 compatible = "rockchip,rk3588-naneng-combphy";
299 reg = <0x0 0xfee00000 0x0 0x100>;
300 #phy-cells = <1>;
301 clocks = <&cru CLK_REF_PIPE_PHY0>, <&cru PCLK_PCIE_COMBO_PIPE_PHY0>,
302 <&cru PCLK_PHP_ROOT>;
303 clock-names = "refclk", "apbclk", "phpclk";
304 assigned-clocks = <&cru CLK_REF_PIPE_PHY0>;
305 assigned-clock-rates = <100000000>;
306 resets = <&cru SRST_P_PCIE2_PHY0>, <&cru SRST_REF_PIPE_PHY0>;
307 reset-names = "combphy-apb", "combphy";
308 rockchip,pipe-grf = <&php_grf>;
309 rockchip,pipe-phy-grf = <&pipe_phy0_grf>;
310 status = "disabled";
311 };
Jagan Tekia4dd7932023-01-30 20:27:46 +0530312};
313
314&xin24m {
Tom Rinide70b472023-03-27 15:20:19 -0400315 bootph-all;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530316 status = "okay";
317};
318
319&cru {
Tom Rinide70b472023-03-27 15:20:19 -0400320 bootph-pre-ram;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530321 status = "okay";
322};
323
324&sys_grf {
Tom Rinide70b472023-03-27 15:20:19 -0400325 bootph-pre-ram;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530326 status = "okay";
327};
328
Jonas Karlmanfc805c22023-04-17 19:07:21 +0000329&scmi {
330 bootph-pre-ram;
331};
332
333&scmi_clk {
334 bootph-pre-ram;
335};
336
337&sdmmc {
338 bootph-pre-ram;
339 u-boot,spl-fifo-mode;
340};
341
Jonas Karlmanced8be02023-04-18 16:46:41 +0000342&sdhci {
343 bootph-pre-ram;
Jonas Karlmanf79c5372023-05-06 17:41:11 +0000344 u-boot,spl-fifo-mode;
Jonas Karlmanced8be02023-04-18 16:46:41 +0000345};
346
Jagan Tekia4dd7932023-01-30 20:27:46 +0530347&uart2 {
348 clock-frequency = <24000000>;
Tom Rinide70b472023-03-27 15:20:19 -0400349 bootph-pre-ram;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530350 status = "okay";
351};
352
353&ioc {
Tom Rinide70b472023-03-27 15:20:19 -0400354 bootph-pre-ram;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530355};
Jonas Karlmanadb78942023-05-18 15:39:30 +0000356
357#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
358&binman {
359 simple-bin-spi {
360 mkimage {
361 args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
362 offset = <0x8000>;
363 };
364 };
365};
366#endif