blob: e9d38d5c83b0a718c276879cc12020033398fc4b [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"
7
8/ {
Jonas Karlmana5e28652023-07-28 12:05:41 +00009 aliases {
Jonas Karlmana5e28652023-07-28 12:05:41 +000010 spi5 = &sfc;
11 };
12
Jonas Karlmaneb193012024-01-26 22:14:54 +000013 chosen {
14 u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci;
15 };
16
Jagan Tekia4dd7932023-01-30 20:27:46 +053017 dmc {
18 compatible = "rockchip,rk3588-dmc";
Tom Rinide70b472023-03-27 15:20:19 -040019 bootph-all;
Jagan Tekia4dd7932023-01-30 20:27:46 +053020 };
21
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000022 usb_host0_xhci: usb@fc000000 {
Jonas Karlman592101d2024-01-26 22:14:52 +000023 compatible = "rockchip,rk3588-dwc3", "snps,dwc3";
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000024 reg = <0x0 0xfc000000 0x0 0x400000>;
25 interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH 0>;
Joseph Chena1d63212023-05-29 13:01:34 +030026 clocks = <&cru REF_CLK_USB3OTG0>, <&cru SUSPEND_CLK_USB3OTG0>,
27 <&cru ACLK_USB3OTG0>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000028 clock-names = "ref_clk", "suspend_clk", "bus_clk";
29 dr_mode = "otg";
Jonas Karlmane0a5afe2024-05-04 19:43:06 +000030 phys = <&u2phy0_otg>, <&usbdp_phy0 PHY_TYPE_USB3>;
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000031 phy-names = "usb2-phy", "usb3-phy";
32 phy_type = "utmi_wide";
33 power-domains = <&power RK3588_PD_USB>;
34 resets = <&cru SRST_A_USB3OTG0>;
35 snps,dis_enblslpm_quirk;
36 snps,dis-u1-entry-quirk;
37 snps,dis-u2-entry-quirk;
38 snps,dis-u2-freeclk-exists-quirk;
39 snps,dis-del-phy-power-chg-quirk;
40 snps,dis-tx-ipgap-linecheck-quirk;
Joseph Chena1d63212023-05-29 13:01:34 +030041 status = "disabled";
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000042 };
Joseph Chena1d63212023-05-29 13:01:34 +030043
Jonas Karlman7b733dd2024-04-22 06:28:48 +000044 vo0_grf: syscon@fd5a6000 {
45 compatible = "rockchip,rk3588-vo-grf", "syscon";
46 reg = <0x0 0xfd5a6000 0x0 0x2000>;
47 clocks = <&cru PCLK_VO0GRF>;
48 };
49
50 usb_grf: syscon@fd5ac000 {
51 compatible = "rockchip,rk3588-usb-grf", "syscon";
52 reg = <0x0 0xfd5ac000 0x0 0x4000>;
53 };
54
Jonas Karlmanf9b28c22023-10-17 17:02:11 +000055 usbdpphy0_grf: syscon@fd5c8000 {
56 compatible = "rockchip,rk3588-usbdpphy-grf", "syscon";
57 reg = <0x0 0xfd5c8000 0x0 0x4000>;
58 };
59
Joseph Chena1d63212023-05-29 13:01:34 +030060 usb2phy0_grf: syscon@fd5d0000 {
Jonas Karlmane0a5afe2024-05-04 19:43:06 +000061 compatible = "rockchip,rk3588-usb2phy-grf", "syscon", "simple-mfd";
Joseph Chena1d63212023-05-29 13:01:34 +030062 reg = <0x0 0xfd5d0000 0x0 0x4000>;
63 #address-cells = <1>;
64 #size-cells = <1>;
65
Jonas Karlmane0a5afe2024-05-04 19:43:06 +000066 u2phy0: usb2phy@0 {
Joseph Chena1d63212023-05-29 13:01:34 +030067 compatible = "rockchip,rk3588-usb2phy";
68 reg = <0x0 0x10>;
Jonas Karlmane0a5afe2024-05-04 19:43:06 +000069 #clock-cells = <0>;
Joseph Chena1d63212023-05-29 13:01:34 +030070 clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>;
71 clock-names = "phyclk";
72 clock-output-names = "usb480m_phy0";
Jonas Karlmane0a5afe2024-05-04 19:43:06 +000073 interrupts = <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH 0>;
74 resets = <&cru SRST_OTGPHY_U3_0>, <&cru SRST_P_USB2PHY_U3_0_GRF0>;
75 reset-names = "phy", "apb";
Joseph Chena1d63212023-05-29 13:01:34 +030076 status = "disabled";
77
78 u2phy0_otg: otg-port {
79 #phy-cells = <0>;
80 status = "disabled";
81 };
82 };
83 };
84
Chris Morgan7f255042023-04-13 09:13:03 -050085 rng: rng@fe378000 {
86 compatible = "rockchip,trngv1";
87 reg = <0x0 0xfe378000 0x0 0x200>;
Chris Morgan7f255042023-04-13 09:13:03 -050088 };
Joseph Chen84445502023-05-17 13:01:00 +030089
Joseph Chena1d63212023-05-29 13:01:34 +030090 usbdp_phy0: phy@fed80000 {
91 compatible = "rockchip,rk3588-usbdp-phy";
92 reg = <0x0 0xfed80000 0x0 0x10000>;
Jonas Karlmane0a5afe2024-05-04 19:43:06 +000093 #phy-cells = <1>;
Joseph Chena1d63212023-05-29 13:01:34 +030094 clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>,
95 <&cru CLK_USBDP_PHY0_IMMORTAL>,
96 <&cru PCLK_USBDPPHY0>,
97 <&u2phy0>;
98 clock-names = "refclk", "immortal", "pclk", "utmi";
99 resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>,
100 <&cru SRST_USBDP_COMBO_PHY0_CMN>,
101 <&cru SRST_USBDP_COMBO_PHY0_LANE>,
102 <&cru SRST_USBDP_COMBO_PHY0_PCS>,
103 <&cru SRST_P_USBDPPHY0>;
104 reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb";
Jonas Karlmane0a5afe2024-05-04 19:43:06 +0000105 rockchip,u2phy-grf = <&usb2phy0_grf>;
106 rockchip,usb-grf = <&usb_grf>;
107 rockchip,usbdpphy-grf = <&usbdpphy0_grf>;
108 rockchip,vo-grf = <&vo0_grf>;
Joseph Chena1d63212023-05-29 13:01:34 +0300109 status = "disabled";
Joseph Chena1d63212023-05-29 13:01:34 +0300110 };
Jagan Tekia4dd7932023-01-30 20:27:46 +0530111};
112
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000113#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
114&binman {
115 simple-bin-spi {
116 mkimage {
117 args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
118 offset = <0x8000>;
119 };
120 };
121};
122#endif
123
124&cru {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000125 bootph-all;
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000126};
127
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300128&emmc_bus8 {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000129 bootph-pre-ram;
130 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300131};
132
133&emmc_clk {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000134 bootph-pre-ram;
135 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300136};
137
138&emmc_cmd {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000139 bootph-pre-ram;
140 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300141};
142
143&emmc_data_strobe {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000144 bootph-pre-ram;
145 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300146};
147
148&emmc_rstnout {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000149 bootph-pre-ram;
150 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300151};
152
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000153&ioc {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000154 bootph-all;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300155};
156
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000157&pcfg_pull_down {
158 bootph-all;
159};
160
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300161&pcfg_pull_none {
162 bootph-all;
163};
164
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300165&pcfg_pull_up {
166 bootph-all;
167};
168
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000169&pcfg_pull_up_drv_level_2 {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000170 bootph-pre-ram;
171 bootph-some-ram;
172};
173
174&php_grf {
Tom Rinide70b472023-03-27 15:20:19 -0400175 bootph-all;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530176};
177
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000178&pinctrl {
179 bootph-all;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530180};
181
Jonas Karlman592101d2024-01-26 22:14:52 +0000182&pmu1grf {
183 bootph-all;
184};
185
Jonas Karlmanfc805c22023-04-17 19:07:21 +0000186&scmi {
187 bootph-pre-ram;
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000188 bootph-some-ram;
Jonas Karlmanfc805c22023-04-17 19:07:21 +0000189};
190
191&scmi_clk {
192 bootph-pre-ram;
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000193 bootph-some-ram;
Jonas Karlmanfc805c22023-04-17 19:07:21 +0000194};
195
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000196&sdhci {
Jonas Karlmanfc805c22023-04-17 19:07:21 +0000197 bootph-pre-ram;
Quentin Schulz71f30122024-03-11 13:01:58 +0100198 bootph-some-ram;
Jonas Karlmanfc805c22023-04-17 19:07:21 +0000199 u-boot,spl-fifo-mode;
200};
201
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000202&sdmmc {
Jonas Karlmanced8be02023-04-18 16:46:41 +0000203 bootph-pre-ram;
Quentin Schulz71f30122024-03-11 13:01:58 +0100204 bootph-some-ram;
Jonas Karlmanf79c5372023-05-06 17:41:11 +0000205 u-boot,spl-fifo-mode;
Jonas Karlmanced8be02023-04-18 16:46:41 +0000206};
207
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300208&sdmmc_bus4 {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000209 bootph-pre-ram;
210 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300211};
212
213&sdmmc_clk {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000214 bootph-pre-ram;
215 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300216};
217
218&sdmmc_cmd {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000219 bootph-pre-ram;
220 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300221};
222
223&sdmmc_det {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000224 bootph-pre-ram;
225 bootph-some-ram;
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300226};
227
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000228&sfc {
229 u-boot,spl-sfc-no-dma;
230};
231
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000232&sys_grf {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000233 bootph-all;
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000234};
235
Jagan Tekia4dd7932023-01-30 20:27:46 +0530236&uart2 {
Jonas Karlmanab956bb2024-04-22 06:28:50 +0000237 bootph-all;
Jonas Karlman87fc32b2024-01-26 22:14:55 +0000238 clock-frequency = <24000000>;
Jagan Tekia4dd7932023-01-30 20:27:46 +0530239};
240
Eugen Hristev2b2416e2023-07-04 22:05:11 +0300241&uart2m0_xfer {
242 bootph-all;
243};
244
Jonas Karlman7b733dd2024-04-22 06:28:48 +0000245&xin24m {
246 bootph-all;
Jonas Karlmanadb78942023-05-18 15:39:30 +0000247};