diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 35377624..81d80e56 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -37,7 +37,7 @@ volatile CustomizeTable C = { .commonEmcMemVolt = 1175000, // LPDDR4X JEDEC Specification .eristaEmcMaxClock = 1600000, // Maximum HB-MGCH ram rating -.marikoEmcMaxClock = 2133000, +.marikoEmcMaxClock = 1866000, .marikoEmcVddqVolt = 600000, .emcDvbShift = 0, @@ -54,8 +54,21 @@ volatile CustomizeTable C = { /* Set to 4 read and 2 write for 1866b tWRL. */ /* 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, .eristaCpuVmin = 800, @@ -65,16 +78,19 @@ volatile CustomizeTable C = { .marikoCpuUVLow = 0, // No undervolt .marikoCpuUVHigh = 0, // No undervolt -.tableConf = DEFAULT_TABLE, /* TODO: Add AUTO */ +.tableConf = DEFAULT_TABLE, .marikoCpuLowVmin = 620, .marikoCpuHighVmin = 750, .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. */ /* 2601000 exceeds pmic limit on most consoles. */ /* 2703000 is potentially dangerous and not advised. */ -.marikoCpuMaxClock = 2397000, +.marikoCpuMaxClock = 1963000, .eristaCpuBoostClock = 1785000, // Default boost clock .marikoCpuBoostClock = 1963000, // Default boost clock @@ -84,7 +100,7 @@ volatile CustomizeTable C = { .marikoGpuUV = 0, /* For automatic vmin detection, set this to AUTO. */ -.marikoGpuVmin = 610, +.marikoGpuVmin = AUTO, .marikoGpuVmax = 800, @@ -95,8 +111,9 @@ volatile CustomizeTable C = { /* 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 :/) */ /* 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. */ + .eristaGpuVoltArray = { AUTO /* 76 */, AUTO /* 115 */, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp index 152e870c..127d9ec9 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp @@ -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 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[] = { // 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); // Patch GPU volt - if (C.marikoGpuUV == 2 || C.eristaGpuUV == 2) { - cvb_entry_t *entry = static_cast(gpu_cvb_table_head); - for (size_t i = 0; i < customize_entry_count; ++i) { - if (isMariko) { - if (C.marikoGpuVoltArray[i] != 0) { - PATCH_OFFSET(&(entry->cvb_pll_param.c0), (C.marikoGpuVoltArray[i] * 1000)); - ClearCvbPllEntry(entry); - } else { - PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000)); - } + cvb_entry_t *entry = static_cast(gpu_cvb_table_head); + for (size_t i = 0; i < customize_entry_count; ++i) { + if (isMariko) { + if (C.marikoGpuVoltArray[i] != 0) { + PATCH_OFFSET(&(entry->cvb_pll_param.c0), (C.marikoGpuVoltArray[i] * 1000)); + ClearCvbPllEntry(entry); } else { - if (C.eristaGpuVoltArray[i] != 0) { - 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)); - } + PATCH_OFFSET(&(entry->cvb_pll_param.c0), (entry->cvb_pll_param.c0 - C.commonGpuVoltOffset * 1000)); + } + } else { + if (C.eristaGpuVoltArray[i] != 0) { + 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(gpu_cvb_table_head); 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)); diff --git a/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp b/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp index 25c0541a..ea4cc756 100644 Binary files a/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp and b/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp differ diff --git a/dist/atmosphere/kips/hoc.kip b/dist/atmosphere/kips/hoc.kip index e4754b6b..3827ed7b 100644 Binary files a/dist/atmosphere/kips/hoc.kip and b/dist/atmosphere/kips/hoc.kip differ diff --git a/dist/switch/.overlays/horizon-oc-overlay.ovl b/dist/switch/.overlays/horizon-oc-overlay.ovl index 539e553e..e57652c7 100644 Binary files a/dist/switch/.overlays/horizon-oc-overlay.ovl and b/dist/switch/.overlays/horizon-oc-overlay.ovl differ