hocclk: reduce ram usage and add display undervolt
This commit is contained in:
@@ -66,6 +66,7 @@ typedef enum {
|
||||
|
||||
HocClkConfigValue_RAMVoltDisplayMode,
|
||||
HocClkConfigValue_CpuGovernorMinimumFreq,
|
||||
HocClkConfigValue_DisplayVoltage,
|
||||
|
||||
KipConfigValue_custRev,
|
||||
// KipConfigValue_mtcConf,
|
||||
@@ -252,6 +253,10 @@ static inline const char* hocclkFormatConfigValue(HocClkConfigValue val, bool pr
|
||||
return pretty ? "RAM Voltage / Usage Display Mode" : "ram_volt_usage_display_mode";
|
||||
case HocClkConfigValue_CpuGovernorMinimumFreq:
|
||||
return pretty ? "CPU Governor Minimum Frequency" : "cpu_gov_min_freq";
|
||||
|
||||
case HocClkConfigValue_DisplayVoltage:
|
||||
return pretty ? "Display Voltage" : "display_voltage";
|
||||
|
||||
// KIP config values
|
||||
case KipConfigValue_custRev:
|
||||
return pretty ? "Custom Revision" : "kip_cust_rev";
|
||||
@@ -453,6 +458,8 @@ static inline uint64_t hocclkDefaultConfigValue(HocClkConfigValue val)
|
||||
return 612000000ULL; // 612MHz
|
||||
case HocClkConfigValue_MaxDisplayClockH:
|
||||
return 60ULL;
|
||||
case HocClkConfigValue_DisplayVoltage:
|
||||
return 1200ULL; // Auto
|
||||
default:
|
||||
return 0ULL;
|
||||
}
|
||||
@@ -588,6 +595,9 @@ static inline uint64_t hocclkValidConfigValue(HocClkConfigValue val, uint64_t in
|
||||
return true;
|
||||
case HocClkConfigValue_BatteryChargeCurrent:
|
||||
return ((input >= 1024) && (input <= 3072)) || !input;
|
||||
case HocClkConfigValue_DisplayVoltage:
|
||||
return ((input >= 900) && (input <= 1325));
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ const u8 MAX17050_CURRENT_REG = 0x0A;
|
||||
// Buck Converter
|
||||
typedef enum I2c_BuckConverter_Reg {
|
||||
I2c_Max77620_SD1VOLT_REG = 0x17, // Used for Erista DDR VDDQ+VDD2 / Mariko VDD2
|
||||
I2c_Max77620_LDO0VOLT_REG = 0x23, // Used for Erista DDR VDDQ+VDD2 / Mariko VDD2
|
||||
I2c_Max77621_VOLT_REG = 0x00,
|
||||
I2c_Max77812_CPUVOLT_REG = 0x26,
|
||||
I2c_Max77812_GPUVOLT_REG = 0x23,
|
||||
@@ -40,7 +41,8 @@ typedef struct I2c_BuckConverter_Domain {
|
||||
|
||||
const I2c_BuckConverter_Domain I2c_Erista_CPU = { I2cDevice_Max77621Cpu, I2c_Max77621_VOLT_REG, 0x7F, 6250, 606250, 1400000, };
|
||||
const I2c_BuckConverter_Domain I2c_Erista_GPU = { I2cDevice_Max77621Gpu, I2c_Max77621_VOLT_REG, 0x7F, 6250, 606250, 1400000, };
|
||||
const I2c_BuckConverter_Domain I2c_Erista_DRAM = { I2cDevice_Max77620Pmic, I2c_Max77620_SD1VOLT_REG, 0x7F, 12500, 600000, 1250000, };
|
||||
const I2c_BuckConverter_Domain I2c_Erista_DRAM = { I2cDevice_Max77620Pmic, I2c_Max77620_SD1VOLT_REG, 0x3F, 12500, 600000, 1250000, };
|
||||
const I2c_BuckConverter_Domain I2c_Display = { I2cDevice_Max77620Pmic, I2c_Max77620_LDO0VOLT_REG, 0x7F, 25000, 800000, 1325000, };
|
||||
const I2c_BuckConverter_Domain I2c_Mariko_CPU = { I2cDevice_Max77812_2, I2c_Max77812_CPUVOLT_REG, 0xFF, 5000, 250000, 1525000, 0x78 };
|
||||
const I2c_BuckConverter_Domain I2c_Mariko_GPU = { I2cDevice_Max77812_2, I2c_Max77812_GPUVOLT_REG, 0xFF, 5000, 250000, 1525000, 0x78 };
|
||||
const I2c_BuckConverter_Domain I2c_Mariko_DRAM_VDDQ = { I2cDevice_Max77812_2, I2c_Max77812_MEMVOLT_REG, 0xFF, 5000, 250000, 700000, 0x78 };
|
||||
|
||||
Reference in New Issue
Block a user