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