From c7bbc04544f60d5be44ea4c61899169406066a33 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 8 Sep 2014 14:34:09 -0700 Subject: storm: deassert SW_RESET signal at startup The proto0.2 hardware connects gpio26 (sw reset) to the ethernet switch reset pit. The output stays low (or high-z) after power up, which holds the switch in reset. Deassert the signal at startup on hardware rev 1 and later. BUG=chrome-os-partner:31780 TEST=with this patch applied, when proto0.2 boots, the ethernet switch's LED blink once, as was the case with proto0. Change-Id: I4c5a0cc499563a33aa7d29be7767d0ec5d93c20f Signed-off-by: Patrick Georgi Original-Commit-Id: 6788962172c6e29e193fa3e85ca79cb83a96e154 Original-Change-Id: I81b3dccb1d1d43c5c1e6dcb5400af8eed6dee870 Original-Signed-off-by: Vadim Bendebury Original-Reviewed-on: https://chromium-review.googlesource.com/217087 Original-Reviewed-by: David Hendricks Reviewed-on: http://review.coreboot.org/9120 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/storm/mainboard.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/mainboard/google/storm/mainboard.c b/src/mainboard/google/storm/mainboard.c index ded423aa9f..ebe284911d 100644 --- a/src/mainboard/google/storm/mainboard.c +++ b/src/mainboard/google/storm/mainboard.c @@ -91,10 +91,24 @@ static void setup_tpm(void) gpio_set_out_value(TPM_RESET_GPIO, 1); } +#define SW_RESET_GPIO 26 +static void deassert_sw_reset(void) +{ + if (board_id() == 0) + return; + + /* only proto0.2 and later care about this. */ + gpio_tlmm_config_set(SW_RESET_GPIO, FUNC_SEL_GPIO, + GPIO_PULL_UP, GPIO_4MA, GPIO_ENABLE); + + gpio_set_out_value(SW_RESET_GPIO, 1); +} + static void mainboard_init(device_t dev) { setup_mmu(); setup_usb(); + deassert_sw_reset(); setup_tpm(); } -- cgit v1.2.3