[PATCH v1 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-09-16 Thread Manu Gautam
Allow userspace to pass SuperSpeed descriptors and handle them in the driver accordingly. This also requires changing usb_functionfs_descs_head to accommodate ss_count i.e. SuperSpeed Descriptors count. Signed-off-by: Manu Gautam mgau...@codeaurora.org --- drivers/usb/gadget/f_fs.c

Re: [PATCH v1 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-09-17 Thread Manu Gautam
On 9/17/2013 6:15 AM, Jack Pham wrote: Hi Manu, An intern working with us here (thanks Peter!) found a bug. On Mon, Sep 16, 2013 at 03:10:14PM +0530, Manu Gautam wrote: @@ -1569,7 +1573,20 @@ static int ffs_func_eps_enable(struct ffs_function *func) spin_lock_irqsave(func-ffs-eps_lock

[PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-09-20 Thread Manu Gautam
Allow userspace to pass SuperSpeed descriptors and handle them in the driver accordingly. This also requires changing usb_functionfs_descs_head to accommodate ss_count i.e. SuperSpeed Descriptors count. Signed-off-by: Manu Gautam mgau...@codeaurora.org --- drivers/usb/gadget/f_fs.c

Re: [PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-09-24 Thread Manu Gautam
:25 PM, Manu Gautam wrote: diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h index d6b0128..d6940d7 100644 --- a/include/uapi/linux/usb/functionfs.h +++ b/include/uapi/linux/usb/functionfs.h @@ -37,6 +37,7 @@ struct usb_functionfs_descs_head { __le32

Re: [PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-09-26 Thread Manu Gautam
On 9/26/2013 2:10 AM, Felipe Balbi wrote: Hi, (please avoid top-posting) On Tue, Sep 24, 2013 at 03:00:20PM +0530, Manu Gautam wrote: Hi Felipe, I wanted to mention one point with respect to this patch: Below changes in the functionfs.h to add ss_count (super speed descriptors count

Re: [PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-09-30 Thread Manu Gautam
On 9/28/2013 1:52 AM, Paul Zimmerman wrote: From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Manu Gautam Sent: Thursday, September 26, 2013 12:08 AM On 9/26/2013 2:10 AM, Felipe Balbi wrote: On Tue, Sep 24, 2013 at 03:00:20PM +0530, Manu Gautam

Re: [PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-10-01 Thread Manu Gautam
On 10/1/2013 8:07 PM, Felipe Balbi wrote: Hi, On Mon, Sep 30, 2013 at 02:31:50PM +0530, Manu Gautam wrote: On 9/28/2013 1:52 AM, Paul Zimmerman wrote: From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Manu Gautam Sent: Thursday, September 26, 2013

Re: [PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-10-07 Thread Manu Gautam
On 10/2/2013 10:06 AM, Manu Gautam wrote: On 10/1/2013 8:07 PM, Felipe Balbi wrote: Hi, On Mon, Sep 30, 2013 at 02:31:50PM +0530, Manu Gautam wrote: On 9/28/2013 1:52 AM, Paul Zimmerman wrote: From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Manu

Re: [PATCH v2] u_ether: move hardware transmit to RX workqueue

2014-02-24 Thread Manu Gautam
On 2/22/2014 11:11 AM, Clanlab (Taiwan) Linux Project wrote: In order to reduce the interrupt times in the embedded system, a receiving workqueue is introduced. This modification also enhanced the overall throughput as the benefits of reducing interrupt occurrence. This patch looks to be

Re: [PATCH v5 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2014-02-24 Thread Manu Gautam
On 12/24/2013 3:00 PM, Manu Gautam wrote: Allow userspace to pass SuperSpeed descriptors and handle them in the driver accordingly. This change doesn't modify existing desc_header and thereby keeps the ABI changes backward compatible i.e. existing userspace drivers compiled with old header

Re: [PATCHv2] usb: gadget: f_fs: Add flags to descriptors block

2014-02-28 Thread Manu Gautam
On 2/25/2014 10:32 PM, Michal Nazarewicz wrote: This reworks the way SuperSpeed descriptors are added and instead of having a magick after full and high speed descriptors, it reworks the whole descriptors block to include a flags field which lists which descriptors are present and makes future

[PATCH v6 1/2] usb: gadget: f_fs: Add support for SuperSpeed Mode

2014-02-28 Thread Manu Gautam
with the updated kernel. Signed-off-by: Manu Gautam mgau...@codeaurora.org Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c | 182 +++- drivers/usb/gadget/u_fs.h | 10 +- include/uapi/linux/usb/functionfs.h | 5 + 3 files

[PATCH v6 2/2] usb: gadget: f_fs: Add flags to descriptors block

2014-02-28 Thread Manu Gautam
From: Michal Nazarewicz min...@mina86.com This reworks the way SuperSpeed descriptors are added and instead of having a magic after full and high speed descriptors, it reworks the whole descriptors block to include a flags field which lists which descriptors are present and makes future

[PATCH v6 0/2] usb: gadget: f_fs: Add support for SuperSpeed Mode

2014-02-28 Thread Manu Gautam
is removed and clients can selectively pass descriptors and their count based on the 'flags' field. Manu Gautam (1): usb: gadget: f_fs: Add support for SuperSpeed Mode Michal Nazarewicz (1): usb: gadget: f_fs: Add flags to descriptors block drivers/usb/gadget/f_fs.c | 214

[PATCH v3 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-12-20 Thread Manu Gautam
with the updated kernel. Signed-off-by: Manu Gautam mgau...@codeaurora.org --- drivers/usb/gadget/f_fs.c | 165 drivers/usb/gadget/u_fs.h | 8 +- include/uapi/linux/usb/functionfs.h | 5 ++ 3 files changed, 140 insertions(+), 38 deletions(-) diff

Re: [PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-12-20 Thread Manu Gautam
On 11/26/2013 11:11 PM, Felipe Balbi wrote: any comments here ? nobody ? Manu, if nobody complains in another week, please send this hunk as a formal patch. I have just sent a Patch (v3). Thanks, Manu -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by

Re: [PATCH v3 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-12-23 Thread Manu Gautam
On 12/20/2013 8:47 PM, Michal Nazarewicz wrote: On Fri, Dec 20 2013, Manu Gautam wrote: I don't like this. Why are we failing if descriptors for given speed are missing? If they are, we should fall back to lower speed. do { ds = ep-descs[desc_idx]; } while

[PATCH v4 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-12-23 Thread Manu Gautam
with the updated kernel. Change-Id: Ic27035fdef2a83828024348d75be1518e9f8c5c6 Signed-off-by: Manu Gautam mgau...@codeaurora.org --- drivers/usb/gadget/f_fs.c | 176 +++--- drivers/usb/gadget/u_fs.h | 8 ++- 2 files changed, 142 insertions(+), 42 deletions(-) diff

[PATCH v5 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-12-24 Thread Manu Gautam
with the updated kernel. Signed-off-by: Manu Gautam mgau...@codeaurora.org Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c | 182 +++- drivers/usb/gadget/u_fs.h | 10 +- include/uapi/linux/usb/functionfs.h | 5 + 3 files

Re: [PATCH v4 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode

2013-12-24 Thread Manu Gautam
On 12/24/2013 8:20 AM, Michal Nazarewicz wrote: On Mon, Dec 23 2013, Manu Gautam mgau...@codeaurora.org wrote: Allow userspace to pass SuperSpeed descriptors and handle them in the driver accordingly. This change doesn't modify existing desc_header and thereby keeps the ABI changes backward

Re: [PATCH 1/2] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2017-07-12 Thread Manu Gautam
On 7/12/2017 12:19 PM, Baolin Wang wrote: Hi, On 3 July 2017 at 19:25, Manu Gautam <mgau...@codeaurora.org> wrote: Driver powers-off PHYs and reinitializes DWC3 core and gadget on resume. While this works fine for gadget mode but in host mode there is not re-initialization of host

Re: [PATCH 1/2] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2017-07-12 Thread Manu Gautam
On 7/12/2017 2:06 PM, Baolin Wang wrote: Hi, On 12 July 2017 at 15:25, Manu Gautam <mgau...@codeaurora.org> wrote: On 7/12/2017 12:19 PM, Baolin Wang wrote: Hi, On 3 July 2017 at 19:25, Manu Gautam <mgau...@codeaurora.org> wrote: Driver powers-off PHYs and reinitializ

Re: [PATCH 1/2] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2017-07-13 Thread Manu Gautam
On 7/13/2017 11:33 AM, Baolin Wang wrote: > On 12 July 2017 at 16:58, Manu Gautam <mgau...@codeaurora.org> wrote: >> >> On 7/12/2017 2:06 PM, Baolin Wang wrote: >>> Hi, >>> >>> On 12 July 2017 at 15:25, Manu Gautam <mgau...@codeaurora.org&g

Re: [PATCH] usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets

2017-07-18 Thread Manu Gautam
On 7/18/2017 11:53 AM, Felipe Balbi wrote: > Hi, > > Manu Gautam <mgau...@codeaurora.org> writes: >> The PIDs for Isochronous data transfers are incorrect >> for high bandwidth IN endpoints when the request length >> is less than EP wMaxPacketSize. >>

Re: [PATCH] usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets

2017-07-19 Thread Manu Gautam
Hi, On 7/18/2017 4:27 PM, Felipe Balbi wrote: > Hi, > > Manu Gautam <mgau...@codeaurora.org> writes: >>> Manu Gautam <mgau...@codeaurora.org> writes: >>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >>>> index aea9a5b..

Re: [PATCH 1/2] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2017-07-20 Thread Manu Gautam
Hi, On 7/13/2017 1:13 PM, Baolin Wang wrote: > Hi, > > On 13 July 2017 at 15:26, Manu Gautam <mgau...@codeaurora.org> wrote: >> >> On 7/13/2017 11:33 AM, Baolin Wang wrote: >>> On 12 July 2017 at 16:58, Manu Gautam <mgau...@codeaurora.org> wrote: &g

Re: [PATCH 2/2] usb: dwc3: pci: Runtime resume child device from wq

2017-07-20 Thread Manu Gautam
Hi, On 7/3/2017 4:55 PM, Manu Gautam wrote: > Driver currently resumes and increments pm usage_count > of its child device (dwc3 main) from its runtime_resume > handler. This requires dwc3 runtime_resume to perform > pm_runtime_put to decrement the pm usage_count. However > runtim

Re: [PATCH] usb: dwc3: Support the dwc3 host suspend/resume

2017-07-21 Thread Manu Gautam
Hi, On 7/21/2017 2:31 PM, Baolin Wang wrote: > On 21 July 2017 at 16:45, Manu Gautam <mgau...@codeaurora.org> wrote: >> Hi, >> >> >> On 7/21/2017 12:28 PM, Baolin Wang wrote: >>> For some mobile devices with strict power management, we also want to >&g

Re: [PATCH] usb: dwc3: Support the dwc3 host suspend/resume

2017-07-21 Thread Manu Gautam
Hi, On 7/21/2017 12:28 PM, Baolin Wang wrote: > For some mobile devices with strict power management, we also want to > suspend the host when the slave was detached for power saving. Thus > adding the host suspend/resume functions to support this requirement. USB/PM core already takes care of

[PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes

2017-07-21 Thread Manu Gautam
Driver currently notifies only USB3 PHY for mode change. Extend this to USB3 PHY so that driver based on the mode can release system resources - clocks, regulators etc. and can even turn off PHY during runtime suspend. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> diff --git a/drive

Re: [PATCH v3 2/3] usb: phy: Add USB charger support

2017-07-25 Thread Manu Gautam
Hi, On 7/25/2017 1:30 PM, Baolin Wang wrote: > This patch introduces the usb charger support based on usb phy that > makes an enhancement to a power driver. The basic conception of the > usb charger is that, when one usb charger is added or removed by > reporting from the extcon device state

[PATCH v2 1/1] usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets

2017-07-19 Thread Manu Gautam
s observed when using f_uvc. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- Changes for v2: - Simplify and add comment as per Felipe's suggestion diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 9e41605a..c0d6c54 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/dr

Re: [PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes

2017-07-24 Thread Manu Gautam
On 7/21/2017 10:39 PM, Stephen Boyd wrote: > On 07/21/2017 04:02 AM, Manu Gautam wrote: >> Driver currently notifies only USB3 PHY for mode change. >> Extend this to USB3 PHY so that driver based on the mode >> can release system resources - clocks, regulators etc. >>

Re: [PATCH] usb: dwc3: Support the dwc3 host suspend/resume

2017-07-24 Thread Manu Gautam
Hi Baolin, On 7/24/2017 11:26 AM, Baolin Wang wrote: Other than what I pushed in my patch - ("usb: dwc3: Don't reinitialize core during host bus-suspend/resume") Just performing pm_request_resume or handling same in dwc3 glue driver should be sufficient. >>> Yes. >>>

Re: [PATCH] usb: dwc3: Support the dwc3 host suspend/resume

2017-07-24 Thread Manu Gautam
Hi, On 7/24/2017 2:45 PM, Baolin Wang wrote: > Hi Manu, > > On 24 July 2017 at 16:42, Manu Gautam <mgau...@codeaurora.org> wrote: >> Hi Baolin, >> >> >> On 7/24/2017 11:26 AM, Baolin Wang wrote: >> >>>>>> Other than what I pushed i

[PATCH 1/2] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2017-07-03 Thread Manu Gautam
this by not reinitializing core on suspend/resume in host mode for HOST only and OTG/drd configurations. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index c22c37d..fc556a4 100644 --- a/drivers/usb/dwc3/core.c +++ b/drive

[PATCH 2/2] usb: dwc3: pci: Runtime resume child device from wq

2017-07-03 Thread Manu Gautam
) as well which results in dwc3 pm usage_count becoming negative after couple of runtime suspend resume iterations. Fix this by performing runtime_get/put from dwc3-pci driver only using workqueue. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> diff --git a/drivers/usb/dwc3/core.c b/drive

[PATCH] usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets

2017-07-05 Thread Manu Gautam
n't give any issues as dwc3 will send 0-length packet for next IN token if host sends even after receiving a short packet. Windows seems to ignore this but with MacOS frame loss observed when using f_uvc. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> diff --git a/drivers/usb/dwc3/gadget.c

Re: [PATCH] usb: gadget: f_midi: Use snd_card_free_when_closed with refcount

2017-08-18 Thread Manu Gautam
Hi, On 8/15/2017 2:44 AM, Jerry Zhang wrote: > Currenly, f_midi_free uses snd_card_free, which will wait > until the user has released the sound card before > returning. However, if the user doesn't release the sound > card, then f_midi_free can block for an arbitrary amount > of time, which

Re: [PATCH v2 13/17] phy: qcom-qmp: Add support for QMP V3 USB3 PHY

2017-10-05 Thread Manu Gautam
On 9/27/2017 11:29 PM, Jack Pham wrote: > On Wed, Sep 27, 2017 at 02:29:09PM +0530, Manu Gautam wrote: >> QMP V3 USB3 PHY is a DP USB combo PHY with >> dual RX/TX lanes to support type-c. There is a >> separate block DP_COM for configuration related >> to type-c or

Re: [PATCH v2 14/17] phy: qcom-qusb2: Set vbus sw-override signal in device mode

2017-10-05 Thread Manu Gautam
Hi Jack, On 9/28/2017 10:23 PM, Jack Pham wrote: > Hi Manu, > > On Thu, Sep 28, 2017 at 09:30:38AM +0530, Manu Gautam wrote: >> On 9/28/2017 12:46 AM, Jack Pham wrote: >>> On Wed, Sep 27, 2017 at 10:57:41AM -0700, Jack Pham wrote: >>>> On Wed, Sep 27, 2017 at

Re: Random xHCI HC died on device disconnect

2017-10-05 Thread Manu Gautam
Hi Mathias, On 10/4/2017 3:46 PM, Mathias Nyman wrote: > On 03.10.2017 18:27, Kristian Evensen wrote: >> On Tue, Oct 3, 2017 at 4:51 PM, Kristian Evensen >> wrote: > This is the xhci->cmd_timer (delayed work) that has a five second timeout > for the currently

Re: [PATCH v2 14/17] phy: qcom-qusb2: Set vbus sw-override signal in device mode

2017-09-27 Thread Manu Gautam
Hi Jack, On 9/28/2017 12:46 AM, Jack Pham wrote: > On Wed, Sep 27, 2017 at 10:57:41AM -0700, Jack Pham wrote: >> Hi Manu, >> >> On Wed, Sep 27, 2017 at 02:29:10PM +0530, Manu Gautam wrote: >>> VBUS signal coming from PHY must be asserted in device for >>>

Re: [PATCH] usb: gadget: f_midi: Use snd_card_free_when_closed with refcount

2017-08-22 Thread Manu Gautam
Hi, On 8/18/2017 11:30 AM, Manu Gautam wrote: > Hi, > > > On 8/15/2017 2:44 AM, Jerry Zhang wrote: >> @@ -1197,14 +1200,21 @@ static void f_midi_free(struct usb_function *f) >> >> midi = func_to_midi(f); >> opts = container_of(f->fi, struc

[PATCH v2 00/17] Support for Qualcomm QUSBv2 and QMPv3 USB PHYs

2017-09-27 Thread Manu Gautam
overide in PHY wrapper for device mode. - Dropped one dwc3 patch from this series which I will submit with other dwc3 patches. ("usb: dwc3: core: Notify USB3 PHY as well for DRD modes") Manu Gautam (15): phy: qcom-qmp: Power-on PHY before initialization phy: qcom-qusb2: Power-on

[PATCH v2 16/17] phy: qcom-qmp: Override lane0_power_present signal in device mode

2017-09-27 Thread Manu Gautam
lane0_power_present signal must be asserted of hardware to operate properly in SS device mode. On some platforms where VBUS line is not connected to SS QMP PHY there is SS_PHY_CTRL register in QSCRATCH wrapper that can be used by software to override VBUS. Signed-off-by: Manu Gautam <m

[PATCH v2 17/17] phy: qcom-qmp: Add support for runtime PM

2017-09-27 Thread Manu Gautam
Disable clocks as part of PHY suspend. This also requires enabling PHY autonomous mode to detect lfps/rx_det in suspend state. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c | 182 +++- drivers/phy/qualcomm/ph

[PATCH v2 15/17] phy: qcom-qusb2: Add support for runtime PM

2017-09-27 Thread Manu Gautam
Disable clocks and dp/dm asynchronous interrupts from PHY as part of runtime suspend. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 159 ++ 1 file changed, 159 insertions(+) diff --git a/drivers/phy/qualco

[PATCH v2 13/17] phy: qcom-qmp: Add support for QMP V3 USB3 PHY

2017-09-27 Thread Manu Gautam
QMP V3 USB3 PHY is a DP USB combo PHY with dual RX/TX lanes to support type-c. There is a separate block DP_COM for configuration related to type-c or DP. Add support for dp_com region and secondary rx/tx lanes initialization. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drive

[PATCH v2 14/17] phy: qcom-qusb2: Set vbus sw-override signal in device mode

2017-09-27 Thread Manu Gautam
-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c index bda1f4c..0e9d88b 100644 --- a/d

[PATCH v2 12/17] dt-bindings: phy-qcom-qmp: Update bindings for QMP V3 USB PHY

2017-09-27 Thread Manu Gautam
Update compatible string and clock names for QMP version V3 USB PHY. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/ph

[PATCH v2 10/17] phy: qcom-qmp: Move register offsets to header file

2017-09-27 Thread Manu Gautam
New revision (v3) of QMP PHY uses different offsets for almost all of the registers. Hence, move these definitions to header file so that updated offsets can be added for QMP v3. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c

[PATCH v2 11/17] phy: qcom-qmp: Add register offsets for QMP V3 PHY

2017-09-27 Thread Manu Gautam
Registers offsets for QMP V3 PHY are changed from previous versions (1/2), update same in header file. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.h | 149 1 file changed, 149 insertions(+) diff --git a/d

[PATCH v2 07/17] phy: qcom-qusb2: Add support for different register layouts

2017-09-27 Thread Manu Gautam
New version of QUSB2 PHY has some registers offset changed. Add support to have register layout for a target and update the same in phy_configuration. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 131 --

[PATCH v2 09/17] phy: qcom-qusb2: Add support for QUSB2 V2 version

2017-09-27 Thread Manu Gautam
Use register layout to add additional registers present on QUSB2 PHY V2 version for PHY initialization. Other than new registers on V2, following two register's offset and bit definitions are different: POWERDOWN control and PLL_STATUS. Signed-off-by: Manu Gautam <mgau...@codeaurora.

[PATCH v2 05/17] phy: qcom-qmp: Fix PHY block reset sequence

2017-09-27 Thread Manu Gautam
that as well. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 2

[PATCH v2 06/17] phy: qcom-qmp: Move SERDES/PCS START after PHY reset

2017-09-27 Thread Manu Gautam
Driver is currently performing PHY reset after starting SERDES/PCS. As per hardware datasheet reset must be done before starting PHY. Hence, update the sequence. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++--- 1 file changed, 3 inse

[PATCH v2 08/17] dt-bindings: phy-qcom-qusb2: Update binding for QUSB2 V2 version

2017-09-27 Thread Manu Gautam
Update generic compatible string for QUSB2 V2 PHY. This will allow all targets using QUSB2 V2 use same string. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- Documentation/devicetree/bindings/phy/qcom-qusb2-phy.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v2 04/17] phy: qcom-qusb2: Power-on PHY before initialization

2017-09-27 Thread Manu Gautam
poweron callback from phy_ops and explicitly perform this from init, similar changes needed for poweroff. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 47 +++ 1 file changed, 15 insertions(+), 32 deletions(-)

[PATCH v2 02/17] phy: qcom-qmp: Adapt to clk_bulk_* APIs

2017-09-27 Thread Manu Gautam
From: Vivek Gautam <vivek.gau...@codeaurora.org> Move from using array of clocks to clk_bulk_* APIs that are available now. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/p

[PATCH v2 01/17] phy: qcom-qmp: Fix phy pipe clock gating

2017-09-27 Thread Manu Gautam
/0x12c [ 33.381776] [] ret_from_fork+0x10/0x50 Fix this by enabling pipe clock at the end of phy_init(), and disabling it as the first thing in phy_exit(). Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org&g

[PATCH v2 03/17] phy: qcom-qmp: Power-on PHY before initialization

2017-09-27 Thread Manu Gautam
poweron callback from phy_ops and explicitly perform this from com_init, similar changes needed for poweroff. On similar lines move clk_enable from init to com_init which can be called once for multi lane PHYs. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom

[RESEND PATCH 3/3] usb: dwc3: core: Notify current USB mode to USB3 PHY as well

2017-09-27 Thread Manu Gautam
line is not connected to PHYs. Also, remove NULL checks for PHY when calling phy_set_mode as PHY ops already check this. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/usb/dwc3/core.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drive

[RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2017-09-27 Thread Manu Gautam
this by not reinitializing core on suspend/resume in host mode for HOST only and OTG/drd configurations. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/usb/dwc3/core.c | 43 --- 1 file changed, 20 insertions(+), 23 deletions(-) diff

[RESEND PATCH 2/3] usb: dwc3: pci: Runtime resume child device from wq

2017-09-27 Thread Manu Gautam
) as well which results in dwc3 pm usage_count becoming negative after couple of runtime suspend resume iterations. Fix this by performing runtime_get/put from dwc3-pci driver only using workqueue. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/usb/dwc3/core.c | 1 - drive

Re: [PATCH v2 14/17] phy: qcom-qusb2: Set vbus sw-override signal in device mode

2017-10-09 Thread Manu Gautam
Hi Kishon On 10/5/2017 2:38 PM, Manu Gautam wrote: > Hi Jack, > > On 9/28/2017 10:23 PM, Jack Pham wrote: >> >>>>>> +static int qusb2_phy_set_mode(struct phy *phy, enum phy_mode mode) >>>>>> +{ >>>>>> +struct qusb2_

Re: [PATCH v2 14/17] phy: qcom-qusb2: Set vbus sw-override signal in device mode

2017-10-23 Thread Manu Gautam
Hi Kishon, Please review this so that I can re-submit patch-set based on this approach. On 10/9/2017 1:33 PM, Manu Gautam wrote: > Hi Kishon > > On 10/5/2017 2:38 PM, Manu Gautam wrote: >> Kishon, >> What would you suggest here? >> Should we add new calls e.g. phy

Re: [PATCH v3 10/16] phy: qcom-qmp: Move register offsets to header file

2017-11-22 Thread Manu Gautam
Hi, On 11/22/2017 10:56 PM, Stephen Boyd wrote: > On 11/21/2017 01:23 AM, Manu Gautam wrote: >> New revision (v3) of QMP PHY uses different offsets >> for almost all of the registers. Hence, move these >> definitions to header file so that updated offsets >> can be add

Re: [PATCH v3 03/16] phy: qcom-qmp: Power-on PHY before initialization

2017-11-22 Thread Manu Gautam
Hi, On 11/22/2017 11:33 PM, Stephen Boyd wrote: > On 11/21/2017 01:23 AM, Manu Gautam wrote: >> PHY must be powered on before turning ON clocks and >> attempting to initialize it. Driver is exposing >> separate init and power_on routines for this. >> Apparently USB dwc3

Re: [PATCH v3 14/16] phy: Add notify_speed callback

2017-12-20 Thread Manu Gautam
Hi On 12/20/2017 12:47 PM, Kishon Vijay Abraham I wrote: > Hi, > [snip] >>> Why not use a notification mechanism instead of adding new APIs in phy-core. >>> This will only bloat phy-core with APIs for a particular platform. >> Do you mean notifier_chains ? >> When we have multiple instances of

Re: [PATCH v3 02/16] phy: qcom-qmp: Adapt to clk_bulk_* APIs

2017-12-19 Thread Manu Gautam
On 12/20/2017 8:07 AM, Vivek Gautam wrote: > Hi Manu, > > [snip] > >> @@ -998,29 +992,17 @@ static int qcom_qmp_phy_reset_init(struct device *dev) >> static int qcom_qmp_phy_clk_init(struct device *dev) >> { >> struct qcom_qmp *qmp = dev_get_drvdata(dev); >> - int ret, i; >> +

Re: [PATCH v3 14/16] phy: Add notify_speed callback

2017-12-19 Thread Manu Gautam
Hi, On 12/20/2017 11:19 AM, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 12 December 2017 08:54 PM, Manu Gautam wrote: >> Hi, >> >> >> On 12/12/2017 5:13 PM, Kishon Vijay Abraham I wrote: >>> Hi, >>> >>> On Tuesday 21 Novem

[PATCH v3 15/16] phy: qcom-qusb2: Add support for runtime PM

2017-11-21 Thread Manu Gautam
Disable clocks and enable DP/DM wakeup interrupts when suspending PHY. Core driver should notify speed to PHY driver to enable appropriate DP/DM wakeup interrupts polarity in suspend state. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qusb2.c

[PATCH v3 16/16] phy: qcom-qmp: Add support for runtime PM

2017-11-21 Thread Manu Gautam
Disable clocks and enable PHY autonomous mode to detect wakeup events when PHY is suspended. Core driver should notify speed to PHY driver to enable LFPS and/or RX_DET interrupts. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c

[PATCH v3 09/16] phy: qcom-qusb2: Add support for QUSB2 V2 version

2017-11-21 Thread Manu Gautam
Use register layout to add additional registers present on QUSB2 PHY V2 version for PHY initialization. Other than new registers on V2, following two register's offset and bit definitions are different: POWERDOWN control and PLL_STATUS. Signed-off-by: Manu Gautam <mgau...@codeaurora.

[PATCH v3 13/16] phy: qcom-qmp: Add support for QMP V3 USB3 PHY

2017-11-21 Thread Manu Gautam
QMP V3 USB3 PHY is a DisplayPort (DP) and USB combo PHY with dual RX/TX lanes to support type-c. There is a separate block DP_COM for configuration related to type-c or DP. Add support for dp_com region and secondary rx/tx lanes initialization. Signed-off-by: Manu Gautam <mgau...@codeaurora.

[PATCH v3 11/16] phy: qcom-qmp: Add register offsets for QMP V3 PHY

2017-11-21 Thread Manu Gautam
Registers offsets for QMP V3 PHY are changed from previous versions (1/2), update same in header file. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.h | 149 1 file changed, 149 insertions(+) diff --git a/d

[PATCH v3 12/16] dt-bindings: phy-qcom-qmp: Update bindings for QMP V3 USB PHY

2017-11-21 Thread Manu Gautam
Update compatible string and clock names for QMP version V3 USB PHY. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[PATCH v3 14/16] phy: Add notify_speed callback

2017-11-21 Thread Manu Gautam
. Similarly QMP USB3 PHY in SS mode should monitor RX terminations attach/detach and LFPS events depending on SSPHY is active or not. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/phy-core.c | 30 ++ include/linux/phy/phy.

[PATCH v3 00/16] Support for Qualcomm QUSBv2 and QMPv3 USB PHYs

2017-11-21 Thread Manu Gautam
wrapper for device mode. - Dropped one dwc3 patch from this series which I will submit with other dwc3 patches. ("usb: dwc3: core: Notify USB3 PHY as well for DRD modes") Manu Gautam (14): phy: qcom-qmp: Power-on PHY before initialization phy: qcom-qusb2: Power-on PHY before init

[PATCH v3 10/16] phy: qcom-qmp: Move register offsets to header file

2017-11-21 Thread Manu Gautam
New revision (v3) of QMP PHY uses different offsets for almost all of the registers. Hence, move these definitions to header file so that updated offsets can be added for QMP v3. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c

[PATCH v3 08/16] dt-bindings: phy-qcom-qusb2: Update binding for QUSB2 V2 version

2017-11-21 Thread Manu Gautam
Update generic compatible string for QUSB2 V2 PHY. This will allow all targets using QUSB2 V2 use same string. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- Documentation/devicetree/bindings/phy/qcom-qusb2-phy.txt | 5 - 1 fil

[PATCH v3 06/16] phy: qcom-qmp: Move SERDES/PCS START after PHY reset

2017-11-21 Thread Manu Gautam
Driver is currently performing PHY reset after starting SERDES/PCS. As per hardware datasheet reset must be done before starting PHY. Hence, update the sequence. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c | 6 +++--- 1 file changed, 3 inse

[PATCH v3 07/16] phy: qcom-qusb2: Add support for different register layouts

2017-11-21 Thread Manu Gautam
New version of QUSB2 PHY has some registers offset changed. Add support to have register layout for a target and update the same in phy_configuration. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 131 --

[PATCH v3 02/16] phy: qcom-qmp: Adapt to clk_bulk_* APIs

2017-11-21 Thread Manu Gautam
From: Vivek Gautam <vivek.gau...@codeaurora.org> Move from using array of clocks to clk_bulk_* APIs that are available now. Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org> Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/p

[PATCH v3 03/16] phy: qcom-qmp: Power-on PHY before initialization

2017-11-21 Thread Manu Gautam
poweron callback from phy_ops and explicitly perform this from com_init, similar changes needed for poweroff. On similar lines move clk_enable from init to com_init which can be called once for multi lane PHYs. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom

[PATCH v3 04/16] phy: qcom-qusb2: Power-on PHY before initialization

2017-11-21 Thread Manu Gautam
poweron callback from phy_ops and explicitly perform this from init, similar changes needed for poweroff. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 47 +++ 1 file changed, 15 insertions(+), 32 deletions(-)

[PATCH v3 05/16] phy: qcom-qmp: Fix PHY block reset sequence

2017-11-21 Thread Manu Gautam
that as well. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/phy/qualcomm/phy-qcom-qmp.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 2

[PATCH v3 01/16] phy: qcom-qmp: Fix phy pipe clock gating

2017-11-21 Thread Manu Gautam
/0x12c [ 33.381776] [] ret_from_fork+0x10/0x50 Fix this by enabling pipe clock at the end of phy_init(), and disabling it as the first thing in phy_exit(). Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") Signed-off-by: Vivek Gautam <vivek.gau...@codeaurora.org&g

Re: [PATCH] usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets

2017-12-05 Thread Manu Gautam
Hi Felipe, On 7/19/2017 1:16 PM, Felipe Balbi wrote: > Hi, > > Manu Gautam <mgau...@codeaurora.org> writes: >>> Manu Gautam <mgau...@codeaurora.org> writes: >>>>> Manu Gautam <mgau...@codeaurora.org> writes: >>>>> diff --git a/

[PATCH] usb: dwc3: gadget: Fix PCM1 for ISOC EP with ep->mult less than 3

2017-12-05 Thread Manu Gautam
For isochronous endpoints with ep->mult less than 3, PCM1 value of trb->size in set incorrectly. For ep->mult = 2, this is set to 0/-1 and for ep->mult = 1, this is set to -2. This is because the initial mult is set to ep->mult - 1 instead of 2. Signed-off-by: Manu Gautam <mgau

Re: [PATCH v3 07/16] phy: qcom-qusb2: Add support for different register layouts

2017-12-12 Thread Manu Gautam
Hi Vivek, On 12/5/2017 3:53 PM, Vivek Gautam wrote: > > > On 11/21/2017 02:53 PM, Manu Gautam wrote: >> New version of QUSB2 PHY has some registers offset changed. >> Add support to have register layout for a target and update >> the same in phy_configuration. >&

Re: [PATCH v3 14/16] phy: Add notify_speed callback

2017-12-12 Thread Manu Gautam
Hi, On 12/12/2017 5:13 PM, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 21 November 2017 02:53 PM, Manu Gautam wrote: >> QCOM USB PHYs can monitor resume/remote-wakeup event in >> suspended state. However PHY driver must know current >> operational speed of

Re: [PATCH 1/3] usb: host: remove ehci-msm.c

2017-10-25 Thread Manu Gautam
Hi, On 10/26/2017 3:31 AM, Alex Elder wrote: > No Qualcomm SoC requires the "ehci-msm.c" code any more. So remove it. > > Suggested-by: Stephen Boyd > Signed-off-by: Alex Elder > Acked-by: Bjorn Andersson > Acked-by: Andy

Re: [PATCH 2/3] usb: phy: remove phy-msm-usb.c

2017-10-25 Thread Manu Gautam
Hi, On 10/26/2017 3:31 AM, Alex Elder wrote: > No Qualcomm SoC requires the "phy-msm-usb.c" USB phy driver support > any more, so remove the code. > > Suggested-by: Stephen Boyd > Signed-off-by: Alex Elder > Acked-by: Bjorn Andersson

Re: [PATCH v7 usb-next 3/4] usb: core: hcd: integrate the PHY roothub wrapper

2017-10-25 Thread Manu Gautam
Hi, On 10/24/2017 3:27 AM, Martin Blumenstingl wrote: > This integrates the PHY roothub wrapper into the core hcd > infrastructure. Multiple PHYs which are part of the roothub devicetree > node (which is a sub-node of the sysdev's node) are now managed > (= powered on/off when needed), by the

Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume

2017-10-21 Thread Manu Gautam
Hi Felipe, Let me know if patches in this series look fine to you. On 9/27/2017 4:49 PM, Manu Gautam wrote: > Driver powers-off PHYs and reinitializes DWC3 core and gadget on > resume. While this works fine for gadget mode but in host > mode there is not re-initialization of host st

Re: DWC3 Gadget backtrace

2017-10-31 Thread Manu Gautam
Hi, On 10/31/2017 4:12 PM, Felipe Balbi wrote: > Hi, > > Roger Quadros writes: >> On 31/10/17 12:24, Felipe Balbi wrote: >>> Hi, >>> >>> Roger Quadros writes: >>> >>> >>> > Roger, your PHY is toast :-( > > irq/90-dwc3-969 [000] d...

[PATCH v3 3/3] usb: dwc3: core: Suspend PHYs on runtime suspend in host mode

2018-05-04 Thread Manu Gautam
platform glue drivers e.g. dwc3-qcom handle remote wakeup during bus suspend by waking up devices on receiving wakeup event from PHY. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- drivers/usb/dwc3/core.c | 36 +--- 1 file changed, 33 insertions(+), 3 del

[PATCH v3 1/3] dt-bindings: usb: Update documentation for Qualcomm DWC3 driver

2018-05-04 Thread Manu Gautam
Existing documentation has lot of incorrect information as it was originally added for a driver that no longer exists. Signed-off-by: Manu Gautam <mgau...@codeaurora.org> --- .../devicetree/bindings/usb/qcom,dwc3.txt | 85 -- 1 file changed, 63 insertions(

  1   2   >