Merge "Initial support for GFRG250"
diff --git a/sysmgr/peripheral/fancontrol.cc b/sysmgr/peripheral/fancontrol.cc
index b800bb6..09eb087 100644
--- a/sysmgr/peripheral/fancontrol.cc
+++ b/sysmgr/peripheral/fancontrol.cc
@@ -92,6 +92,31 @@
                           pwm_step      : 1,
                           temp_overheat : 105,
                         };
+/*
+ * Defaults of Fan control parameters for GFRG250 (Optimus Prime)
+ * There is no direct SOC temp input, so we use the remote sensor.
+ * Thermal policy can be found at b/23119698
+ */
+
+const FanControlParams FanControl::kGFRG250FanCtrlSocDefaults = {
+                          temp_setpt    : 76,
+                          temp_max      : 88,
+                          temp_step     : 3,
+                          duty_cycle_min: 30,
+                          duty_cycle_max: 100,
+                          pwm_step      : 2,
+                          temp_overheat : 105,
+                        };
+
+const FanControlParams FanControl::kGFRG250FanCtrlHddDefaults = {
+                          temp_setpt    : 55,
+                          temp_max      : 60,
+                          temp_step     : 2,
+                          duty_cycle_min: 30,
+                          duty_cycle_max: 100,
+                          pwm_step      : 1,
+                          temp_overheat : 105,
+                        };
 
 /*
  * Defaults of Fan control parameters for GFSC100 (Spacecast).
@@ -258,6 +283,12 @@
       pfan_ctrl_params_[BRUNO_IS_HDD] = kGFRG210FanCtrlHddDefaults;
       max = BRUNO_IS_HDD;
       break;
+    case BRUNO_GFRG250:
+      /* Set thermal fan policy parameters of GFRG250 */
+      pfan_ctrl_params_[BRUNO_SOC] = kGFRG250FanCtrlSocDefaults;
+      pfan_ctrl_params_[BRUNO_IS_HDD] = kGFRG250FanCtrlHddDefaults;
+      max = BRUNO_IS_HDD;
+      break;
     case BRUNO_GFSC100:
       /* Set thermal fan policy parameters of GFSC100 */
       pfan_ctrl_params_[BRUNO_SOC] = kGFSC100FanCtrlSocDefaults;
diff --git a/sysmgr/peripheral/fancontrol.h b/sysmgr/peripheral/fancontrol.h
index d8fa5b5..4e379ad 100644
--- a/sysmgr/peripheral/fancontrol.h
+++ b/sysmgr/peripheral/fancontrol.h
@@ -66,6 +66,9 @@
   static const FanControlParams kGFRG210FanCtrlSocDefaults;
   static const FanControlParams kGFRG210FanCtrlHddDefaults;
 
+  static const FanControlParams kGFRG250FanCtrlSocDefaults;
+  static const FanControlParams kGFRG250FanCtrlHddDefaults;
+
   static const FanControlParams kGFSC100FanCtrlSocDefaults;
   static const FanControlParams kGFSC100FanCtrlHddDefaults;
 
diff --git a/sysmgr/peripheral/platform.cc b/sysmgr/peripheral/platform.cc
index f82ec8f..d1943f6 100644
--- a/sysmgr/peripheral/platform.cc
+++ b/sysmgr/peripheral/platform.cc
@@ -18,6 +18,7 @@
   Platform("GFHD200", BRUNO_GFHD200, false, false),
   Platform("GFRG200", BRUNO_GFRG200, false, true),
   Platform("GFRG210", BRUNO_GFRG210, true,  true),
+  Platform("GFRG250", BRUNO_GFRG250, true,  true),
   Platform("GFSC100", BRUNO_GFSC100, true,  true),
   Platform("GFLT110", BRUNO_GFLT110, false, false),
   Platform("GFLT120", BRUNO_GFLT110, false, false),
diff --git a/sysmgr/peripheral/platform.h b/sysmgr/peripheral/platform.h
index c5057b0..7c97f2f 100644
--- a/sysmgr/peripheral/platform.h
+++ b/sysmgr/peripheral/platform.h
@@ -21,6 +21,7 @@
   BRUNO_GFHD100,          /* Bruno */
   BRUNO_GFRG200,          /* Sideswipe noHDD */
   BRUNO_GFRG210,          /* Optimus HDD */
+  BRUNO_GFRG250,          /* Optimus Prime HDD */
   BRUNO_GFSC100,          /* Spacecast */
   BRUNO_GFHD200,          /* Camaro */
   BRUNO_GFLT110,          /* Fiber Jack */