Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * (C) Copyright 2019 Rockchip Electronics Co., Ltd |
| 4 | */ |
| 5 | |
Quentin Schulz | d9ffa5e | 2022-09-02 15:10:52 +0200 | [diff] [blame] | 6 | #include "rockchip-u-boot.dtsi" |
| 7 | |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 8 | / { |
| 9 | aliases { |
| 10 | mmc0 = &emmc; |
| 11 | mmc1 = &sdmmc; |
Johannes Krottmayer | 47075e3 | 2020-07-08 23:57:40 +0200 | [diff] [blame] | 12 | spi0 = &spi0; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 13 | }; |
| 14 | |
| 15 | chosen { |
Jonas Karlman | 7a1bd39 | 2024-02-17 00:22:27 +0000 | [diff] [blame] | 16 | u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 17 | }; |
| 18 | |
| 19 | dmc: dmc { |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 20 | compatible = "rockchip,rk3328-dmc"; |
| 21 | reg = <0x0 0xff400000 0x0 0x1000 |
| 22 | 0x0 0xff780000 0x0 0x3000 |
| 23 | 0x0 0xff100000 0x0 0x1000 |
| 24 | 0x0 0xff440000 0x0 0x1000 |
| 25 | 0x0 0xff720000 0x0 0x1000 |
| 26 | 0x0 0xff798000 0x0 0x1000>; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 27 | bootph-all; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 28 | }; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | &cru { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 32 | bootph-all; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 33 | }; |
| 34 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 35 | &emmc { |
| 36 | bootph-pre-ram; |
| 37 | bootph-some-ram; |
| 38 | |
| 39 | /* mmc to sram can't do dma, prevent aborts transferring TF-A parts */ |
| 40 | u-boot,spl-fifo-mode; |
| 41 | }; |
| 42 | |
| 43 | &emmc_bus8 { |
| 44 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 45 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | &emmc_clk { |
| 49 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 50 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 51 | }; |
| 52 | |
| 53 | &emmc_cmd { |
| 54 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 55 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | &gpio0 { |
| 59 | bootph-pre-ram; |
| 60 | }; |
| 61 | |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 62 | &grf { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 63 | bootph-all; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 64 | }; |
| 65 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 66 | &pcfg_pull_none { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 67 | bootph-all; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 68 | }; |
| 69 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 70 | &pcfg_pull_none_8ma { |
| 71 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 72 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | &pcfg_pull_none_12ma { |
| 76 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 77 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 78 | }; |
| 79 | |
| 80 | &pcfg_pull_up { |
Simon Glass | d3a98cb | 2023-02-13 08:56:33 -0700 | [diff] [blame] | 81 | bootph-all; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 82 | }; |
Kever Yang | 49ec4b9 | 2019-12-31 15:57:55 +0800 | [diff] [blame] | 83 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 84 | &pcfg_pull_up_4ma { |
| 85 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 86 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | &pcfg_pull_up_8ma { |
| 90 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 91 | bootph-some-ram; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 92 | }; |
| 93 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 94 | &pcfg_pull_up_12ma { |
| 95 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 96 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 97 | }; |
| 98 | |
| 99 | &pinctrl { |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 100 | bootph-all; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 101 | }; |
| 102 | |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 103 | &sdmmc { |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 104 | bootph-pre-ram; |
| 105 | bootph-some-ram; |
Kever Yang | 49ec4b9 | 2019-12-31 15:57:55 +0800 | [diff] [blame] | 106 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 107 | /* mmc to sram can't do dma, prevent aborts transferring TF-A parts */ |
Kever Yang | 49ec4b9 | 2019-12-31 15:57:55 +0800 | [diff] [blame] | 108 | u-boot,spl-fifo-mode; |
Kever Yang | e68e10b | 2019-08-15 11:40:56 +0800 | [diff] [blame] | 109 | }; |
Chen-Yu Tsai | 2c63f6d | 2020-04-27 14:52:48 +0800 | [diff] [blame] | 110 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 111 | &sdmmc0_bus4 { |
| 112 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 113 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 114 | }; |
| 115 | |
| 116 | &sdmmc0_clk { |
| 117 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 118 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 119 | }; |
| 120 | |
| 121 | &sdmmc0_cmd { |
| 122 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 123 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 124 | }; |
| 125 | |
| 126 | &sdmmc0_dectn { |
| 127 | bootph-pre-ram; |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 128 | bootph-some-ram; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 129 | }; |
| 130 | |
| 131 | &sdmmc0m1_pin { |
| 132 | bootph-pre-ram; |
| 133 | }; |
| 134 | |
| 135 | &uart2 { |
| 136 | bootph-all; |
| 137 | clock-frequency = <24000000>; |
Chen-Yu Tsai | 2c63f6d | 2020-04-27 14:52:48 +0800 | [diff] [blame] | 138 | }; |
Johannes Krottmayer | 47075e3 | 2020-07-08 23:57:40 +0200 | [diff] [blame] | 139 | |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 140 | &uart2m1_xfer { |
Jonas Karlman | 69e7844 | 2024-05-01 19:21:24 +0000 | [diff] [blame] | 141 | bootph-pre-sram; |
| 142 | bootph-pre-ram; |
Johannes Krottmayer | 47075e3 | 2020-07-08 23:57:40 +0200 | [diff] [blame] | 143 | }; |
Jonas Karlman | d6a1b57 | 2024-02-17 00:22:34 +0000 | [diff] [blame] | 144 | |
Jagan Teki | 7d4dba9 | 2024-01-17 13:21:51 +0530 | [diff] [blame] | 145 | &vop { |
Jonas Karlman | 5fc0915 | 2024-04-21 20:12:29 +0000 | [diff] [blame] | 146 | bootph-some-ram; |
Jagan Teki | 7d4dba9 | 2024-01-17 13:21:51 +0530 | [diff] [blame] | 147 | }; |
| 148 | |
Jonas Karlman | e4b50e0 | 2024-02-17 00:22:39 +0000 | [diff] [blame] | 149 | #ifdef CONFIG_ROCKCHIP_SPI_IMAGE |
| 150 | &binman { |
| 151 | simple-bin-spi { |
| 152 | mkimage { |
| 153 | args = "-n", CONFIG_SYS_SOC, "-T", "rksd"; |
| 154 | offset = <0x8000>; |
| 155 | }; |
| 156 | }; |
| 157 | }; |
| 158 | #endif |