Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 1 | #include <config.h> |
| 2 | |
Samuel Holland | ead2bf1 | 2020-10-21 21:12:12 -0500 | [diff] [blame] | 3 | #ifdef CONFIG_MACH_SUN50I_H6 |
| 4 | #define BL31_ADDR 0x104000 |
Samuel Holland | 6b7db0a | 2020-10-21 21:12:16 -0500 | [diff] [blame] | 5 | #define SCP_ADDR 0x114000 |
Jernej Skrabec | e638e05 | 2021-01-11 21:11:46 +0100 | [diff] [blame] | 6 | #elif defined(CONFIG_MACH_SUN50I_H616) |
Andre Przywara | 10d94b1 | 2021-03-25 16:20:13 +0000 | [diff] [blame] | 7 | #define BL31_ADDR 0x40000000 |
Samuel Holland | ead2bf1 | 2020-10-21 21:12:12 -0500 | [diff] [blame] | 8 | #else |
| 9 | #define BL31_ADDR 0x44000 |
Samuel Holland | 6b7db0a | 2020-10-21 21:12:16 -0500 | [diff] [blame] | 10 | #define SCP_ADDR 0x50000 |
Samuel Holland | ead2bf1 | 2020-10-21 21:12:12 -0500 | [diff] [blame] | 11 | #endif |
| 12 | |
Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 13 | / { |
Jagan Teki | 301a665 | 2019-01-21 16:01:15 +0530 | [diff] [blame] | 14 | aliases { |
Andre Przywara | 724b9a8 | 2021-04-16 11:52:27 +0100 | [diff] [blame] | 15 | mmc0 = &mmc0; |
Andre Przywara | 42284ec | 2021-11-30 23:18:54 +0000 | [diff] [blame] | 16 | #if CONFIG_MMC_SUNXI_SLOT_EXTRA == 2 |
Jagan Teki | 301a665 | 2019-01-21 16:01:15 +0530 | [diff] [blame] | 17 | mmc1 = &mmc2; |
Icenowy Zheng | 6380911 | 2021-07-22 14:30:04 +0800 | [diff] [blame] | 18 | #endif |
Jagan Teki | 301a665 | 2019-01-21 16:01:15 +0530 | [diff] [blame] | 19 | }; |
| 20 | |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 21 | binman: binman { |
| 22 | multiple-images; |
| 23 | }; |
| 24 | }; |
| 25 | |
Andre Przywara | 1987b0c | 2022-09-06 15:59:57 +0100 | [diff] [blame] | 26 | /* Let U-Boot be the firmware layer that controls the watchdog. */ |
| 27 | #ifdef CONFIG_MACH_SUN8I_R528 |
| 28 | &wdt { |
| 29 | status = "okay"; |
| 30 | }; |
| 31 | #endif |
| 32 | |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 33 | &binman { |
| 34 | u-boot-sunxi-with-spl { |
Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 35 | filename = "u-boot-sunxi-with-spl.bin"; |
| 36 | pad-byte = <0xff>; |
Samuel Holland | 85852b2 | 2020-10-21 21:12:10 -0500 | [diff] [blame] | 37 | |
Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 38 | blob { |
Samuel Holland | 0cb149a | 2023-01-21 17:25:17 -0600 | [diff] [blame] | 39 | /* |
| 40 | * This value matches SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR |
| 41 | * and SYS_SPI_U_BOOT_OFFS if those are defined. |
| 42 | */ |
| 43 | min-size = <0x8000>; |
Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 44 | filename = "spl/sunxi-spl.bin"; |
| 45 | }; |
Samuel Holland | 85852b2 | 2020-10-21 21:12:10 -0500 | [diff] [blame] | 46 | |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 47 | #ifdef CONFIG_ARM64 |
| 48 | fit { |
| 49 | description = "Configuration to load ATF before U-Boot"; |
| 50 | #address-cells = <1>; |
| 51 | fit,fdt-list = "of-list"; |
| 52 | |
| 53 | images { |
| 54 | uboot { |
| 55 | description = "U-Boot (64-bit)"; |
| 56 | type = "standalone"; |
Samuel Holland | 91079ac | 2020-10-21 21:12:14 -0500 | [diff] [blame] | 57 | os = "u-boot"; |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 58 | arch = "arm64"; |
| 59 | compression = "none"; |
Simon Glass | 72cc538 | 2022-10-20 18:22:39 -0600 | [diff] [blame] | 60 | load = <CONFIG_TEXT_BASE>; |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 61 | |
| 62 | u-boot-nodtb { |
| 63 | }; |
| 64 | }; |
Samuel Holland | 85852b2 | 2020-10-21 21:12:10 -0500 | [diff] [blame] | 65 | |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 66 | atf { |
| 67 | description = "ARM Trusted Firmware"; |
| 68 | type = "firmware"; |
Samuel Holland | 91079ac | 2020-10-21 21:12:14 -0500 | [diff] [blame] | 69 | os = "arm-trusted-firmware"; |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 70 | arch = "arm64"; |
| 71 | compression = "none"; |
Samuel Holland | ead2bf1 | 2020-10-21 21:12:12 -0500 | [diff] [blame] | 72 | load = <BL31_ADDR>; |
| 73 | entry = <BL31_ADDR>; |
Samuel Holland | 85852b2 | 2020-10-21 21:12:10 -0500 | [diff] [blame] | 74 | |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 75 | atf-bl31 { |
Samuel Holland | d8c1544 | 2020-10-21 21:12:11 -0500 | [diff] [blame] | 76 | filename = "bl31.bin"; |
Simon Glass | 5d90d5e | 2020-09-06 10:39:10 -0600 | [diff] [blame] | 77 | missing-msg = "atf-bl31-sunxi"; |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 78 | }; |
| 79 | }; |
| 80 | |
Icenowy Zheng | 713d648 | 2021-07-22 14:30:03 +0800 | [diff] [blame] | 81 | #ifdef SCP_ADDR |
Samuel Holland | 6b7db0a | 2020-10-21 21:12:16 -0500 | [diff] [blame] | 82 | scp { |
| 83 | description = "SCP firmware"; |
| 84 | type = "firmware"; |
| 85 | arch = "or1k"; |
| 86 | compression = "none"; |
| 87 | load = <SCP_ADDR>; |
| 88 | |
| 89 | scp { |
| 90 | filename = "scp.bin"; |
| 91 | missing-msg = "scp-sunxi"; |
| 92 | }; |
| 93 | }; |
Jernej Skrabec | e638e05 | 2021-01-11 21:11:46 +0100 | [diff] [blame] | 94 | #endif |
Samuel Holland | 6b7db0a | 2020-10-21 21:12:16 -0500 | [diff] [blame] | 95 | |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 96 | @fdt-SEQ { |
| 97 | description = "NAME"; |
| 98 | type = "flat_dt"; |
| 99 | compression = "none"; |
| 100 | }; |
| 101 | }; |
| 102 | |
| 103 | configurations { |
Samuel Holland | 1d52ffb | 2021-02-08 00:03:16 -0600 | [diff] [blame] | 104 | default = "@config-DEFAULT-SEQ"; |
Samuel Holland | 85852b2 | 2020-10-21 21:12:10 -0500 | [diff] [blame] | 105 | |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 106 | @config-SEQ { |
| 107 | description = "NAME"; |
Samuel Holland | 91079ac | 2020-10-21 21:12:14 -0500 | [diff] [blame] | 108 | firmware = "atf"; |
Icenowy Zheng | 713d648 | 2021-07-22 14:30:03 +0800 | [diff] [blame] | 109 | #ifndef SCP_ADDR |
Jernej Skrabec | e638e05 | 2021-01-11 21:11:46 +0100 | [diff] [blame] | 110 | loadables = "uboot"; |
| 111 | #else |
Samuel Holland | 6b7db0a | 2020-10-21 21:12:16 -0500 | [diff] [blame] | 112 | loadables = "scp", "uboot"; |
Jernej Skrabec | e638e05 | 2021-01-11 21:11:46 +0100 | [diff] [blame] | 113 | #endif |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 114 | fdt = "fdt-SEQ"; |
| 115 | }; |
| 116 | }; |
| 117 | }; |
| 118 | #else |
Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 119 | u-boot-img { |
Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 120 | }; |
Simon Glass | 896b421 | 2020-09-01 05:14:01 -0600 | [diff] [blame] | 121 | #endif |
Simon Glass | de44186 | 2016-11-25 20:16:01 -0700 | [diff] [blame] | 122 | }; |
| 123 | }; |