blob: 548dbd5925dfac4475e9e0a00fadbf3d48f36fb2 [file] [log] [blame]
Apurva Nandan8b957b32024-02-24 01:51:46 +05301// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Board specific initialization for J784S4 EVM
4 *
5 * Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
6 * Hari Nagalla <hnagalla@ti.com>
7 *
8 */
9
Jonathan Humphreys116ce4d2024-06-14 11:35:49 -050010#include <efi_loader.h>
Apurva Nandan8b957b32024-02-24 01:51:46 +053011#include <init.h>
12#include <spl.h>
13#include "../common/fdt_ops.h"
14
15DECLARE_GLOBAL_DATA_PTR;
16
Jonathan Humphreys116ce4d2024-06-14 11:35:49 -050017struct efi_fw_image fw_images[] = {
18 {
19 .image_type_id = AM69_SK_TIBOOT3_IMAGE_GUID,
20 .fw_name = u"AM69_SK_TIBOOT3",
21 .image_index = 1,
22 },
23 {
24 .image_type_id = AM69_SK_SPL_IMAGE_GUID,
25 .fw_name = u"AM69_SK_SPL",
26 .image_index = 2,
27 },
28 {
29 .image_type_id = AM69_SK_UBOOT_IMAGE_GUID,
30 .fw_name = u"AM69_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
Apurva Nandan8b957b32024-02-24 01:51:46 +053050int 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}
64
65#ifdef CONFIG_BOARD_LATE_INIT
66int board_late_init(void)
67{
68 ti_set_fdt_env(NULL, NULL);
69 return 0;
70}
71#endif
72
73void spl_board_init(void)
74{
75}