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 <pgeorgi@chromium.org>
Original-Commit-Id: 6788962172c6e29e193fa3e85ca79cb83a96e154
Original-Change-Id: I81b3dccb1d1d43c5c1e6dcb5400af8eed6dee870
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/217087
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/9120
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Vadim Bendebury 2014-09-08 14:34:09 -07:00 committed by Patrick Georgi
parent 2786ce0b48
commit c7bbc04544
1 changed files with 14 additions and 0 deletions

View File

@ -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();
}