nyan: Switch USB VBUS GPIOs from outputs to pulled-up inputs
The USB VBUS GPIOs on Nyan boards are two-directional: usually the SoC sets them high or low to enable USB power, but on overcurrent conditions they get forcefully driven low by the voltage source. To avoid driving it from two sides, we configure them on the SoC side as tristated input pins with a pull-up instead. BUG=None TEST=Made sure USB devices still get detected. Change-Id: I423cb312805cbacb651a569ddc1530813b148576 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/178914 Reviewed-by: David Hendricks <dhendrix@chromium.org> Reviewed-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
parent
2c96d6bcf1
commit
e47b6a609b
1 changed files with 4 additions and 4 deletions
|
|
@ -180,10 +180,10 @@ static void setup_pinmux(void)
|
|||
pinmux_set_config(PINMUX_SDMMC4_DAT7_INDEX,
|
||||
PINMUX_SDMMC4_DAT7_FUNC_SDMMC4 | pin_up);
|
||||
|
||||
/* TODO: This is supposed to work with the USB special function pinmux,
|
||||
* but it doesn't. Go with GPIOs for now and solve the problem later. */
|
||||
gpio_output_open_drain(GPIO(N4), 1); /* USB VBUS EN0 */
|
||||
gpio_output_open_drain(GPIO(N5), 1); /* USB VBUS EN1 */
|
||||
/* We pull the USB VBUS signals up but keep them as inputs since the
|
||||
* voltage source likes to drive them low on overcurrent conditions */
|
||||
gpio_input_pullup(GPIO(N4)); /* USB VBUS EN0 */
|
||||
gpio_input_pullup(GPIO(N5)); /* USB VBUS EN1 */
|
||||
|
||||
/* Clock output 1 (for external peripheral) */
|
||||
pinmux_set_config(PINMUX_DAP_MCLK1_INDEX,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue