From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] board: ti: am654: a53: Add initial support for am654
Date: Tue, 21 Aug 2018 20:03:11 +0530 [thread overview]
Message-ID: <20180821143316.29329-2-lokeshvutla@ti.com> (raw)
In-Reply-To: <20180821143316.29329-1-lokeshvutla@ti.com>
Add initial support for AM654 based EVM running on A53. Enable
4GB of DDR available on the EVM so that kernel DTB file
can be updated accordingly.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
[Andreas: Added 4GB ddr support]
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
---
arch/arm/mach-k3/Kconfig | 1 +
board/ti/am65x/Kconfig | 30 ++++++++++++++++++++
board/ti/am65x/MAINTAINERS | 5 ++++
board/ti/am65x/Makefile | 8 ++++++
board/ti/am65x/evm.c | 56 +++++++++++++++++++++++++++++++++++++
include/configs/am65x_evm.h | 36 ++++++++++++++++++++++++
6 files changed, 136 insertions(+)
create mode 100644 board/ti/am65x/Kconfig
create mode 100644 board/ti/am65x/MAINTAINERS
create mode 100644 board/ti/am65x/Makefile
create mode 100644 board/ti/am65x/evm.c
create mode 100644 include/configs/am65x_evm.h
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index 117e5b4e4a..df3ba32df6 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -47,4 +47,5 @@ config BOOT_PARAM_TABLE_INDEX
Address at which ROM stores the value which determines if SPL
is booted up by primary boot media or secondary boot media.
+source "board/ti/am65x/Kconfig"
endif
diff --git a/board/ti/am65x/Kconfig b/board/ti/am65x/Kconfig
new file mode 100644
index 0000000000..fb616e8fd5
--- /dev/null
+++ b/board/ti/am65x/Kconfig
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+# Lokesh Vutla <lokeshvutla@ti.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+choice
+ prompt "K3 AM65 based boards"
+ optional
+
+config TARGET_AM654_A53_EVM
+ bool "TI K3 based AM654 EVM running on A53"
+ select ARM64
+ select SOC_K3_AM6
+
+endchoice
+
+if TARGET_AM654_A53_EVM
+
+config SYS_BOARD
+ default "am65x"
+
+config SYS_VENDOR
+ default "ti"
+
+config SYS_CONFIG_NAME
+ default "am65x_evm"
+
+endif
diff --git a/board/ti/am65x/MAINTAINERS b/board/ti/am65x/MAINTAINERS
new file mode 100644
index 0000000000..c5921b4a28
--- /dev/null
+++ b/board/ti/am65x/MAINTAINERS
@@ -0,0 +1,5 @@
+AM65x BOARD
+M: Lokesh Vutla <lokeshvutla@ti.com>
+S: Maintained
+F: board/ti/am65x/
+F: include/configs/am65x_evm.h
diff --git a/board/ti/am65x/Makefile b/board/ti/am65x/Makefile
new file mode 100644
index 0000000000..94dddfcc4a
--- /dev/null
+++ b/board/ti/am65x/Makefile
@@ -0,0 +1,8 @@
+#
+# Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+# Lokesh Vutla <lokeshvutla@ti.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y := evm.o
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
new file mode 100644
index 0000000000..db2c90e948
--- /dev/null
+++ b/board/ti/am65x/evm.c
@@ -0,0 +1,56 @@
+/*
+ * Board specific initialization for AM654 EVM
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ * Lokesh Vutla <lokeshvutla@ti.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <spl.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ return 0;
+}
+
+int dram_init(void)
+{
+#ifdef CONFIG_PHYS_64BIT
+ gd->ram_size = 0x100000000;
+#else
+ gd->ram_size = 0x80000000;
+#endif
+
+ return 0;
+}
+
+ulong board_get_usable_ram_top(ulong total_size)
+{
+#ifdef CONFIG_PHYS_64BIT
+ /* Limit RAM used by U-Boot to the DDR low region */
+ if (gd->ram_top > 0x100000000)
+ return 0x100000000;
+#endif
+
+ return gd->ram_top;
+}
+
+int dram_init_banksize(void)
+{
+ /* Bank 0 declares the memory available in the DDR low region */
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = 0x80000000;
+
+#ifdef CONFIG_PHYS_64BIT
+ /* Bank 1 declares the memory available in the DDR high region */
+ gd->bd->bi_dram[1].start = CONFIG_SYS_SDRAM_BASE1;
+ gd->bd->bi_dram[1].size = 0x80000000;
+#endif
+
+ return 0;
+}
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
new file mode 100644
index 0000000000..ee8a984cfc
--- /dev/null
+++ b/include/configs/am65x_evm.h
@@ -0,0 +1,36 @@
+/*
+ * Configuration header file for K3 AM654 EVM
+ *
+ * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
+ * Lokesh Vutla <lokeshvutla@ti.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __CONFIG_AM654_EVM_H
+#define __CONFIG_AM654_EVM_H
+
+#include <linux/sizes.h>
+#include <config_distro_bootcmd.h>
+
+#define CONFIG_ENV_SIZE (128 << 10)
+
+/* DDR Configuration */
+#define CONFIG_NR_DRAM_BANKS 2
+#define CONFIG_SYS_SDRAM_BASE1 0x880000000
+
+/* SPL Loader Configuration */
+#ifdef CONFIG_TARGET_AM654_A53_EVM
+#define CONFIG_SPL_TEXT_BASE 0x80080000
+#endif
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+
+#define CONFIG_SPL_MAX_SIZE CONFIG_MAX_DOWNLODABLE_IMAGE_SIZE
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SPL_TEXT_BASE + \
+ CONFIG_NON_SECURE_MSRAM_SIZE - 4)
+
+/* Now for the remaining common defines */
+#include <configs/ti_armv7_common.h>
+
+#endif /* __CONFIG_AM654_EVM_H */
--
2.18.0
next prev parent reply other threads:[~2018-08-21 14:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-21 14:33 [U-Boot] [PATCH 0/6] [3/3] Initial support Texas Instrument's AM654 Platform Lokesh Vutla
2018-08-21 14:33 ` Lokesh Vutla [this message]
2018-08-24 14:13 ` [U-Boot] [PATCH 1/6] board: ti: am654: a53: Add initial support for am654 Tom Rini
2018-08-21 14:33 ` [U-Boot] [PATCH 2/6] board: ti: am65x: Add README Lokesh Vutla
2018-08-24 14:13 ` Tom Rini
2018-08-21 14:33 ` [U-Boot] [PATCH 3/6] include: am654_evm: Establish initial environment for SD card boot Lokesh Vutla
2018-08-24 14:13 ` Tom Rini
2018-08-21 14:33 ` [U-Boot] [PATCH 4/6] arm64: dts: k3: Add Support for AM654 SoC Lokesh Vutla
2018-08-24 14:13 ` Tom Rini
2018-08-21 14:33 ` [U-Boot] [PATCH 5/6] arm64: dts: k3: Add u-boot specific nodes Lokesh Vutla
2018-08-24 14:13 ` Tom Rini
2018-08-21 14:33 ` [U-Boot] [PATCH 6/6] configs: am65x_evm_a53: Add initial support Lokesh Vutla
2018-08-24 14:13 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180821143316.29329-2-lokeshvutla@ti.com \
--to=lokeshvutla@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox