- 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

@@ -15,6 +15,12 @@ Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW.
## Features
- Erista variant (HAC-001)
- CPU Overclock
- Safe: 1785 MHz
- Unsafe (due to the limit of board power draw or power IC):
- Enable "Allow Unsafe Frequencies" in overlay to unlock frequencies up to 2091 MHz
- See [README for sys-clk-OC](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/sys-clk-OC/README.md)
- DRAM Overclock
- Safe: 1862.4 MHz
- Unsafe:
@@ -28,8 +34,8 @@ Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW.
- Mariko variant (HAC-001-01, HDH-001, HEG-001)
- CPU / GPU Overclock
- Safe: 1963 / 921 MHz
- Unsafe:
- Safe: 1963 / 998 MHz
- Unsafe (due to the limit of board power draw or power IC):
- Enable "Allow Unsafe Frequencies" in overlay to unlock frequencies up to 2397 / 1305 MHz
- See [README for sys-clk-OC](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/sys-clk-OC/README.md)
@@ -53,7 +59,8 @@ Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW.
- CPU & GPU frequency governor (Experimental)
- Adjust frequency based on load. Might decrease power draw but can introduce stutters. Can be turned off for specific titles.
- Fast-charging (2A) toggle, set charge limit (20% - 100%)
- Fast-charging (0.5A/2A) toggle, set charge limit (20% - 100%)
- Hoag (Switch Lite) cannot use the fast-charging toggle feature for now [#56](https://github.com/KazushiMe/Switch-OC-Suite/issues/56).
- Long-term use of charge limit may render the battery gauge inaccurate. Performing full cycles could help recalibration, or try [battery_desync_fix_nx](https://github.com/CTCaer/battery_desync_fix_nx).
- Global profile

View File

@@ -42,7 +42,7 @@ constexpr cpu_freq_cvb_table_t CpuCvbTableDefault[] = {
constexpr cpu_freq_cvb_table_t CpuCvbTableAppend[] = {
{ 1887000, { 1235000 }, { 5100873, -279186, 4747 } },
{ 1989000, { 1235000 }, { 5100873, -279186, 4747 } },
{ 1963500, { 1235000 }, { 5100873, -279186, 4747 } },
{ 2091000, { 1235000 }, { 5100873, -279186, 4747 } },
};

View File

@@ -7,11 +7,11 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app
### CPU clocks
* 2397 → approx. max for Mariko
* 2397 → approx. OC max for Mariko
* 2295
* 2193
* 2091 → max for Mariko (without overvolting capped at 1120 mV)
* 1963 → official max for Mariko
* 2091 → OC max for Erista
* 1963 → official and safe max for Mariko
* 1887
* 1785 → official boost mode, OC max for Erista
* 1683
@@ -28,13 +28,12 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app
### GPU clocks
* ????
* 1305 → OC max for Mariko
* 1267 → official max for Mariko
* 1228
* 1152
* 1075
* 998
* 998 → safe max for Mariko due to power draw
* 921 → OC max for Erista
* 844
* 768 → official docked
@@ -72,11 +71,19 @@ From Hekate Minerva module [sys_sdrammtc.c](https://github.com/CTCaer/hekate/blo
To protect the battery from excessive strain, clocks requested from config may be capped before applying, depending on your current profile:
### Erista
### Erista (Safe)
| | Handheld | Charging (USB) | Charging (Official) | Docked |
|:-------:|:--------:|:--------------:|:-------------------:|:------:|
| **MEM** | - | - | - | - |
| **CPU** | - | - | - | - |
| **CPU** | 1785 | 1785 | 1785 | 1785 |
| **GPU** | 460 | 768 | - | - |
### Erista (Unsafe allowed)
| | Handheld | Charging (USB) | Charging (Official) | Docked |
|:-------:|:--------:|:--------------:|:-------------------:|:------:|
| **MEM** | - | - | - | - |
| **CPU** | 1785 | - | - | - |
| **GPU** | 460 | 768 | - | - |
@@ -85,7 +92,7 @@ To protect the battery from excessive strain, clocks requested from config may b
|:-------:|:--------:|:--------------:|:-------------------:|:------:|
| **MEM** | - | - | - | - |
| **CPU** | 1963 | 1963 | 1963 | 1963 |
| **GPU** | 921 | 921 | 921 | 921 |
| **GPU** | 998 | 998 | 998 | 998 |
### Mariko (Unsafe allowed)
@@ -93,7 +100,7 @@ To protect the battery from excessive strain, clocks requested from config may b
|:-------:|:--------:|:--------------:|:-------------------:|:------:|
| **MEM** | - | - | - | - |
| **CPU** | - | - | - | - |
| **GPU** | 921 | 1267 | - | - |
| **GPU** | 998 | - | - | - |
## Installation

View File

@@ -20,7 +20,7 @@ make -j$CORES
popd > /dev/null
mkdir -p "$DIST_DIR/atmosphere/contents/$TITLE_ID/flags"
cp -vf "$ROOT_DIR/sysmodule/out/sys-clk.nsp" "$DIST_DIR/atmosphere/contents/$TITLE_ID/exefs.nsp"
cp -vf "$ROOT_DIR/sysmodule/out/sys-clk-OC.nsp" "$DIST_DIR/atmosphere/contents/$TITLE_ID/exefs.nsp"
>"$DIST_DIR/atmosphere/contents/$TITLE_ID/flags/boot2.flag"
echo "*** manager ***"

View File

@@ -31,6 +31,8 @@ uint32_t g_freq_table_mem_hz[] = {
};
uint32_t g_freq_table_cpu_hz[] = {
408000000,
510000000,
612000000,
714000000,
816000000,

View File

@@ -57,9 +57,10 @@ void MiscGui::listUI()
this->listElement->addItem(new tsl::elm::CategoryHeader("Config"));
if (this->isMariko) {
addConfigToggle(SysClkConfigValue_AllowUnsafeFrequencies);
addConfigToggle(SysClkConfigValue_AutoCPUBoost);
}
addConfigToggle(SysClkConfigValue_AllowUnsafeFrequencies);
addConfigToggle(SysClkConfigValue_SyncReverseNXMode);
addConfigToggle(SysClkConfigValue_DisableFastCharging);
addConfigToggle(SysClkConfigValue_GovernorExperimental);

View File

@@ -216,9 +216,9 @@ bool ClockManager::RefreshContext()
bool hasChanged = this->config->Refresh();
if (hasChanged) {
this->rnxSync->ToggleSync(this->GetConfig()->GetConfigValue(SysClkConfigValue_SyncReverseNXMode));
bool allowUnsafe = this->GetConfig()->GetConfigValue(SysClkConfigValue_AllowUnsafeFrequencies);
Clocks::SetAllowUnsafe(allowUnsafe);
if (Clocks::GetIsMariko()) {
bool allowUnsafe = this->GetConfig()->GetConfigValue(SysClkConfigValue_AllowUnsafeFrequencies);
Clocks::SetAllowUnsafe(allowUnsafe);
this->governor->SetCPUBoostHz(Clocks::GetNearestHz(SysClkModule_CPU, SysClkProfile_EnumMax, Clocks::boostCpuFreq));
this->governor->SetAutoCPUBoost(this->GetConfig()->GetConfigValue(SysClkConfigValue_AutoCPUBoost));
}

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;

View File

@@ -70,7 +70,6 @@ void Config::Load()
// Erista: Disable Mariko only features
if (!Clocks::GetIsMariko()) {
this->configValues[SysClkConfigValue_AllowUnsafeFrequencies] = 0;
this->configValues[SysClkConfigValue_AutoCPUBoost] = 0;
}