summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Zhang <ryan.zhang@quanta.corp-partner.google.com>2018-04-20 10:58:18 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-05-16 00:55:21 +0000
commit63bf84d6ccef9ce042faf2a6783b444487cee2fc (patch)
treee2106446c9385dffd777feae521df9a0f86c78ee
parent96640173e99735c5705f29fb9577394d9ae776b4 (diff)
downloadchrome-ec-63bf84d6ccef9ce042faf2a6783b444487cee2fc.tar.gz
Fizz: add CONFIG_BOARD_HAS_RTC_RESET
This patch resets the RTC of the SoC when the system doesn't leave S5. If it fails 5 times, the system will go back to and stay in G3. BUG=b:79323716 BRANCH=fizz TEST=Boot Fizz differently: 1. AC plug-in 2. Power button press 3. reboot EC command 4. servo reset button 5. Recovery mode Change-Id: I728c99c342fb888600599acbe25f72a478ccf948 Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1020583
-rw-r--r--board/chell/board.h3
-rw-r--r--board/fizz/board.c8
-rw-r--r--board/fizz/board.h1
-rw-r--r--power/intel_x86.h5
4 files changed, 14 insertions, 3 deletions
diff --git a/board/chell/board.h b/board/chell/board.h
index b2eb1271f2..122637f6c0 100644
--- a/board/chell/board.h
+++ b/board/chell/board.h
@@ -224,9 +224,6 @@ extern const int keyboard_factory_scan_pins_used;
/* Reset PD MCU */
void board_reset_pd_mcu(void);
-/* Reset RTC */
-void board_rtc_reset(void);
-
#endif /* !__ASSEMBLER__ */
#endif /* __CROS_EC_BOARD_H */
diff --git a/board/fizz/board.c b/board/fizz/board.c
index 212d609f81..f28e8070ab 100644
--- a/board/fizz/board.c
+++ b/board/fizz/board.c
@@ -676,3 +676,11 @@ int fan_percent_to_rpm(int fan, int pct)
}
return get_custom_rpm(fan, pct, oem_id);
}
+
+void board_rtc_reset(void)
+{
+ CPRINTS("Asserting RTCRST# to PCH");
+ gpio_set_level(GPIO_PCH_RTCRST, 1);
+ udelay(100);
+ gpio_set_level(GPIO_PCH_RTCRST, 0);
+}
diff --git a/board/fizz/board.h b/board/fizz/board.h
index 3ee3e86dd1..3b5f639f68 100644
--- a/board/fizz/board.h
+++ b/board/fizz/board.h
@@ -17,6 +17,7 @@
/* EC */
#define CONFIG_ADC
+#define CONFIG_BOARD_HAS_RTC_RESET
#define CONFIG_BOARD_VERSION
#define CONFIG_BOARD_SPECIFIC_VERSION
#define CONFIG_CRC8
diff --git a/power/intel_x86.h b/power/intel_x86.h
index 70a1a66e65..bfbf89538c 100644
--- a/power/intel_x86.h
+++ b/power/intel_x86.h
@@ -33,4 +33,9 @@ enum power_state chipset_force_g3(void);
*/
enum power_state common_intel_x86_power_handle_state(enum power_state state);
+/**
+ * Reset RTC
+ */
+void board_rtc_reset(void);
+
#endif /* __CROS_EC_INTEL_X86_H */