Commit 1ca8fe38 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Paul Mundt

sh: ecovec: care CN5 VBUS if USB host mode

renesas_usbhs driver can control both USB Host/Gadget,
but it needs VBUS output if Host mode.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 8a87776d
...@@ -244,9 +244,17 @@ static int usbhs_get_id(struct platform_device *pdev) ...@@ -244,9 +244,17 @@ static int usbhs_get_id(struct platform_device *pdev)
return gpio_get_value(GPIO_PTB3); return gpio_get_value(GPIO_PTB3);
} }
static void usbhs_phy_reset(struct platform_device *pdev)
{
/* enable vbus if HOST */
if (!gpio_get_value(GPIO_PTB3))
gpio_set_value(GPIO_PTB5, 1);
}
static struct renesas_usbhs_platform_info usbhs_info = { static struct renesas_usbhs_platform_info usbhs_info = {
.platform_callback = { .platform_callback = {
.get_id = usbhs_get_id, .get_id = usbhs_get_id,
.phy_reset = usbhs_phy_reset,
}, },
.driver_param = { .driver_param = {
.buswait_bwait = 4, .buswait_bwait = 4,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment