Other Parts Discussed in Thread: DRA821, SYSBIOS
Could you tell me how to change the initial MPU (A72) clock frequency in SBL?
Our customer has modified the SBL source code to change the initial MPU (A72) clock frequency, but the MPU was not running.
They modified the sbl_soc_cfg.h as follows to change the initial MPU clock frequency.
~/ti/ti-processor-sdk-rtos-j7200-evm-07_02_00_06/pdk_j7200_07_01_05_14/packages/ti/boot/sbl/soc/k3/sbl_soc_cfg.h
#if defined (SOC_J7200)
:
:
#define SBL_MPU1_CPU0_FREQ_HZ (1500000000)
They modified the sbl_slave_core_boot.c as follows to make sure that each core clock frequency was changed.
~/ti/ti-processor-sdk-rtos-j7200-evm-07_02_00_06/pdk_j7200_07_01_05_14/packages/ti/boot/sbl/soc/k3/sbl_slave_core_boot.c
void SBL_SlaveCoreBoot(cpu_core_id_t core_id, uint32_t freqHz, sblEntryPoint_t *pAppEntry, uint32_t requestCoresFlag)
{
uint64_t respFreq, currentFreq;
:
:
status = Sciclient_pmQueryModuleClkFreq (
sblSlaveCoreInfoPtr->tisci_dev_id,
sblSlaveCoreInfoPtr->tisci_clk_id,
sblSlaveCoreInfoPtr->slave_clk_freq_hz,
&respFreq,
SCICLIENT_SERVICE_WAIT_FOREVER);
if (status != CSL_PASS)
{
SBL_log(SBL_LOG_MAX, " Sciclient_pmQueryModuleClkFreq...FAILED \n");
SblErrLoop(__FILE__, __LINE__);
}
else
{
SBL_log(SBL_LOG_MAX, "Sciclient_pmQueryModuleClkFreq, DevId 0x%x @ %dHz... \n", sblSlaveCoreInfoPtr->tisci_dev_id, respFreq);
}
SBL_ADD_PROFILE_POINT;
SBL_log(SBL_LOG_MAX, "Sciclient_pmSetModuleClkFreq, DevId 0x%x @ %dHz... \n", sblSlaveCoreInfoPtr->tisci_dev_id, sblSlaveCoreInfoPtr->slave_clk_freq_hz);
SBL_ADD_PROFILE_POINT;
status = Sciclient_pmSetModuleClkFreq(sblSlaveCoreInfoPtr->tisci_dev_id,
sblSlaveCoreInfoPtr->tisci_clk_id,
sblSlaveCoreInfoPtr->slave_clk_freq_hz,
TISCI_MSG_FLAG_AOP,
SCICLIENT_SERVICE_WAIT_FOREVER);
if (status != CSL_PASS)
{
SBL_log(SBL_LOG_MAX, " Sciclient_pmSetModuleClkFreq...FAILED \n");
SblErrLoop(__FILE__, __LINE__);
}
SBL_ADD_PROFILE_POINT;
status = Sciclient_pmGetModuleClkFreq(
sblSlaveCoreInfoPtr->tisci_dev_id,
sblSlaveCoreInfoPtr->tisci_clk_id,
¤tFreq,
SCICLIENT_SERVICE_WAIT_FOREVER);
if (status != CSL_PASS)
{
SBL_log(SBL_LOG_MAX, " Sciclient_pmGetModuleClkFreq...FAILED \n");
SblErrLoop(__FILE__, __LINE__);
}
else
{
SBL_log(SBL_LOG_MAX, "Sciclient_pmGetModuleClkFreq, DevId 0x%x @ %dHz... \n", sblSlaveCoreInfoPtr->tisci_dev_id, currentFreq);
}
SBL_ADD_PROFILE_POINT;
8.4.3. Setting the clock for a device
software-dl.ti.com/.../faq_module_clocking.html
They used the SBL test application to make sure the MPU was running. In the output message log, the MPU clock frequency is set to 1.5GHz, but "MPU1_0 running" is not output.
~/ti/ti-processor-sdk-rtos-j7200-evm-07_02_00_06/pdk_j7200_07_01_05_14/packages/ti/boot/sbl/example/k3MulticoreApp/binary/j7200/sbl_baremetal_boot_test_j7200_evm_mpu1_0TestApp_release.appimage
SBL Revision: 01.00.10.00 (Apr 26 2021 - 17:23:32) TIFS ver: 20.8.5--v2020.08b (Terrific Lla SCISERVER Board Configuration header population... PASSED Sciclient_setBoardConfigHeader... PASSED Initlialzing PLLs ...done. InitlialzingClocks ...done. Initlialzing DDR ...done. Initializing GTC ...Begin parsing user application Calling Sciclient_procBootRequestProcessor, ProcId 0x20... Calling Sciclient_procBootRequestProcessor, ProcId 0x21... Calling Sciclient_procBootRequestProcessor, ProcId 0x1... Calling Sciclient_procBootRequestProcessor, ProcId 0x2... Calling Sciclient_procBootRequestProcessor, ProcId 0x6... Calling Sciclient_procBootRequestProcessor, ProcId 0x7... Searching for X509 certificate ...not found Switching core id 4, proc_id 0x1 to split mode... Calling Sciclient_procBootGetProcessorState, ProcId 0x1... Sciclient_procBootSetProcessorCfg, ProcId 0x1, enabling split mode... Calling Sciclient_procBootGetProcessorState, ProcId 0x1... Enabling MCU TCMs after reset for core 4 Disabling HW-based memory init of MCU TCMs for core 4 Sciclient_procBootSetProcessorCfg enabling TCMs... Copying 0x40 bytes to 0x41010000 Copying 0x2c88 bytes to 0x41010100 Copying 0x500 bytes to 0x41015980 Copying 0x28 bytes to 0x41015e80 Copying 0x10 bytes to 0x41015ea8 Copying 0x13f40 bytes to 0x41c9c320 Copying 0x6e50 bytes to 0x41cb0260 Copying 0x1500 bytes to 0x41cbac00 Copying 0xb30 bytes to 0x41cbc100 Setting entry point for core 4 @0x41010000 Sciclient_pmSetModuleState On, DevId 0x4... Copying 0x688 bytes to 0x70024000 Copying 0x44 bytes to 0x70024688 Setting entry point for core 0 @0x70024000 Sciclient_procBootSetProcessorCfg, ProcId 0x20, EntryPoint 0x70024000... Sciclient_pmQueryModuleClkFreq, DevId 0xca @ 2000000000Hz... Sciclient_pmSetModuleClkFreq, DevId 0xca @ 2000000000Hz... Sciclient_pmGetModuleClkFreq, DevId 0xca @ 2000000000Hz... Sciclient_pmSetModuleState Off, DevId 0xca... Sciclient_pmSetModuleState On, DevId 0xca... MPU1_0 running Sciclient_procBootReleaseProcessor, ProcId 0x20... Sciclient_procBootReleaseProcessor, ProcId 0x21... Sciclient_procBootReleaseProcessor, ProcId 0x1... Sciclient_procBootReleaseProcessor, ProcId 0x2... Sciclient_procBootReleaseProcessor, ProcId 0x6... Sciclient_procBootReleaseProcessor, ProcId 0x7... Calling Sciclient_procBootRequestProcessor, ProcId 0x1... Sciclient_procBootSetProcessorCfg, ProcId 0x1, EntryPoint 0x41010000... Sciclient_pmQueryModuleClkFreq, DevId 0xfa @ 1000000000Hz... Sciclient_pmSetModuleClkFreq, DevId 0xfa @ 1000000000Hz... Sciclient_pmGetModuleClkFreq, DevId 0xfa @ 1000000000Hz... Copying first 128 bytes from app to MCU ATCM @ 0x0 for core 4 Calling Sciclient_procBootRequestProcessor, ProcId 0x2... Skipping Sciclient_procBootSetProcessorCfg for ProcId 0x2, EntryPoint 0xfffffffe... Calling Sciclient_procBootRequestProcessor, ProcId 0x1... Sciserver Built On: Nov 5 2020 22:47:06 Starting Sciserver..... PASSED
SBL Revision: 01.00.10.00 (Apr 26 2021 - 16:40:31) TIFS ver: 20.8.5--v2020.08b (Terrific Lla SCISERVER Board Configuration header population... PASSED Sciclient_setBoardConfigHeader... PASSED Initlialzing PLLs ...done. InitlialzingClocks ...done. Initlialzing DDR ...done. Initializing GTC ...Begin parsing user application Calling Sciclient_procBootRequestProcessor, ProcId 0x20... Calling Sciclient_procBootRequestProcessor, ProcId 0x21... Calling Sciclient_procBootRequestProcessor, ProcId 0x1... Calling Sciclient_procBootRequestProcessor, ProcId 0x2... Calling Sciclient_procBootRequestProcessor, ProcId 0x6... Calling Sciclient_procBootRequestProcessor, ProcId 0x7... Searching for X509 certificate ...not found Switching core id 4, proc_id 0x1 to split mode... Calling Sciclient_procBootGetProcessorState, ProcId 0x1... Sciclient_procBootSetProcessorCfg, ProcId 0x1, enabling split mode... Calling Sciclient_procBootGetProcessorState, ProcId 0x1... Enabling MCU TCMs after reset for core 4 Disabling HW-based memory init of MCU TCMs for core 4 Sciclient_procBootSetProcessorCfg enabling TCMs... Copying 0x40 bytes to 0x41010000 Copying 0x2c88 bytes to 0x41010100 Copying 0x500 bytes to 0x41015980 Copying 0x28 bytes to 0x41015e80 Copying 0x10 bytes to 0x41015ea8 Copying 0x13f40 bytes to 0x41c9c320 Copying 0x6e50 bytes to 0x41cb0260 Copying 0x1500 bytes to 0x41cbac00 Copying 0xb30 bytes to 0x41cbc100 Setting entry point for core 4 @0x41010000 Sciclient_pmSetModuleState On, DevId 0x4... Copying 0x688 bytes to 0x70024000 Copying 0x44 bytes to 0x70024688 Setting entry point for core 0 @0x70024000 Sciclient_procBootSetProcessorCfg, ProcId 0x20, EntryPoint 0x70024000... Sciclient_pmQueryModuleClkFreq, DevId 0xca @ 1500000000Hz... Sciclient_pmSetModuleClkFreq, DevId 0xca @ 1500000000Hz... Sciclient_pmGetModuleClkFreq, DevId 0xca @ 1500000000Hz... Sciclient_pmSetModuleState Off, DevId 0xca... Sciclient_pmSetModuleState On, DevId 0xca... Sciclient_procBootReleaseProcessor, ProcId 0x20... Sciclient_procBootReleaseProcessor, ProcId 0x21... Sciclient_procBootReleaseProcessor, ProcId 0x1... Sciclient_procBootReleaseProcessor, ProcId 0x2... Sciclient_procBootReleaseProcessor, ProcId 0x6... Sciclient_procBootReleaseProcessor, ProcId 0x7... Calling Sciclient_procBootRequestProcessor, ProcId 0x1... Sciclient_procBootSetProcessorCfg, ProcId 0x1, EntryPoint 0x41010000... Sciclient_pmQueryModuleClkFreq, DevId 0xfa @ 1000000000Hz... Sciclient_pmSetModuleClkFreq, DevId 0xfa @ 1000000000Hz... Sciclient_pmGetModuleClkFreq, DevId 0xfa @ 1000000000Hz... Copying first 128 bytes from app to MCU ATCM @ 0x0 for core 4 Calling Sciclient_procBootRequestProcessor, ProcId 0x2... Skipping Sciclient_procBootSetProcessorCfg for ProcId 0x2, EntryPoint 0xfffffffe... Calling Sciclient_procBootRequestProcessor, ProcId 0x1... Sciserver Built On: Nov 5 2020 22:47:06 Starting Sciserver..... PASSED
5.2.7. Testing the SBL
software-dl.ti.com/.../boot_k3.html
Best regards,
Daisuke