# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (c) 2026, Hangfan Li <lihangfan@iscas.ac.cn>

# Due to limitation of Kconfig, the following symbols cannot be selected here:
# CONFIG_ARCH_RV64I
# CONFIG_RISCV_SMODE

config SPACEMIT_K3
	bool
	select ARCH_EARLY_INIT_R
	select SUPPORT_SPL
	select SPL
	select BINMAN
	imply CPU
	imply CPU_RISCV
	imply SPL_CPU
	imply RISCV_ISA_ZICBOM
	imply FIT
	imply SPL_LOAD_FIT
	imply SPL_LOAD_FIT_FULL
	imply PINCTRL
	imply SPL_PINCTRL
	imply PINCTRL_SINGLE
	imply SYS_NS16550

if SPACEMIT_K3

config SYS_CPU
	default "k3"

config SPL_SMP
	default n

config SPL_TEXT_BASE
	hex
	default 0xc0801000

config SPL_MAX_SIZE
	hex
	default 0x6AF00

config SPL_BSS_START_ADDR
	hex
	default 0xc0874000

config SPL_BSS_MAX_SIZE
	hex
	default 0x3000

config SPL_OPENSBI_LOAD_ADDR
	hex
	default 0x100000000

endif
