Jagan Teki | 208badd | 2019-03-11 13:50:03 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com> |
| 4 | */ |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 5 | #define USB_CLASS_HUB 9 |
Jagan Teki | 208badd | 2019-03-11 13:50:03 +0530 | [diff] [blame] | 6 | |
Simon Glass | 8251e03 | 2020-07-19 13:55:58 -0600 | [diff] [blame] | 7 | #include "rockchip-u-boot.dtsi" |
| 8 | |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 9 | / { |
| 10 | aliases { |
| 11 | mmc0 = &sdhci; |
| 12 | mmc1 = &sdmmc; |
Jagan Teki | 77c31a8 | 2020-05-09 22:26:23 +0530 | [diff] [blame] | 13 | pci0 = &pcie0; |
Simon Glass | 8251e03 | 2020-07-19 13:55:58 -0600 | [diff] [blame] | 14 | spi1 = &spi1; |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 15 | }; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 16 | |
Jonas Karlman | 747c957 | 2024-04-30 15:30:18 +0000 | [diff] [blame] | 17 | chosen { |
| 18 | u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc; |
| 19 | }; |
| 20 | |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 21 | pmusgrf: syscon@ff330000 { |
| 22 | compatible = "rockchip,rk3399-pmusgrf", "syscon"; |
| 23 | reg = <0x0 0xff330000 0x0 0xe3d4>; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 24 | bootph-all; |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | cic: syscon@ff620000 { |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 28 | compatible = "rockchip,rk3399-cic", "syscon"; |
| 29 | reg = <0x0 0xff620000 0x0 0x100>; |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 30 | bootph-all; |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | dfi: dfi@ff630000 { |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 34 | reg = <0x00 0xff630000 0x00 0x4000>; |
| 35 | compatible = "rockchip,rk3399-dfi"; |
| 36 | rockchip,pmu = <&pmugrf>; |
| 37 | clocks = <&cru PCLK_DDR_MON>; |
| 38 | clock-names = "pclk_ddr_mon"; |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 39 | bootph-all; |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 40 | }; |
| 41 | |
Lin Jinhan | 3e714cf | 2020-03-31 17:39:57 +0800 | [diff] [blame] | 42 | rng: rng@ff8b8000 { |
Jonas Karlman | 64ba61f | 2024-02-17 00:22:36 +0000 | [diff] [blame] | 43 | compatible = "rockchip,rk3399-crypto"; |
Lin Jinhan | 3e714cf | 2020-03-31 17:39:57 +0800 | [diff] [blame] | 44 | reg = <0x0 0xff8b8000 0x0 0x1000>; |
Lin Jinhan | 3e714cf | 2020-03-31 17:39:57 +0800 | [diff] [blame] | 45 | }; |
| 46 | |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 47 | dmc: dmc { |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 48 | compatible = "rockchip,rk3399-dmc"; |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 49 | reg = <0x0 0xffa80000 0x0 0x0800 |
| 50 | 0x0 0xffa80800 0x0 0x1800 |
| 51 | 0x0 0xffa82000 0x0 0x2000 |
| 52 | 0x0 0xffa84000 0x0 0x1000 |
| 53 | 0x0 0xffa88000 0x0 0x0800 |
| 54 | 0x0 0xffa88800 0x0 0x1800 |
| 55 | 0x0 0xffa8a000 0x0 0x2000 |
| 56 | 0x0 0xffa8c000 0x0 0x1000>; |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 57 | devfreq-events = <&dfi>; |
| 58 | interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>; |
| 59 | clocks = <&cru SCLK_DDRCLK>; |
| 60 | clock-names = "dmc_clk"; |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 61 | bootph-all; |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 62 | }; |
Simon Glass | 8251e03 | 2020-07-19 13:55:58 -0600 | [diff] [blame] | 63 | }; |
| 64 | |
Quentin Schulz | 12df9cf | 2022-09-02 15:10:54 +0200 | [diff] [blame] | 65 | #if defined(CONFIG_ROCKCHIP_SPI_IMAGE) && defined(CONFIG_HAS_ROM) |
Simon Glass | 8251e03 | 2020-07-19 13:55:58 -0600 | [diff] [blame] | 66 | &binman { |
Simon Glass | f126822 | 2023-01-07 14:07:17 -0700 | [diff] [blame] | 67 | multiple-images; |
Simon Glass | 8251e03 | 2020-07-19 13:55:58 -0600 | [diff] [blame] | 68 | rom { |
| 69 | filename = "u-boot.rom"; |
| 70 | size = <0x400000>; |
| 71 | pad-byte = <0xff>; |
| 72 | |
| 73 | mkimage { |
| 74 | args = "-n rk3399 -T rkspi"; |
| 75 | u-boot-spl { |
| 76 | }; |
| 77 | }; |
| 78 | u-boot-img { |
| 79 | offset = <0x40000>; |
| 80 | }; |
| 81 | u-boot { |
| 82 | offset = <0x300000>; |
| 83 | }; |
| 84 | fdtmap { |
| 85 | }; |
| 86 | }; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 87 | }; |
Simon Glass | f126822 | 2023-01-07 14:07:17 -0700 | [diff] [blame] | 88 | #endif /* CONFIG_ROCKCHIP_SPI_IMAGE && CONFIG_HAS_ROM */ |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 89 | |
Peter Robinson | 94fb4c4 | 2020-01-20 09:17:00 +0000 | [diff] [blame] | 90 | &cru { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 91 | bootph-all; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 92 | }; |
| 93 | |
Yifeng Zhao | d7e4c32 | 2021-11-01 12:43:47 +0800 | [diff] [blame] | 94 | &emmc_phy { |
Jonas Karlman | 6a6b4f5 | 2024-04-30 15:30:24 +0000 | [diff] [blame] | 95 | bootph-pre-ram; |
| 96 | bootph-some-ram; |
Yifeng Zhao | d7e4c32 | 2021-11-01 12:43:47 +0800 | [diff] [blame] | 97 | }; |
| 98 | |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 99 | &grf { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 100 | bootph-all; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 101 | }; |
| 102 | |
Jonas Karlman | 6a6b4f5 | 2024-04-30 15:30:24 +0000 | [diff] [blame] | 103 | &pcfg_pull_none { |
| 104 | bootph-all; |
| 105 | }; |
| 106 | |
| 107 | &pcfg_pull_up { |
| 108 | bootph-all; |
| 109 | }; |
| 110 | |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 111 | &pinctrl { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 112 | bootph-all; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 113 | }; |
| 114 | |
Jagan Teki | 9b54585 | 2019-07-16 17:27:34 +0530 | [diff] [blame] | 115 | &pmu { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 116 | bootph-all; |
Jagan Teki | 9b54585 | 2019-07-16 17:27:34 +0530 | [diff] [blame] | 117 | }; |
| 118 | |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 119 | &pmucru { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 120 | bootph-all; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 121 | }; |
| 122 | |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 123 | &pmugrf { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 124 | bootph-all; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 125 | }; |
| 126 | |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 127 | &sdhci { |
Jonas Karlman | 6a6b4f5 | 2024-04-30 15:30:24 +0000 | [diff] [blame] | 128 | bootph-pre-ram; |
| 129 | bootph-some-ram; |
Jonas Karlman | 47f7e5f | 2024-04-30 15:30:20 +0000 | [diff] [blame] | 130 | max-frequency = <200000000>; |
| 131 | |
| 132 | /* mmc to sram can't do dma, prevent aborts transferring TF-A parts */ |
Jonas Karlman | f79c537 | 2023-05-06 17:41:11 +0000 | [diff] [blame] | 133 | u-boot,spl-fifo-mode; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 134 | }; |
| 135 | |
Jagan Teki | 208badd | 2019-03-11 13:50:03 +0530 | [diff] [blame] | 136 | &sdmmc { |
Jonas Karlman | 6a6b4f5 | 2024-04-30 15:30:24 +0000 | [diff] [blame] | 137 | bootph-pre-ram; |
| 138 | bootph-some-ram; |
Deepak Das | 4ef2ded | 2020-04-15 08:55:24 +0530 | [diff] [blame] | 139 | |
| 140 | /* mmc to sram can't do dma, prevent aborts transferring TF-A parts */ |
| 141 | u-boot,spl-fifo-mode; |
Jagan Teki | 208badd | 2019-03-11 13:50:03 +0530 | [diff] [blame] | 142 | }; |
Jagan Teki | 60c5fed | 2019-05-07 23:51:51 +0530 | [diff] [blame] | 143 | |
Jonas Karlman | 6a6b4f5 | 2024-04-30 15:30:24 +0000 | [diff] [blame] | 144 | &sdmmc_bus4 { |
| 145 | bootph-pre-ram; |
| 146 | bootph-some-ram; |
| 147 | }; |
| 148 | |
| 149 | &sdmmc_cd { |
| 150 | bootph-pre-ram; |
| 151 | bootph-some-ram; |
| 152 | }; |
| 153 | |
| 154 | &sdmmc_clk { |
| 155 | bootph-pre-ram; |
| 156 | bootph-some-ram; |
| 157 | }; |
| 158 | |
| 159 | &sdmmc_cmd { |
| 160 | bootph-pre-ram; |
| 161 | bootph-some-ram; |
| 162 | }; |
| 163 | |
| 164 | &spi1_clk { |
| 165 | bootph-pre-ram; |
| 166 | bootph-some-ram; |
| 167 | }; |
| 168 | |
| 169 | &spi1_cs0 { |
| 170 | bootph-pre-ram; |
| 171 | bootph-some-ram; |
| 172 | }; |
| 173 | |
| 174 | &spi1_rx { |
| 175 | bootph-pre-ram; |
| 176 | bootph-some-ram; |
| 177 | }; |
| 178 | |
| 179 | &spi1_tx { |
| 180 | bootph-pre-ram; |
| 181 | bootph-some-ram; |
Jagan Teki | 60c5fed | 2019-05-07 23:51:51 +0530 | [diff] [blame] | 182 | }; |
Jagan Teki | 2ff51fd | 2019-06-21 00:25:02 +0530 | [diff] [blame] | 183 | |
Jagan Teki | 2ff51fd | 2019-06-21 00:25:02 +0530 | [diff] [blame] | 184 | &uart2 { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 185 | bootph-all; |
Jonas Karlman | fab0bd3 | 2024-04-30 15:30:23 +0000 | [diff] [blame] | 186 | clock-frequency = <24000000>; |
| 187 | }; |
| 188 | |
| 189 | &uart2c_xfer { |
| 190 | bootph-pre-sram; |
| 191 | bootph-pre-ram; |
Jagan Teki | 2ff51fd | 2019-06-21 00:25:02 +0530 | [diff] [blame] | 192 | }; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 193 | |
| 194 | &vopb { |
Jonas Karlman | 9851991 | 2024-04-30 15:30:21 +0000 | [diff] [blame] | 195 | bootph-some-ram; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 196 | }; |
| 197 | |
| 198 | &vopl { |
Jonas Karlman | 9851991 | 2024-04-30 15:30:21 +0000 | [diff] [blame] | 199 | bootph-some-ram; |
Peter Robinson | dd44a15 | 2019-11-09 20:30:05 +0000 | [diff] [blame] | 200 | }; |