Commit 8f321b52 authored by David Cohen's avatar David Cohen Committed by Juha Yrjola

Menelaus: Fix voltage values for VMEM

Signed-off-by: default avatarDavid Cohen <david.cohen@indt.org.br>
Signed-off-by: default avatarJuha Yrjola <juha.yrjola@solidboot.com>
parent a7e514a0
......@@ -480,8 +480,8 @@ static const struct menelaus_vtg vmem_vtg = {
static const struct menelaus_vtg_value vmem_values[] = {
{ 1500, 0 },
{ 1800, 1 },
{ 2500, 2 },
{ 2800, 3 },
{ 1900, 2 },
{ 2500, 3 },
};
int menelaus_set_vmem(unsigned int mV)
......@@ -506,6 +506,13 @@ static const struct menelaus_vtg vio_vtg = {
.mode_reg = MENELAUS_LDO_CTRL4,
};
static const struct menelaus_vtg_value vio_values[] = {
{ 1500, 0 },
{ 1800, 1 },
{ 2500, 2 },
{ 2800, 3 },
};
int menelaus_set_vio(unsigned int mV)
{
int val;
......@@ -513,8 +520,7 @@ int menelaus_set_vio(unsigned int mV)
if (mV == 0)
return menelaus_set_voltage(&vio_vtg, 0, 0, 0);
/* VIO has the same values as VMEM */
val = menelaus_get_vtg_value(mV, vmem_values, ARRAY_SIZE(vmem_values));
val = menelaus_get_vtg_value(mV, vio_values, ARRAY_SIZE(vio_values));
if (val < 0)
return -EINVAL;
return menelaus_set_voltage(&vio_vtg, mV, val, 0x02);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment