blob: 7362fa4520a35a490dc82a8d50450f62b61a8c16 [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>
Manorit Chawdhrya8787192024-07-02 10:50:01 +053016#include "../common/fdt_ops.h"
Bryan Brattlof77d831f2024-03-12 15:20:25 -050017
Jonathan Humphreys72b75fc2024-06-14 11:35:43 -050018struct efi_fw_image fw_images[] = {
19 {
20 .image_type_id = AM62PX_SK_TIBOOT3_IMAGE_GUID,
21 .fw_name = u"AM62PX_SK_TIBOOT3",
22 .image_index = 1,
23 },
24 {
25 .image_type_id = AM62PX_SK_SPL_IMAGE_GUID,
26 .fw_name = u"AM62PX_SK_SPL",
27 .image_index = 2,
28 },
29 {
30 .image_type_id = AM62PX_SK_UBOOT_IMAGE_GUID,
31 .fw_name = u"AM62PX_SK_UBOOT",
32 .image_index = 3,
33 }
34};
35
36struct efi_capsule_update_info update_info = {
37 .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;"
38 "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000",
39 .num_images = ARRAY_SIZE(fw_images),
40 .images = fw_images,
41};
42
43#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
44void set_dfu_alt_info(char *interface, char *devstr)
45{
46 if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
47 env_set("dfu_alt_info", update_info.dfu_string);
48}
49#endif
50
Bryan Brattlof77d831f2024-03-12 15:20:25 -050051int board_init(void)
52{
53 return 0;
54}
55
56int dram_init(void)
57{
58 return fdtdec_setup_mem_size_base();
59}
60
61int dram_init_banksize(void)
62{
63 return fdtdec_setup_memory_banksize();
64}
Manorit Chawdhrya8787192024-07-02 10:50:01 +053065
66#if IS_ENABLED(CONFIG_BOARD_LATE_INIT)
67int board_late_init(void)
68{
69 ti_set_fdt_env(NULL, NULL);
70 return 0;
71}
72#endif