]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/intel/minnowmax/minnowmax.c
2 * Copyright (C) 2015, Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
10 #include <dm/device-internal.h>
11 #include <dm/uclass-internal.h>
13 #define GPIO_BANKE_NAME "gpioe"
18 struct gpio_desc desc
;
22 * Turn on USB VBUS for the two USB ports on the board.
23 * Each port's VBUS is controlled by a GPIO pin.
26 ret
= uclass_find_device_by_name(UCLASS_GPIO
, GPIO_BANKE_NAME
, &dev
);
28 debug("%s: GPIO %s device cannot be not found (ret=%d)\n",
29 __func__
, GPIO_BANKE_NAME
, ret
);
33 ret
= device_probe(dev
);
35 debug("%s: GPIO %s device probe failed (ret=%d)\n",
36 __func__
, GPIO_BANKE_NAME
, ret
);
41 desc
.flags
= GPIOD_IS_OUT
;
43 /* GPIO E8 controls the bottom port */
46 ret
= dm_gpio_request(&desc
, "usb_host_en0");
49 dm_gpio_set_value(&desc
, 1);
51 /* GPIO E9 controls the upper port */
54 ret
= dm_gpio_request(&desc
, "usb_host_en1");
58 dm_gpio_set_value(&desc
, 1);