- [Fix] CPU@2397MHz and GPU@1344MHz can be set on all consoles

- README

- Add more RAM freqs as overvolting is now available
This commit is contained in:
KazushiM
2021-11-28 19:28:58 +08:00
parent 8bd7fa6f99
commit 7dd0b78e15
10 changed files with 99 additions and 77 deletions

View File

@@ -12,24 +12,22 @@ constexpr ro::ModuleId PtmModuleId[] = {
namespace pcv {
typedef struct {
int c0 = 0;
int c1 = 0;
int c2 = 0;
int c3 = 0;
int c4 = 0;
int c5 = 0;
s32 c0 = 0;
s32 c1 = 0;
s32 c2 = 0;
s32 c3 = 0;
s32 c4 = 0;
s32 c5 = 0;
} cvb_coefficients;
typedef struct {
u32 freq = 0;
u32 padding = 0;
u64 freq = 0;
cvb_coefficients cvb_dfll_param;
cvb_coefficients cvb_pll_param; // only c0 is reserved
} cpu_freq_cvb_table_t;
typedef struct {
u32 freq = 0;
u32 padding = 0;
u64 freq = 0;
cvb_coefficients cvb_dfll_param; // empty, dfll clock source not selected
cvb_coefficients cvb_pll_param;
} gpu_cvb_pll_table_t;
@@ -64,28 +62,28 @@ namespace pcv {
// TODO: correctly derive c0-c1 dfll coefficients
constexpr cpu_freq_cvb_table_t NewCpuTables[] = {
// OldCpuTables
// { 204000, 0, { 721589, -12695, 27 }, { 1120000 } },
// { 306000, 0, { 747134, -14195, 27 }, { 1120000 } },
// { 408000, 0, { 776324, -15705, 27 }, { 1120000 } },
// { 510000, 0, { 809160, -17205, 27 }, { 1120000 } },
// { 612000, 0, { 845641, -18715, 27 }, { 1120000 } },
// { 714000, 0, { 885768, -20215, 27 }, { 1120000 } },
// { 816000, 0, { 929540, -21725, 27 }, { 1120000 } },
// { 918000, 0, { 976958, -23225, 27 }, { 1120000 } },
// { 1020000, 0, { 1028021, -24725, 27 }, { 1120000 } },
// { 1122000, 0, { 1082730, -26235, 27 }, { 1120000 } },
// { 1224000, 0, { 1141084, -27735, 27 }, { 1120000 } },
// { 1326000, 0, { 1203084, -29245, 27 }, { 1120000 } },
// { 1428000, 0, { 1268729, -30745, 27 }, { 1120000 } },
// { 1581000, 0, { 1374032, -33005, 27 }, { 1120000 } },
// { 1683000, 0, { 1448791, -34505, 27 }, { 1120000 } },
// { 1785000, 0, { 1527196, -36015, 27 }, { 1120000 } },
// { 1887000, 0, { 1609246, -37515, 27 }, { 1120000 } },
// { 1963500, 0, { 1675751, -38635, 27 }, { 1120000 } },
{ 2091000, 0, { 1719782, -40440, 27 }, { NewCpuVoltageScaled } },
{ 2193000, 0, { 1809766, -41939, 27 }, { NewCpuVoltageScaled } },
{ 2295000, 0, { 1904458, -43439, 27 }, { NewCpuVoltageScaled } },
{ 2397000, 0, { 2004105, -44938, 27 }, { NewCpuVoltageScaled } },
// { 204000, { 721589, -12695, 27 }, { 1120000 } },
// { 306000, { 747134, -14195, 27 }, { 1120000 } },
// { 408000, { 776324, -15705, 27 }, { 1120000 } },
// { 510000, { 809160, -17205, 27 }, { 1120000 } },
// { 612000, { 845641, -18715, 27 }, { 1120000 } },
// { 714000, { 885768, -20215, 27 }, { 1120000 } },
// { 816000, { 929540, -21725, 27 }, { 1120000 } },
// { 918000, { 976958, -23225, 27 }, { 1120000 } },
// { 1020000, { 1028021, -24725, 27 }, { 1120000 } },
// { 1122000, { 1082730, -26235, 27 }, { 1120000 } },
// { 1224000, { 1141084, -27735, 27 }, { 1120000 } },
// { 1326000, { 1203084, -29245, 27 }, { 1120000 } },
// { 1428000, { 1268729, -30745, 27 }, { 1120000 } },
// { 1581000, { 1374032, -33005, 27 }, { 1120000 } },
// { 1683000, { 1448791, -34505, 27 }, { 1120000 } },
// { 1785000, { 1527196, -36015, 27 }, { 1120000 } },
// { 1887000, { 1609246, -37515, 27 }, { 1120000 } },
// { 1963500, { 1675751, -38635, 27 }, { 1120000 } },
{ 2091000, { 1719782, -40440, 27 }, { NewCpuVoltageScaled } },
{ 2193000, { 1809766, -41939, 27 }, { NewCpuVoltageScaled } },
{ 2295000, { 1904458, -43439, 27 }, { NewCpuVoltageScaled } },
{ 2397000, { NewCpuVoltageScaled }, { NewCpuVoltageScaled } },
};
static_assert(sizeof(NewCpuTables) <= sizeof(cpu_freq_cvb_table_t)*14);
@@ -112,19 +110,24 @@ namespace pcv {
// TODO: correctly derive c0-c5 coefficients
constexpr gpu_cvb_pll_table_t NewGpuTables[] = {
// OldGpuTables
// { 537600, 0, {}, { 801688, -10900, -163, 298, -10599, 162 } },
// { 614400, 0, {}, { 824214, -5743, -452, 238, -6325, 81 } },
// { 691200, 0, {}, { 848830, -3903, -552, 119, -4030, -2 } },
// { 768000, 0, {}, { 891575, -4409, -584, 0, -2849, 39 } },
// { 844800, 0, {}, { 940071, -5367, -602, -60, -63, -93 } },
// { 921600, 0, {}, { 986765, -6637, -614, -179, 1905, -13 } },
// { 998400, 0, {}, { 1098475, -13529, -497, -179, 3626, 9 } },
// { 1075200, 0, {}, { 1163644, -12688, -648, 0, 1077, 40 } },
// { 1152000, 0, {}, { 1204812, -9908, -830, 0, 1469, 110 } },
// { 1228800, 0, {}, { 1277303, -11675, -859, 0, 3722, 313 } },
// { 1267200, 0, {}, { 1335531, -12567, -867, 0, 3681, 559 } },
{ 1305600, 0, {}, { 1380113, -13465, -874, 0, 2580, 648 } },
{ 1344000, 0, {}, { 1420000, -14000, -870, 0, 2193, 824 } },
// { 537600, {}, { 801688, -10900, -163, 298, -10599, 162 } },
// { 614400, {}, { 824214, -5743, -452, 238, -6325, 81 } },
// { 691200, {}, { 848830, -3903, -552, 119, -4030, -2 } },
// { 768000, {}, { 891575, -4409, -584, 0, -2849, 39 } },
// { 844800, {}, { 940071, -5367, -602, -60, -63, -93 } },
// { 921600, {}, { 986765, -6637, -614, -179, 1905, -13 } },
// { 998400, {}, { 1098475, -13529, -497, -179, 3626, 9 } },
// { 1075200, {}, { 1163644, -12688, -648, 0, 1077, 40 } },
// { 1152000, {}, { 1204812, -9908, -830, 0, 1469, 110 } },
// { 1228800, {}, { 1277303, -11675, -859, 0, 3722, 313 } },
// { 1267200, {}, { 1335531, -12567, -867, 0, 3681, 559 } },
{ 1305600, {}, { 955000 } },
{ 1344000, {}, { 995000 } },
// { 1382400, {}, { 1040000 } },
// { 1420800, {}, { 1090000 } },
// { 1459200, {}, { 1145000 } },
// { 1497600, {}, { 1200000 } },
// { 1536000, {}, { 1250000 } },
};
static_assert(sizeof(NewGpuTables) <= sizeof(gpu_cvb_pll_table_t)*15);

View File

@@ -5,16 +5,16 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app
### Notes:
- **No GPU capping on Mariko** (Hoag/Iowa/Aula)
- Ability to **set RAM clocks is removed**, please use sys-clk-OC with **[ptm patch](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/Patch/12-ptm.pchtxt)**
- Ability to **set RAM clocks is removed**, please use sys-clk-OC with **[ptm patch](https://github.com/KazushiMe/Switch-OC-Suite/blob/master/Source/Patch/13-ptm.pchtxt)** or prebuilt loader.kip
## Clock table (MHz)
### CPU clocks
* 2397 → max for Mariko
* 2295 → max for Mariko (stable)
* 2397 → approx. max for Mariko
* 2295
* 2193
* 2091
* 2091 → max for Mariko (without overvolting capped at 1120 mV)
* 1963 → official max for Mariko
* 1887
* 1785 → official boost mode
@@ -32,8 +32,9 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app
### GPU clocks
* 1344 → max for Mariko
* 1305 → max for Mariko (stable)
* 1??? → unknown max for Mariko
* 1344
* 1305
* 1267 → official max for Mariko
* 1228
* 1152
@@ -56,13 +57,13 @@ Switch sysmodule allowing you to set cpu/gpu clocks according to the running app
From Hekate Minerva module [sys_sdrammtc.c](https://github.com/CTCaer/hekate/blob/197ed8c319bd4132e4d7571ce037d4a27f806bba/modules/hekate_libsys_minerva/sys_sdrammtc.c#L67)
- 2131 → max for Erista (with over-voltage)
- 2131 → max for Erista & Mariko (with overvolting)
- 2099
- 2064
- 1996 → max for Mariko
- 1996
- 1932
- 1894
- 1862 → stable max for Mariko (stable on most DRAM chips except Hynix ones), max for Erista (without over-voltage)
- 1862 → stable max for Mariko (stable on most DRAM chips except Hynix ones) (without overvolting capped at 600 mV)
- 1795
- 1728
- 1600 → official docked & official boost mode