diff options
author | zhxihu <zhxihu@marvell.com> | 2015-11-13 09:29:12 -0800 |
---|---|---|
committer | Mohammed Habibulla <moch@google.com> | 2015-11-25 08:04:16 -0800 |
commit | 6159f889d10d5c408ad67b44424034ecf9b84ba1 (patch) | |
tree | d865b0a7ec492570bbdb2044388ccad59ae165fa | |
parent | 83cbf715e026701946eecb558f0906457487a8d5 (diff) | |
download | pxa-v3.14-6159f889d10d5c408ad67b44424034ecf9b84ba1.tar.gz |
usb: Fix the issue of USB keyboard recognition.
The USB type A's vbus doesn't connect to otgsc, so there is no need to
check its status.
BUG=25653524
Change-Id: Ide3fef19c1820c9ff363c647005eab7a003a398f
-rw-r--r-- | arch/arm64/boot/dts/pxa1908.dtsi | 1 | ||||
-rw-r--r-- | drivers/usb/phy/phy-mv-usb.c | 7 | ||||
-rw-r--r-- | include/linux/platform_data/mv_usb.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm64/boot/dts/pxa1908.dtsi b/arch/arm64/boot/dts/pxa1908.dtsi index 6ab84b7746a..dd9a824f6f8 100644 --- a/arch/arm64/boot/dts/pxa1908.dtsi +++ b/arch/arm64/boot/dts/pxa1908.dtsi @@ -189,6 +189,7 @@ marvell,udc-mode = <MV_USB_MODE_OTG>; marvell,extern-attr = <0>; marvell,otg-force-a-bus-req; + marvell,otg-force-a-vbus-vld; lpm-qos = <PM_QOS_CPUIDLE_BLOCK_AXI>; clocks = <&soc_clocks PXA1U88_CLK_USB>; status = "disabled"; diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c index c329936f9ca..a74d7c7de61 100644 --- a/drivers/usb/phy/phy-mv-usb.c +++ b/drivers/usb/phy/phy-mv-usb.c @@ -417,7 +417,10 @@ static void mv_otg_update_inputs(struct mv_otg *mvotg) } otg_ctrl->a_sess_vld = !!(otgsc & OTGSC_STS_A_SESSION_VALID); - otg_ctrl->a_vbus_vld = !!(otgsc & OTGSC_STS_A_VBUS_VALID); + if (mvotg->pdata->otg_force_a_vbus_vld) + otg_ctrl->a_vbus_vld = 1; + else + otg_ctrl->a_vbus_vld = !!(otgsc & OTGSC_STS_A_VBUS_VALID); dev_dbg(&mvotg->pdev->dev, "%s: ", __func__); dev_dbg(&mvotg->pdev->dev, "id %d\n", otg_ctrl->id); @@ -889,6 +892,8 @@ static int mv_otg_dt_parse(struct platform_device *pdev, of_property_read_u32(np, "marvell,extern-attr", &(pdata->extern_attr)); pdata->otg_force_a_bus_req = of_property_read_bool(np, "marvell,otg-force-a-bus-req"); + pdata->otg_force_a_vbus_vld = of_property_read_bool(np, + "marvell,otg-force-a-vbus-vld"); pdata->disable_otg_clock_gating = of_property_read_bool(np, "marvell,disable-otg-clock-gating"); diff --git a/include/linux/platform_data/mv_usb.h b/include/linux/platform_data/mv_usb.h index a1f158b8137..42d28e3824f 100644 --- a/include/linux/platform_data/mv_usb.h +++ b/include/linux/platform_data/mv_usb.h @@ -124,6 +124,7 @@ struct mv_usb_platform_data { unsigned int disable_otg_clock_gating:1; /* Force a_bus_req to be asserted */ unsigned int otg_force_a_bus_req:1; + unsigned int otg_force_a_vbus_vld:1; }; enum charger_type { |