- pages: Drop cust v2 support; Show update time in download section

- oc_loader: Separate Vddq and Vdd2 DRAM voltage for Mariko

- sys-clk-OC: Fix wrong regulator ID; Auto CPU Boost for Erista
This commit is contained in:
KazushiM
2023-01-27 10:45:06 +08:00
parent cdbd0b0045
commit f47e7604fe
25 changed files with 599 additions and 702 deletions

View File

@@ -217,10 +217,10 @@ bool ClockManager::RefreshContext()
this->rnxSync->ToggleSync(this->GetConfig()->GetConfigValue(SysClkConfigValue_SyncReverseNXMode));
bool allowUnsafe = this->GetConfig()->GetConfigValue(SysClkConfigValue_AllowUnsafeFrequencies);
Clocks::SetAllowUnsafe(allowUnsafe);
if (Clocks::GetIsMariko()) {
this->governor->SetAutoCPUBoost(this->GetConfig()->GetConfigValue(SysClkConfigValue_AutoCPUBoost));
if (Clocks::GetIsMariko())
this->governor->SetCPUBoostHz(Clocks::GetNearestHz(SysClkModule_CPU, SysClkProfile_EnumMax, Clocks::boostCpuFreq));
this->governor->SetAutoCPUBoost(this->GetConfig()->GetConfigValue(SysClkConfigValue_AutoCPUBoost));
}
}
bool enabled = this->GetConfig()->Enabled();

View File

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

View File

@@ -292,8 +292,13 @@ Result FileUtils::CustParser(const char* filepath, size_t filesize) {
Clocks::maxMemFreq = table.marikoEmcMaxClock * 1000;
if (table.marikoEmcVolt && table.marikoEmcVolt >= 600'000 && table.marikoEmcVolt <= 650'000) {
u32 mvolt = table.marikoEmcVolt / 1000;
Result res = I2c_BuckConverter_SetMvOut(&I2c_Mariko_DRAM, mvolt);
LogLine("Set EMC volt to %u mV: %s", mvolt, R_FAILED(res) ? "Failed" : "OK");
Result res = I2c_BuckConverter_SetMvOut(&I2c_Mariko_DRAM_VDDQ, mvolt);
LogLine("Set EMC Vddq volt to %u mV: %s", mvolt, R_FAILED(res) ? "Failed" : "OK");
}
if (table.commonEmcMemVolt && table.commonEmcMemVolt >= 1100'000 && table.commonEmcMemVolt <= 1250'000) {
u32 mvolt = table.commonEmcMemVolt / 1000;
Result res = I2c_BuckConverter_SetMvOut(&I2c_Mariko_DRAM_VDD2, mvolt);
LogLine("Set MEM Vdd2 volt to %u mV: %s", mvolt, R_FAILED(res) ? "Failed" : "OK");
}
} else {
if (table.eristaEmcMaxClock)

View File

@@ -30,8 +30,6 @@ class FileUtils
static void Exit();
static Result Initialize();
static bool IsInitialized();
static bool IsLogEnabled();
static bool ExistReverseNXTool();
static void InitializeAsync();
static void LogLine(const char *format, ...);
static void WriteContextToCsv(const SysClkContext* context);
@@ -51,7 +49,7 @@ class FileUtils
uint32_t marikoEmcVolt;
uint32_t eristaCpuMaxVolt;
uint32_t eristaEmcMaxClock;
uint32_t eristaEmcVolt;
uint32_t commonEmcMemVolt;
} CustTable;
static void RefreshFlags(bool force);