ldr: allow 1963 cpu cap + revise gpu UV
This commit is contained in:
@@ -37,7 +37,7 @@ volatile CustomizeTable C = {
|
|||||||
.commonEmcMemVolt = 1175000, // LPDDR4X JEDEC Specification
|
.commonEmcMemVolt = 1175000, // LPDDR4X JEDEC Specification
|
||||||
.eristaEmcMaxClock = 1600000, // Maximum HB-MGCH ram rating
|
.eristaEmcMaxClock = 1600000, // Maximum HB-MGCH ram rating
|
||||||
|
|
||||||
.marikoEmcMaxClock = 2133000,
|
.marikoEmcMaxClock = 1866000,
|
||||||
.marikoEmcVddqVolt = 600000,
|
.marikoEmcVddqVolt = 600000,
|
||||||
.emcDvbShift = 0,
|
.emcDvbShift = 0,
|
||||||
|
|
||||||
@@ -54,8 +54,21 @@ volatile CustomizeTable C = {
|
|||||||
|
|
||||||
/* Set to 4 read and 2 write for 1866b tWRL. */
|
/* Set to 4 read and 2 write for 1866b tWRL. */
|
||||||
/* For 2133 tWRL: 8 read and 4 write. */
|
/* For 2133 tWRL: 8 read and 4 write. */
|
||||||
.mem_burst_read_latency = 40,
|
|
||||||
.mem_burst_write_latency = 18,
|
/*
|
||||||
|
* Read:
|
||||||
|
* 2133RL = 40
|
||||||
|
* 1866RL = 36
|
||||||
|
* 1600RL = 32
|
||||||
|
* 1331RL = 28
|
||||||
|
* Write:
|
||||||
|
* 2133WL = 18
|
||||||
|
* 1866WL = 16
|
||||||
|
* 1600WL = 14
|
||||||
|
* 1331WL = 12
|
||||||
|
*/
|
||||||
|
.mem_burst_read_latency = 36,
|
||||||
|
.mem_burst_write_latency = 16,
|
||||||
|
|
||||||
.eristaCpuUV = 0,
|
.eristaCpuUV = 0,
|
||||||
.eristaCpuVmin = 800,
|
.eristaCpuVmin = 800,
|
||||||
@@ -65,16 +78,19 @@ volatile CustomizeTable C = {
|
|||||||
|
|
||||||
.marikoCpuUVLow = 0, // No undervolt
|
.marikoCpuUVLow = 0, // No undervolt
|
||||||
.marikoCpuUVHigh = 0, // No undervolt
|
.marikoCpuUVHigh = 0, // No undervolt
|
||||||
.tableConf = DEFAULT_TABLE, /* TODO: Add AUTO */
|
.tableConf = DEFAULT_TABLE,
|
||||||
.marikoCpuLowVmin = 620,
|
.marikoCpuLowVmin = 620,
|
||||||
.marikoCpuHighVmin = 750,
|
.marikoCpuHighVmin = 750,
|
||||||
.marikoCpuMaxVolt = 1120,
|
.marikoCpuMaxVolt = 1120,
|
||||||
|
|
||||||
/* Supported values: 2397000, 2499000, 2601000, 2703000. */
|
/* Supported values: 1963000, 2091000, 2193000, 2295000, 2397000, 2499000, 2601000, 2703000. */
|
||||||
|
/* 1963000 is official rating of T214/Mariko, fully safe. */
|
||||||
|
/* 2091000-2295000 is a slight OC which should work on all units, but no guarantees. */
|
||||||
|
/* 2397000 is the max safe OC for most average units with tuned undervolt. */
|
||||||
/* 2499000 should be used with caution. */
|
/* 2499000 should be used with caution. */
|
||||||
/* 2601000 exceeds pmic limit on most consoles. */
|
/* 2601000 exceeds pmic limit on most consoles. */
|
||||||
/* 2703000 is potentially dangerous and not advised. */
|
/* 2703000 is potentially dangerous and not advised. */
|
||||||
.marikoCpuMaxClock = 2397000,
|
.marikoCpuMaxClock = 1963000,
|
||||||
|
|
||||||
.eristaCpuBoostClock = 1785000, // Default boost clock
|
.eristaCpuBoostClock = 1785000, // Default boost clock
|
||||||
.marikoCpuBoostClock = 1963000, // Default boost clock
|
.marikoCpuBoostClock = 1963000, // Default boost clock
|
||||||
@@ -84,7 +100,7 @@ volatile CustomizeTable C = {
|
|||||||
|
|
||||||
.marikoGpuUV = 0,
|
.marikoGpuUV = 0,
|
||||||
/* For automatic vmin detection, set this to AUTO. */
|
/* For automatic vmin detection, set this to AUTO. */
|
||||||
.marikoGpuVmin = 610,
|
.marikoGpuVmin = AUTO,
|
||||||
|
|
||||||
.marikoGpuVmax = 800,
|
.marikoGpuVmax = 800,
|
||||||
|
|
||||||
@@ -95,8 +111,9 @@ volatile CustomizeTable C = {
|
|||||||
/* This table is used with a gpu uv mode of 2. */
|
/* This table is used with a gpu uv mode of 2. */
|
||||||
/* Setting DEACTIVATED_GPU_FREQ on any freq will disable it and all freqs greater than it. (the latter is a bug :/) */
|
/* Setting DEACTIVATED_GPU_FREQ on any freq will disable it and all freqs greater than it. (the latter is a bug :/) */
|
||||||
/* AUTO: Voltage is optimally chosen; with commonGpuVoltOffset applied. */
|
/* AUTO: Voltage is optimally chosen; with commonGpuVoltOffset applied. */
|
||||||
/* AUTO only works up to 1305 GPU */
|
/* AUTO only works up to 1305 GPU on Mariko and 921 GPU on Erista */
|
||||||
/* You can overwrite auto with any voltage (in mv) of your choice - offset will not be applied. */
|
/* You can overwrite auto with any voltage (in mv) of your choice - offset will not be applied. */
|
||||||
|
|
||||||
.eristaGpuVoltArray = {
|
.eristaGpuVoltArray = {
|
||||||
AUTO /* 76 */,
|
AUTO /* 76 */,
|
||||||
AUTO /* 115 */,
|
AUTO /* 115 */,
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ namespace ams::ldr::oc::pcv {
|
|||||||
|
|
||||||
static const u32 cpuVoltThermalData[] = { 620, 1120, 20000, 620, 1120, 70000, 950, 1132, 0, 950, 1227, 0 };
|
static const u32 cpuVoltThermalData[] = { 620, 1120, 20000, 620, 1120, 70000, 950, 1132, 0, 950, 1227, 0 };
|
||||||
|
|
||||||
static const u32 allowedCpuMaxFrequencies[] = { 2'397'000, 2'499'000, 2'601'000, 2'703'000, };
|
static const u32 allowedCpuMaxFrequencies[] = { 1'963'000, 2'091'000, 2'193'000, 2'295'000, 2'397'000, 2'499'000, 2'601'000, 2'703'000, };
|
||||||
|
|
||||||
constexpr cvb_entry_t GpuCvbTableDefault[] = {
|
constexpr cvb_entry_t GpuCvbTableDefault[] = {
|
||||||
// GPUB01_NA_CVB_TABLE
|
// GPUB01_NA_CVB_TABLE
|
||||||
@@ -420,27 +420,26 @@ namespace ams::ldr::oc::pcv {
|
|||||||
std::memcpy(gpu_cvb_table_head, (void *)customize_table, customize_table_size);
|
std::memcpy(gpu_cvb_table_head, (void *)customize_table, customize_table_size);
|
||||||
|
|
||||||
// Patch GPU volt
|
// Patch GPU volt
|
||||||
if (C.marikoGpuUV == 2 || C.eristaGpuUV == 2) {
|
cvb_entry_t *entry = static_cast<cvb_entry_t *>(gpu_cvb_table_head);
|
||||||
cvb_entry_t *entry = static_cast<cvb_entry_t *>(gpu_cvb_table_head);
|
for (size_t i = 0; i < customize_entry_count; ++i) {
|
||||||
for (size_t i = 0; i < customize_entry_count; ++i) {
|
if (isMariko) {
|
||||||
if (isMariko) {
|
if (C.marikoGpuVoltArray[i] != 0) {
|
||||||
if (C.marikoGpuVoltArray[i] != 0) {
|
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (C.marikoGpuVoltArray[i] * 1000));
|
||||||
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (C.marikoGpuVoltArray[i] * 1000));
|
ClearCvbPllEntry(entry);
|
||||||
ClearCvbPllEntry(entry);
|
|
||||||
} else {
|
|
||||||
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (C.eristaGpuVoltArray[i] != 0) {
|
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000));
|
||||||
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (C.eristaGpuVoltArray[i] * 1000));
|
}
|
||||||
ClearCvbPllEntry(entry);
|
} else {
|
||||||
} else {
|
if (C.eristaGpuVoltArray[i] != 0) {
|
||||||
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000));
|
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (C.eristaGpuVoltArray[i] * 1000));
|
||||||
}
|
ClearCvbPllEntry(entry);
|
||||||
|
} else {
|
||||||
|
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000));
|
||||||
}
|
}
|
||||||
++entry;
|
|
||||||
}
|
}
|
||||||
} else if (C.commonGpuVoltOffset) {
|
++entry;
|
||||||
|
}
|
||||||
|
if (C.commonGpuVoltOffset && !(isMariko ? C.marikoGpuUV : C.eristaGpuUV)) {
|
||||||
cvb_entry_t *entry = static_cast<cvb_entry_t *>(gpu_cvb_table_head);
|
cvb_entry_t *entry = static_cast<cvb_entry_t *>(gpu_cvb_table_head);
|
||||||
for (size_t i = 0; i < customize_entry_count; ++i) {
|
for (size_t i = 0; i < customize_entry_count; ++i) {
|
||||||
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000));
|
PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000));
|
||||||
|
|||||||
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
Binary file not shown.
BIN
dist/atmosphere/kips/hoc.kip
vendored
BIN
dist/atmosphere/kips/hoc.kip
vendored
Binary file not shown.
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
Binary file not shown.
Reference in New Issue
Block a user