Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 1 | // 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 Chen | 8444550 | 2023-05-17 13:01:00 +0300 | [diff] [blame] | 7 | #include <dt-bindings/phy/phy.h> |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 8 | |
| 9 | / { |
Jonas Karlman | a5e2865 | 2023-07-28 12:05:41 +0000 | [diff] [blame] | 10 | aliases { |
| 11 | spi0 = &spi0; |
| 12 | spi1 = &spi1; |
| 13 | spi2 = &spi2; |
| 14 | spi3 = &spi3; |
| 15 | spi4 = &spi4; |
| 16 | spi5 = &sfc; |
| 17 | }; |
| 18 | |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 19 | dmc { |
| 20 | compatible = "rockchip,rk3588-dmc"; |
Tom Rini | de70b47 | 2023-03-27 15:20:19 -0400 | [diff] [blame] | 21 | bootph-all; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 22 | status = "okay"; |
| 23 | }; |
| 24 | |
Joseph Chen | a1d6321 | 2023-05-29 13:01:34 +0300 | [diff] [blame] | 25 | 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 | |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 56 | pmu1_grf: syscon@fd58a000 { |
Tom Rini | de70b47 | 2023-03-27 15:20:19 -0400 | [diff] [blame] | 57 | bootph-all; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 58 | compatible = "rockchip,rk3588-pmu1-grf", "syscon"; |
| 59 | reg = <0x0 0xfd58a000 0x0 0x2000>; |
| 60 | }; |
Jagan Teki | 275d851 | 2023-01-30 20:27:47 +0530 | [diff] [blame] | 61 | |
Joseph Chen | a1d6321 | 2023-05-29 13:01:34 +0300 | [diff] [blame] | 62 | usb2phy0_grf: syscon@fd5d0000 { |
| 63 | compatible = "rockchip,rk3588-usb2phy-grf", "syscon", |
| 64 | "simple-mfd"; |
| 65 | reg = <0x0 0xfd5d0000 0x0 0x4000>; |
| 66 | #address-cells = <1>; |
| 67 | #size-cells = <1>; |
| 68 | |
| 69 | u2phy0: usb2-phy@0 { |
| 70 | compatible = "rockchip,rk3588-usb2phy"; |
| 71 | reg = <0x0 0x10>; |
| 72 | interrupts = <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH 0>; |
| 73 | resets = <&cru SRST_OTGPHY_U3_0>, <&cru SRST_P_USB2PHY_U3_0_GRF0>; |
| 74 | reset-names = "phy", "apb"; |
| 75 | clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>; |
| 76 | clock-names = "phyclk"; |
| 77 | clock-output-names = "usb480m_phy0"; |
| 78 | #clock-cells = <0>; |
| 79 | rockchip,usbctrl-grf = <&usb_grf>; |
| 80 | status = "disabled"; |
| 81 | |
| 82 | u2phy0_otg: otg-port { |
| 83 | #phy-cells = <0>; |
| 84 | status = "disabled"; |
| 85 | }; |
| 86 | }; |
| 87 | }; |
| 88 | |
Joseph Chen | a1d6321 | 2023-05-29 13:01:34 +0300 | [diff] [blame] | 89 | vo0_grf: syscon@fd5a6000 { |
| 90 | compatible = "rockchip,rk3588-vo-grf", "syscon"; |
| 91 | reg = <0x0 0xfd5a6000 0x0 0x2000>; |
| 92 | clocks = <&cru PCLK_VO0GRF>; |
| 93 | }; |
| 94 | |
| 95 | usb_grf: syscon@fd5ac000 { |
| 96 | compatible = "rockchip,rk3588-usb-grf", "syscon"; |
| 97 | reg = <0x0 0xfd5ac000 0x0 0x4000>; |
| 98 | }; |
| 99 | |
Joseph Chen | a1d6321 | 2023-05-29 13:01:34 +0300 | [diff] [blame] | 100 | usbdpphy0_grf: syscon@fd5c8000 { |
| 101 | compatible = "rockchip,rk3588-usbdpphy-grf", "syscon"; |
| 102 | reg = <0x0 0xfd5c8000 0x0 0x4000>; |
| 103 | }; |
| 104 | |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 105 | sfc: spi@fe2b0000 { |
| 106 | compatible = "rockchip,sfc"; |
| 107 | reg = <0x0 0xfe2b0000 0x0 0x4000>; |
| 108 | interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH 0>; |
| 109 | clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>; |
| 110 | clock-names = "clk_sfc", "hclk_sfc"; |
| 111 | status = "disabled"; |
| 112 | }; |
| 113 | |
Chris Morgan | 7f25504 | 2023-04-13 09:13:03 -0500 | [diff] [blame] | 114 | rng: rng@fe378000 { |
| 115 | compatible = "rockchip,trngv1"; |
| 116 | reg = <0x0 0xfe378000 0x0 0x200>; |
| 117 | status = "disabled"; |
| 118 | }; |
Joseph Chen | 8444550 | 2023-05-17 13:01:00 +0300 | [diff] [blame] | 119 | |
Joseph Chen | a1d6321 | 2023-05-29 13:01:34 +0300 | [diff] [blame] | 120 | usbdp_phy0: phy@fed80000 { |
| 121 | compatible = "rockchip,rk3588-usbdp-phy"; |
| 122 | reg = <0x0 0xfed80000 0x0 0x10000>; |
| 123 | rockchip,u2phy-grf = <&usb2phy0_grf>; |
| 124 | rockchip,usb-grf = <&usb_grf>; |
| 125 | rockchip,usbdpphy-grf = <&usbdpphy0_grf>; |
| 126 | rockchip,vo-grf = <&vo0_grf>; |
| 127 | clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>, |
| 128 | <&cru CLK_USBDP_PHY0_IMMORTAL>, |
| 129 | <&cru PCLK_USBDPPHY0>, |
| 130 | <&u2phy0>; |
| 131 | clock-names = "refclk", "immortal", "pclk", "utmi"; |
| 132 | resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>, |
| 133 | <&cru SRST_USBDP_COMBO_PHY0_CMN>, |
| 134 | <&cru SRST_USBDP_COMBO_PHY0_LANE>, |
| 135 | <&cru SRST_USBDP_COMBO_PHY0_PCS>, |
| 136 | <&cru SRST_P_USBDPPHY0>; |
| 137 | reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb"; |
| 138 | status = "disabled"; |
| 139 | |
| 140 | usbdp_phy0_dp: dp-port { |
| 141 | #phy-cells = <0>; |
| 142 | status = "disabled"; |
| 143 | }; |
| 144 | |
| 145 | usbdp_phy0_u3: usb3-port { |
| 146 | #phy-cells = <0>; |
| 147 | status = "disabled"; |
| 148 | }; |
| 149 | }; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 150 | }; |
| 151 | |
Eugen Hristev | 2b2416e | 2023-07-04 22:05:11 +0300 | [diff] [blame] | 152 | &emmc_bus8 { |
| 153 | bootph-all; |
| 154 | }; |
| 155 | |
| 156 | &emmc_clk { |
| 157 | bootph-all; |
| 158 | }; |
| 159 | |
| 160 | &emmc_cmd { |
| 161 | bootph-all; |
| 162 | }; |
| 163 | |
| 164 | &emmc_data_strobe { |
| 165 | bootph-all; |
| 166 | }; |
| 167 | |
| 168 | &emmc_rstnout { |
| 169 | bootph-all; |
| 170 | }; |
| 171 | |
| 172 | &pinctrl { |
| 173 | bootph-all; |
| 174 | }; |
| 175 | |
| 176 | &pcfg_pull_none { |
| 177 | bootph-all; |
| 178 | }; |
| 179 | |
| 180 | &pcfg_pull_up_drv_level_2 { |
| 181 | bootph-all; |
| 182 | }; |
| 183 | |
| 184 | &pcfg_pull_up { |
| 185 | bootph-all; |
| 186 | }; |
| 187 | |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 188 | &xin24m { |
Tom Rini | de70b47 | 2023-03-27 15:20:19 -0400 | [diff] [blame] | 189 | bootph-all; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 190 | status = "okay"; |
| 191 | }; |
| 192 | |
| 193 | &cru { |
Tom Rini | de70b47 | 2023-03-27 15:20:19 -0400 | [diff] [blame] | 194 | bootph-pre-ram; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 195 | status = "okay"; |
| 196 | }; |
| 197 | |
| 198 | &sys_grf { |
Tom Rini | de70b47 | 2023-03-27 15:20:19 -0400 | [diff] [blame] | 199 | bootph-pre-ram; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 200 | status = "okay"; |
| 201 | }; |
| 202 | |
Jonas Karlman | fc805c2 | 2023-04-17 19:07:21 +0000 | [diff] [blame] | 203 | &scmi { |
| 204 | bootph-pre-ram; |
| 205 | }; |
| 206 | |
| 207 | &scmi_clk { |
| 208 | bootph-pre-ram; |
| 209 | }; |
| 210 | |
| 211 | &sdmmc { |
| 212 | bootph-pre-ram; |
| 213 | u-boot,spl-fifo-mode; |
| 214 | }; |
| 215 | |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 216 | &sdhci { |
| 217 | bootph-pre-ram; |
Jonas Karlman | f79c537 | 2023-05-06 17:41:11 +0000 | [diff] [blame] | 218 | u-boot,spl-fifo-mode; |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 219 | }; |
| 220 | |
Eugen Hristev | 2b2416e | 2023-07-04 22:05:11 +0300 | [diff] [blame] | 221 | &sdmmc_bus4 { |
| 222 | bootph-all; |
| 223 | }; |
| 224 | |
| 225 | &sdmmc_clk { |
| 226 | bootph-all; |
| 227 | }; |
| 228 | |
| 229 | &sdmmc_cmd { |
| 230 | bootph-all; |
| 231 | }; |
| 232 | |
| 233 | &sdmmc_det { |
| 234 | bootph-all; |
| 235 | }; |
| 236 | |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 237 | &uart2 { |
| 238 | clock-frequency = <24000000>; |
Tom Rini | de70b47 | 2023-03-27 15:20:19 -0400 | [diff] [blame] | 239 | bootph-pre-ram; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 240 | status = "okay"; |
| 241 | }; |
| 242 | |
Eugen Hristev | 2b2416e | 2023-07-04 22:05:11 +0300 | [diff] [blame] | 243 | &uart2m0_xfer { |
| 244 | bootph-all; |
| 245 | }; |
| 246 | |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 247 | &ioc { |
Tom Rini | de70b47 | 2023-03-27 15:20:19 -0400 | [diff] [blame] | 248 | bootph-pre-ram; |
Jagan Teki | a4dd793 | 2023-01-30 20:27:46 +0530 | [diff] [blame] | 249 | }; |
Jonas Karlman | adb7894 | 2023-05-18 15:39:30 +0000 | [diff] [blame] | 250 | |
| 251 | #ifdef CONFIG_ROCKCHIP_SPI_IMAGE |
| 252 | &binman { |
| 253 | simple-bin-spi { |
| 254 | mkimage { |
| 255 | args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; |
| 256 | offset = <0x8000>; |
| 257 | }; |
| 258 | }; |
| 259 | }; |
| 260 | #endif |