Lin Huang has uploaded this change for review.

View Change

google/gru: Correct Scarlet pwm regulator minimum value and maximum value

In Scarlet pwm regulatoror minimum value and maximum value differs from
other board variants, Correct it so we can get the right voltage.

Change-Id: I1f722eabb697b3438d9f4aa29c205b0161eb442a
Signed-off-by: Lin Huang <hl@rock-chips.com>
---
M src/mainboard/google/gru/pwm_regulator.c
1 file changed, 9 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/20831/1
diff --git a/src/mainboard/google/gru/pwm_regulator.c b/src/mainboard/google/gru/pwm_regulator.c
index 696f09a..729c1fe 100644
--- a/src/mainboard/google/gru/pwm_regulator.c
+++ b/src/mainboard/google/gru/pwm_regulator.c
@@ -47,6 +47,12 @@
[PWM_REGULATOR_CENTERLOG] = {7994, 10499}
};

+int scarlet_pwm_design_voltage[][2] = {
+ [PWM_REGULATOR_GPU] = {7996, 10990},
+ [PWM_REGULATOR_BIG] = {8000, 12992},
+ [PWM_REGULATOR_LIT] = {8021, 11996},
+};
+
int pwm_enum_to_pwm_number[] = {
[PWM_REGULATOR_GPU] = 0,
[PWM_REGULATOR_LIT] = 2,
@@ -74,6 +80,9 @@
} else if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN) && board_id() >= 6) {
voltage_min = kevin6_pwm_design_voltage[pwm][0];
voltage_max = kevin6_pwm_design_voltage[pwm][1];
+ } else if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET)) {
+ voltage_min = scarlet_pwm_design_voltage[pwm][0];
+ voltage_max = scarlet_pwm_design_voltage[pwm][1];
}

assert(voltage <= voltage_max && voltage >= voltage_min);

To view, visit change 20831. To unsubscribe, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f722eabb697b3438d9f4aa29c205b0161eb442a
Gerrit-Change-Number: 20831
Gerrit-PatchSet: 1
Gerrit-Owner: Lin Huang <hl@rock-chips.com>