- oc_loader: pcv_erista: use 1963.5 MHz instead of 1989

- sys-clk-OC: update safe/unsafe frequencies (Erista CPU 1785/2091, Mariko CPU 1963/2397, Mariko GPU 998/1305); add 408/510 MHz CPU clocks; add unsafe toggle for Erista
This commit is contained in:
KazushiM
2022-12-30 20:57:02 +08:00
parent b0b80c8458
commit 139c7dfcad
9 changed files with 46 additions and 31 deletions

View File

@@ -24,33 +24,32 @@ void Clocks::GetRange(SysClkModule module, SysClkProfile profile, uint32_t** min
if (module == SysClkModule_CPU) {
*min = &g_freq_table_cpu_hz[0];
if (!isMariko)
*max = &g_freq_table_cpu_hz[11]; // 1785
else {
if (allowUnsafe)
*max = &g_freq_table_cpu_hz[17]; // 2397
else
*max = &g_freq_table_cpu_hz[13]; // 1963
}
if (isMariko)
*max = !allowUnsafe ? &g_freq_table_cpu_hz[15] : &g_freq_table_cpu_hz[19]; // 1963 / 2397
else
*max = (!allowUnsafe || profile == SysClkProfile_Handheld) ?
&g_freq_table_cpu_hz[13] : &g_freq_table_cpu_hz[16]; // 1785 / 2091
return;
}
if (module == SysClkModule_GPU) {
*min = &g_freq_table_gpu_hz[0];
if (isMariko && !allowUnsafe) {
*max = &g_freq_table_gpu_hz[11]; // 921
if (isMariko) {
*max = (!allowUnsafe || profile == SysClkProfile_Handheld) ?
&g_freq_table_gpu_hz[12] : &g_freq_table_gpu_hz[17]; // 998 / 1305
return;
}
switch (profile) {
case SysClkProfile_Handheld:
*max = isMariko ? &g_freq_table_gpu_hz[11] : &g_freq_table_gpu_hz[5]; // 921 / 460
*max = &g_freq_table_gpu_hz[5]; // 460
break;
case SysClkProfile_HandheldChargingUSB:
*max = isMariko ? &g_freq_table_gpu_hz[16] : &g_freq_table_gpu_hz[9]; // 1267 / 768
*max = &g_freq_table_gpu_hz[9]; // 768
break;
default:
*max = isMariko ? &g_freq_table_gpu_hz[17] : &g_freq_table_gpu_hz[11]; // 1305 / 921
*max = &g_freq_table_gpu_hz[11]; // 921
break;
}
return;