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>
diff --git a/src/mainboard/google/gru/pwm_regulator.c b/src/mainboard/google/gru/pwm_regulator.c
index 696f09a..3ee74a4 100644
--- a/src/mainboard/google/gru/pwm_regulator.c
+++ b/src/mainboard/google/gru/pwm_regulator.c
@@ -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 @@
 	[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 @@
 	[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 @@
 	} 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);