EMC voltage for Mariko; Fix #60; Show battery & voltage info in overlay on Erista

- From previous analysis, EMC voltage is set before AMS loads on Mariko, and will not be set again or changed afterwards.

- sys-clk-OC will take care of setting emc voltage on Mariko once it loads.

- OS will not hang at boot as it always boots with EMC @ 1600 MHz.
This commit is contained in:
KazushiM
2023-01-24 23:24:58 +08:00
parent 012cd40a68
commit 120367cf7c
24 changed files with 324 additions and 146 deletions

View File

@@ -20,29 +20,34 @@ namespace ams::ldr::oc {
volatile CustomizeTable C = {
/* DRAM Timing:
* AUTO_ADJ_MARIKO_SAFE: Auto adjust timings for LPDDR4 ≤3733 Mbps specs, 8Gb density (Default).
* AUTO_ADJ_MARIKO_4266: Auto adjust timings for LPDDR4X 4266 Mbps specs, 8Gb density.
* AUTO_ADJ_MARIKO_SAFE_NO_ADJ_ERISTA: Auto adjust timings for Mariko LPDDR4X ≤3733 Mbps specs, 8Gb density; No timing adjustment for Erista. (Default)
* AUTO_ADJ_MARIKO_4266_NO_ADJ_ERISTA: Auto adjust timings for Mariko LPDDR4X 4266 Mbps specs, 8Gb density; No timing adjustments for Erista.
* NO_ADJ_ALL: No timing adjustment for both Erista and Mariko. Might achieve better performance on Mariko but lower maximum frequency is expected.
*/
.mtcConf = AUTO_ADJ_MARIKO_SAFE,
.mtcConf = AUTO_ADJ_MARIKO_SAFE_NO_ADJ_ERISTA,
/* Mariko CPU:
* - Max Clock in kHz:
* Default: 1785000
* >= 2397000 will enable overvolting (> 1120 mV)
* - Boost Clock in kHz:
* Default: 1785000
* Boost clock will be applied when applications request higher CPU frequency for quicker loading.
* - Max Voltage in mV:
* Default voltage: 1120
* 2397000 might be unreachable for some SoCs.
*/
.marikoCpuMaxClock = 2397000,
/* - Boost Clock in kHz:
* Default: 1785000
* Boost clock will be applied when applications request higher CPU frequency for quicker loading.
* This will be set regardless of whether sys-clk is enabled.
*/
.marikoCpuBoostClock = 1785000,
/* - Max Voltage in mV:
* Default voltage: 1120
*/
.marikoCpuMaxVolt = 1235,
/* Mariko GPU:
* - Max Clock in kHz:
* Default: 921600
* NVIDIA Maximum: 1267200
* 1305600 might be unreachable for some SoCs.
*/
.marikoGpuMaxClock = 1305600,
@@ -54,17 +59,22 @@ volatile CustomizeTable C = {
* - Graphical glitches
* - System instabilities
* - NAND corruption
* Timings from auto-adjustment have been tested safe for up to 1996.8 MHz for all DRAM chips.
*/
.marikoEmcMaxClock = 1996800,
/* - RAM Voltage in uV
* Range: 600'000 to 650'000 uV
* Value should be divided evenly by 5'000
* Default: 600'000
* Not enabled by default.
* This will not work without sys-clk-OC.
*/
.marikoEmcVolt = 0,
/* Erista CPU:
* Not tested but enabled by default.
* - Enable Overclock
* - Max Voltage in mV
*/
.eristaCpuOCEnabled= 1,
.eristaCpuMaxVolt = 1257,
.eristaCpuMaxVolt = 1235,
/* Erista EMC:
* - RAM Clock in kHz
@@ -73,13 +83,14 @@ volatile CustomizeTable C = {
* - Graphical glitches
* - System instabilities
* - NAND corruption
* - RAM Voltage in uV
*/
.eristaEmcMaxClock = 1862400,
/* - RAM Voltage in uV
* Range: 600'000 to 1250'000 uV
* Value should be divided evenly by 12'500
* Default(HOS): 1125'000
* Not enabled by default.
*/
.eristaEmcMaxClock = 1862400,
.eristaEmcVolt = 0,
};