From 0e890a2787bf034d3358a33fc88c2dd8078593ab Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Wed, 21 Sep 2016 18:16:54 -0700 Subject: [PATCH] google/gru: drive WLAN_MODULE_RST# low as early as possible GPIO1_B3 (WLAN_MODULE_RST#) defaults as a pull-up input, but it is also "pulled up" by 1.8V_WLAN. However, 1.8V_WLAN remains low for some time during early boot. This leaves the signal floating somewhere in the middle. This has two potential issues: (1) we're leaking some power for some (hopefully) short period of time (2) we are possibly screwing with the Wifi power sequence; we aren't supposed to deassert PDn (i.e., MODULE_RST#) until all the rails have fully ramped for some period of time Neither of the above issues are likely to be significant, but it is nice to fix, I expect. BRANCH=gru BUG=chrome-os-partner:54026 TEST=measure WLAN_MODULE_RST# on scope at boot time Change-Id: I120e26ad0ca486a326874986e142dcaee965b62d Signed-off-by: Brian Norris Reviewed-on: https://chromium-review.googlesource.com/388009 Reviewed-by: Douglas Anderson Reviewed-by: Julius Werner --- src/mainboard/google/gru/mainboard.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c index 835a90c264..c8f6477268 100644 --- a/src/mainboard/google/gru/mainboard.c +++ b/src/mainboard/google/gru/mainboard.c @@ -29,6 +29,16 @@ #include "board.h" +/* + * Wifi's PDN/RST line is pulled down by its (unpowered) voltage rails, but + * this reset pin is pulled up by default. Let's drive it low as early as we + * can. + */ +static void deassert_wifi_power(void) +{ + gpio_output(GPIO(1, B, 3), 0); /* Assert WLAN_MODULE_RST# */ +} + static void configure_emmc(void) { /* Host controller does not support programmable clock generator. @@ -236,6 +246,7 @@ static void setup_usb(void) static void mainboard_init(device_t dev) { + deassert_wifi_power(); configure_sdmmc(); configure_emmc(); configure_codec();