sc7280: Add SHRM firmware support
SHRM is a system hardware resource manager. It is used to manage run time DDRSS activities. DDRSS stands for DDR subsystem. BUG=b:182963902 TEST=Validated on qualcomm sc7280 development board by trying DDR clocks which through SHRM RSI command. Change-Id: I44484573a829eaefbd34907c6fe78d427506a762 Signed-off-by: Ravi Kumar Bokka <rbokka@codeaurora.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49392 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Shelley Chen <shchen@google.com>
This commit is contained in:
parent
4dc9e5b3c7
commit
5afeba30a3
@ -3,9 +3,11 @@
|
|||||||
#include <arch/stages.h>
|
#include <arch/stages.h>
|
||||||
#include <soc/qclib_common.h>
|
#include <soc/qclib_common.h>
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
#include <soc/shrm.h>
|
||||||
|
|
||||||
void platform_romstage_main(void)
|
void platform_romstage_main(void)
|
||||||
{
|
{
|
||||||
|
shrm_fw_load_reset();
|
||||||
/* QCLib: DDR init & train */
|
/* QCLib: DDR init & train */
|
||||||
qclib_load_and_run();
|
qclib_load_and_run();
|
||||||
|
|
||||||
|
@ -23,5 +23,6 @@ DECLARE_REGION(dram_modem_wifi_only)
|
|||||||
DECLARE_REGION(dram_modem_extra)
|
DECLARE_REGION(dram_modem_extra)
|
||||||
DECLARE_REGION(dram_wlan)
|
DECLARE_REGION(dram_wlan)
|
||||||
DECLARE_REGION(dram_wpss)
|
DECLARE_REGION(dram_wpss)
|
||||||
|
DECLARE_REGION(shrm)
|
||||||
|
|
||||||
#endif // _SOC_QUALCOMM_SYMBOLS_COMMON_H_
|
#endif // _SOC_QUALCOMM_SYMBOLS_COMMON_H_
|
||||||
|
@ -26,6 +26,7 @@ verstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
romstage-y += cbmem.c
|
romstage-y += cbmem.c
|
||||||
|
romstage-y += shrm_load_reset.c
|
||||||
romstage-y += ../common/qclib.c
|
romstage-y += ../common/qclib.c
|
||||||
romstage-y += ../common/mmu.c
|
romstage-y += ../common/mmu.c
|
||||||
romstage-y += mmu.c
|
romstage-y += mmu.c
|
||||||
@ -101,4 +102,12 @@ $(I2C_FW_CBFS)-type := raw
|
|||||||
$(I2C_FW_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
|
$(I2C_FW_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
|
||||||
cbfs-files-y += $(I2C_FW_CBFS)
|
cbfs-files-y += $(I2C_FW_CBFS)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
SHRM_FILE := $(SC7280_BLOB)/shrm/shrm.elf
|
||||||
|
SHRM_CBFS := $(CONFIG_CBFS_PREFIX)/shrm
|
||||||
|
$(SHRM_CBFS)-file := $(SHRM_FILE)
|
||||||
|
$(SHRM_CBFS)-type := payload
|
||||||
|
$(SHRM_CBFS)-compression := none
|
||||||
|
cbfs-files-y += $(SHRM_CBFS)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
8
src/soc/qualcomm/sc7280/include/soc/shrm.h
Normal file
8
src/soc/qualcomm/sc7280/include/soc/shrm.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef _SOC_QUALCOMM_SC7280_SHRM_H__
|
||||||
|
#define _SOC_QUALCOMM_SC7280_SHRM_H__
|
||||||
|
|
||||||
|
void shrm_fw_load_reset(void);
|
||||||
|
|
||||||
|
#endif // _SOC_QUALCOMM_SC7280_SHRM_H__
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
REGION(shrm, 0x09060000, 64K , 4K)
|
||||||
|
|
||||||
AOPSRAM_START(0x0B000000)
|
AOPSRAM_START(0x0B000000)
|
||||||
REGION(aop, 0x0B000000, 0x100000, 4096)
|
REGION(aop, 0x0B000000, 0x100000, 4096)
|
||||||
AOPSRAM_END(0x0B100000)
|
AOPSRAM_END(0x0B100000)
|
||||||
|
22
src/soc/qualcomm/sc7280/shrm_load_reset.c
Normal file
22
src/soc/qualcomm/sc7280/shrm_load_reset.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <cbfs.h>
|
||||||
|
#include <console/console.h>
|
||||||
|
#include <soc/mmu.h>
|
||||||
|
#include <soc/shrm.h>
|
||||||
|
#include <soc/clock.h>
|
||||||
|
|
||||||
|
void shrm_fw_load_reset(void)
|
||||||
|
{
|
||||||
|
bool shrm_fw_entry;
|
||||||
|
struct prog shrm_fw_prog =
|
||||||
|
PROG_INIT(PROG_PAYLOAD, CONFIG_CBFS_PREFIX "/shrm");
|
||||||
|
|
||||||
|
shrm_fw_entry = selfload(&shrm_fw_prog);
|
||||||
|
if (!shrm_fw_entry)
|
||||||
|
die("SOC image: SHRM load failed");
|
||||||
|
|
||||||
|
clock_reset_shrm();
|
||||||
|
|
||||||
|
printk(BIOS_DEBUG, "\nSOC:SHRM brought out of reset.\n");
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user