]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: ti: j784s4: Add board support for J784S4 EVM
authorApurva Nandan <a-nandan@ti.com>
Fri, 23 Feb 2024 20:21:46 +0000 (01:51 +0530)
committerTom Rini <trini@konsulko.com>
Mon, 4 Mar 2024 18:41:03 +0000 (13:41 -0500)
Add board files for J784S4 EVM.

SYS_DISABLE_DCACHE_OPS is selected in the Kconfig because
J784S4/AM69 are a coherent architecture at A72 level by
MSMC support.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
Signed-off-by: Dasnavis Sabiya <sabiya.d@ti.com>
Signed-off-by: Apurva Nandan <a-nandan@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # AM69-SK
arch/arm/mach-k3/Kconfig
arch/arm/mach-k3/j784s4/Kconfig [new file with mode: 0644]
board/ti/j784s4/Kconfig [new file with mode: 0644]
board/ti/j784s4/MAINTAINERS [new file with mode: 0644]
board/ti/j784s4/Makefile [new file with mode: 0644]
board/ti/j784s4/evm.c [new file with mode: 0644]
include/configs/j784s4_evm.h [new file with mode: 0644]

index 217def3bb46b7ecafb012a4c037327ed1493a681..fdde67c2d39fe180a3056b3f392c372908401cdc 100644 (file)
@@ -157,5 +157,6 @@ source "arch/arm/mach-k3/am62x/Kconfig"
 source "arch/arm/mach-k3/am62ax/Kconfig"
 source "arch/arm/mach-k3/j721e/Kconfig"
 source "arch/arm/mach-k3/j721s2/Kconfig"
+source "arch/arm/mach-k3/j784s4/Kconfig"
 
 endif
diff --git a/arch/arm/mach-k3/j784s4/Kconfig b/arch/arm/mach-k3/j784s4/Kconfig
new file mode 100644 (file)
index 0000000..1eadfb3
--- /dev/null
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Hari Nagalla <hnagalla@ti.com>
+
+if SOC_K3_J784S4
+
+choice
+       prompt "K3 J784S4 board"
+       optional
+
+config TARGET_J784S4_A72_EVM
+       bool "TI K3 based J784S4 EVM running on A72"
+       select ARM64
+       select BOARD_LATE_INIT
+       select SYS_DISABLE_DCACHE_OPS
+       select BINMAN
+
+config TARGET_J784S4_R5_EVM
+       bool "TI K3 based J784S4 EVM running on R5"
+       select CPU_V7R
+       select SYS_THUMB_BUILD
+       select K3_LOAD_SYSFW
+       select RAM
+       select SPL_RAM
+       select K3_DDRSS
+       select BINMAN
+       imply SYS_K3_SPL_ATF
+
+endchoice
+
+source "board/ti/j784s4/Kconfig"
+
+endif
diff --git a/board/ti/j784s4/Kconfig b/board/ti/j784s4/Kconfig
new file mode 100644 (file)
index 0000000..490c7be
--- /dev/null
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Hari Nagalla <hnagalla@ti.com>
+
+if TARGET_J784S4_A72_EVM
+
+config SYS_BOARD
+       default "j784s4"
+
+config SYS_VENDOR
+       default "ti"
+
+config SYS_CONFIG_NAME
+       default "j784s4_evm"
+
+source "board/ti/common/Kconfig"
+
+endif
+
+if TARGET_J784S4_R5_EVM
+
+config SYS_BOARD
+       default "j784s4"
+
+config SYS_VENDOR
+       default "ti"
+
+config SYS_CONFIG_NAME
+       default "j784s4_evm"
+
+config SPL_LDSCRIPT
+       default "arch/arm/mach-omap2/u-boot-spl.lds"
+
+source "board/ti/common/Kconfig"
+
+endif
diff --git a/board/ti/j784s4/MAINTAINERS b/board/ti/j784s4/MAINTAINERS
new file mode 100644 (file)
index 0000000..037fedb
--- /dev/null
@@ -0,0 +1,6 @@
+J784S4 EVM BOARD
+M:     Apurva Nandan <a-nandan@ti.com>
+S:     Maintained
+F:     board/ti/j784s4
+F:     arch/arm/mach-k3/j784s4
+F:     include/configs/j784s4_evm.h
diff --git a/board/ti/j784s4/Makefile b/board/ti/j784s4/Makefile
new file mode 100644 (file)
index 0000000..60161a8
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Hari Nagalla <hnagalla@ti.com>
+#
+
+obj-y += evm.o
diff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c
new file mode 100644 (file)
index 0000000..aed0ea5
--- /dev/null
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Board specific initialization for J784S4 EVM
+ *
+ * Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+ *     Hari Nagalla <hnagalla@ti.com>
+ *
+ */
+
+#include <init.h>
+#include <spl.h>
+#include "../common/fdt_ops.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+       return 0;
+}
+
+int dram_init(void)
+{
+       return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+       return fdtdec_setup_memory_banksize();
+}
+
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+       ti_set_fdt_env(NULL, NULL);
+       return 0;
+}
+#endif
+
+void spl_board_init(void)
+{
+}
diff --git a/include/configs/j784s4_evm.h b/include/configs/j784s4_evm.h
new file mode 100644 (file)
index 0000000..4a2ccdc
--- /dev/null
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Configuration header file for K3 J784S4 EVM
+ *
+ * Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
+ *     Hari Nagalla <hnagalla@ti.com>
+ */
+
+#ifndef __CONFIG_J784S4_EVM_H
+#define __CONFIG_J784S4_EVM_H
+
+/* Now for the remaining common defines */
+#include <configs/ti_armv7_common.h>
+
+#endif /* __CONFIG_J784S4_EVM_H */