blob: 1a2c46c462b43677264887b5bfde72d6c3346fa5 [file] [log] [blame]
Bryan Brattlof77d831f2024-03-12 15:20:25 -05001// 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 Humphreys72b75fc2024-06-14 11:35:43 -05009#include <efi_loader.h>
Bryan Brattlof77d831f2024-03-12 15:20:25 -050010#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 Humphreys72b75fc2024-06-14 11:35:43 -050017struct 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
35struct 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)
43void 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 Brattlof77d831f2024-03-12 15:20:25 -050050int board_init(void)
51{
52 return 0;
53}
54
55int dram_init(void)
56{
57 return fdtdec_setup_mem_size_base();
58}
59
60int dram_init_banksize(void)
61{
62 return fdtdec_setup_memory_banksize();
63}