summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgc <chao.ge@bitland.com.cn>2018-01-18 19:33:41 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-01-23 01:50:42 +0000
commitf125a9c6f1ef0a027a819a3bb313659e7ecddebf (patch)
tree591f4528886ee425d8fe5acc640224928f633778
parent7e20e49df8f3fc73bd3a7c41625ee8f6a338dc1b (diff)
downloadchrome-ec-f125a9c6f1ef0a027a819a3bb313659e7ecddebf.tar.gz
hana/birch: Against the DUT can't probe G-Sensor stably
and hard reset for G-sensor to ensure it work normally. Making EC hard reset on G-sensor againest hana-300e can not probe G-sensor.Adding board_reset_sensors() calls to board_init() in RW,and there is no leakage from EC to G-sensor through SPI_pins during hard reset.During hard reset, falling time of VDD is about 13ms by catching signal,it is better to keep 'VDD off time' more than 10ms base on G-sensor's SPEC. BRANCH=oak BUG=b:69346100 TEST=1. measured G-sensor power up, and got the rise up time 2. press power button 10 second to power off. 3. power on the DUT 4. refresh + power button to cold reboot the DUT 5. Check the g-sensor by 'ectool motionsense' Change-Id: I470ce7386b171f9b3b1758013016210f2701124b Reviewed-on: https://chromium-review.googlesource.com/873590 Reviewed-by: Rong Chang <rongchang@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Tested-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com> Commit-Queue: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
-rw-r--r--board/elm/board.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/board/elm/board.c b/board/elm/board.c
index d1c8f03d88..d4dd9545f0 100644
--- a/board/elm/board.c
+++ b/board/elm/board.c
@@ -286,6 +286,8 @@ static void board_init(void)
/* Remap SPI2 to DMA channels 6 and 7 */
REG32(STM32_DMA1_BASE + 0xa8) |= (1 << 20) | (1 << 21) |
(1 << 24) | (1 << 25);
+
+ board_reset_sensors();
}
DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
@@ -518,7 +520,7 @@ void board_reset_sensors(void)
gpio_set_level(GPIO_SENSOR_PWR_EN_L, 1);
/* Min VDD off time is 10 ms, make it longer */
- msleep(20);
+ msleep(25);
/* Power on sensors */
gpio_set_level(GPIO_SENSOR_PWR_EN_L, 0);