Bryan Brattlof | 77d831f | 2024-03-12 15:20:25 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Board specific initialization for AM62Px platforms |
| 4 | * |
| 5 | * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ |
| 6 | * |
| 7 | */ |
| 8 | |
Jonathan Humphreys | 72b75fc | 2024-06-14 11:35:43 -0500 | [diff] [blame^] | 9 | #include <efi_loader.h> |
Bryan Brattlof | 77d831f | 2024-03-12 15:20:25 -0500 | [diff] [blame] | 10 | #include <asm/arch/hardware.h> |
| 11 | #include <asm/io.h> |
| 12 | #include <dm/uclass.h> |
| 13 | #include <env.h> |
| 14 | #include <fdt_support.h> |
| 15 | #include <spl.h> |
| 16 | |
Jonathan Humphreys | 72b75fc | 2024-06-14 11:35:43 -0500 | [diff] [blame^] | 17 | struct efi_fw_image fw_images[] = { |
| 18 | { |
| 19 | .image_type_id = AM62PX_SK_TIBOOT3_IMAGE_GUID, |
| 20 | .fw_name = u"AM62PX_SK_TIBOOT3", |
| 21 | .image_index = 1, |
| 22 | }, |
| 23 | { |
| 24 | .image_type_id = AM62PX_SK_SPL_IMAGE_GUID, |
| 25 | .fw_name = u"AM62PX_SK_SPL", |
| 26 | .image_index = 2, |
| 27 | }, |
| 28 | { |
| 29 | .image_type_id = AM62PX_SK_UBOOT_IMAGE_GUID, |
| 30 | .fw_name = u"AM62PX_SK_UBOOT", |
| 31 | .image_index = 3, |
| 32 | } |
| 33 | }; |
| 34 | |
| 35 | struct efi_capsule_update_info update_info = { |
| 36 | .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;" |
| 37 | "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000", |
| 38 | .num_images = ARRAY_SIZE(fw_images), |
| 39 | .images = fw_images, |
| 40 | }; |
| 41 | |
| 42 | #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) |
| 43 | void set_dfu_alt_info(char *interface, char *devstr) |
| 44 | { |
| 45 | if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) |
| 46 | env_set("dfu_alt_info", update_info.dfu_string); |
| 47 | } |
| 48 | #endif |
| 49 | |
Bryan Brattlof | 77d831f | 2024-03-12 15:20:25 -0500 | [diff] [blame] | 50 | int board_init(void) |
| 51 | { |
| 52 | return 0; |
| 53 | } |
| 54 | |
| 55 | int dram_init(void) |
| 56 | { |
| 57 | return fdtdec_setup_mem_size_base(); |
| 58 | } |
| 59 | |
| 60 | int dram_init_banksize(void) |
| 61 | { |
| 62 | return fdtdec_setup_memory_banksize(); |
| 63 | } |