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>
Reviewed-on: https://review.coreboot.org/20831
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Lin Huang 2017-07-31 15:12:15 +08:00 committed by Julius Werner
parent a2c5b2f252
commit c93d79b6cb

View File

@ -32,7 +32,7 @@
#define PWM_DESIGN_VOLTAGE_MIN_OUTDATED 8000
#define PWM_DESIGN_VOLTAGE_MAX_OUTDATED 15000
/* Later boards (Kevin rev6+, Gru rev2+) use different regulator ranges. */
/* Applies for Kevin rev6+ */
int kevin6_pwm_design_voltage[][2] = {
[PWM_REGULATOR_GPU] = {7858, 12177},
[PWM_REGULATOR_BIG] = {7987, 13022},
@ -40,6 +40,7 @@ int kevin6_pwm_design_voltage[][2] = {
[PWM_REGULATOR_CENTERLOG] = {8001, 10497}
};
/* Applies for Gru rev2+ and Bob. */
int pwm_design_voltage[][2] = {
[PWM_REGULATOR_GPU] = {7864, 12177},
[PWM_REGULATOR_BIG] = {8001, 13022},
@ -47,6 +48,13 @@ int pwm_design_voltage[][2] = {
[PWM_REGULATOR_CENTERLOG] = {7994, 10499}
};
/* Applies for Scarlet */
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 +82,9 @@ void pwm_regulator_configure(enum pwm_regulator pwm, int millivolt)
} 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);