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