Re: [PATCH 6/6] arm: dts: qcom: db410c: Enable USB OTG support

2018-08-22 Thread Loic Poulain
On 21 August 2018 at 18:09, Rob Herring  wrote:
> On Tue, Aug 21, 2018 at 8:56 AM Loic Poulain  wrote:
>>
>> The Dragonboard-410c is able to act either as USB Host or Device.
>> The role can be determined at runtime via the USB_HS_ID pin which is
>> derived from the micro-usb port VBUS pin.
>>
>> In Host role, SoC USB D+/D- are routed to the onboard USB 2.0 HUB.
>> In Device role, SoC USB D+/D- are routed to the USB 2.0 micro B port.
>> Routing is selected via USB_SW_SEL_PM gpio.
>>
>> In device role USB HUB can be held in reset.
>>
>> Signed-off-by: Loic Poulain 
>> ---
>
>> @@ -512,7 +513,7 @@
>>
>> usb_id: usb-id {
>> compatible = "linux,extcon-usb-gpio";
>> -   vbus-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
>> +   id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
>
> The GPIO has magically changed from being connected to Vbus to ID? The
> extcon binding is crap anyways...

Although the pin is derived from VBUS, it is really used as an ID pin (USB_HS_ID
on DB410C schematics [1]), so that DB410C switches to device role when a cable
is inserted to the micro B port.

> Ideally, it would be nice if this was moved to the usb connector binding.

Good suggestion, If you agree, I'll address that in a different patchset.

Regards,
Loic

[1] 
https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/hardware-docs/


Re: [PATCH] usb: musb: dsps: do not disable CPPI41 irq in driver teardown

2018-08-22 Thread Sergei Shtylyov
Hello!

On 08/21/2018 09:55 PM, Bin Liu wrote:

> TI AM335x CPPI41 module uses a single register bit for CPPI interrupts in

   It's CPPI 4.1. :-)

> both musb controllers. So disabling the CPPI irq in one musb driver breaks
> the other musb module.
> 
> Since musb is already disabled before tearing down dma controller in
> musb_remove(), it is safe to not disable CPPI irq in
> musb_dma_controller_destroy().
> 
> Fixes: 255348289f71 ("usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS")
> 

   Should be no empty line here...

> Cc: sta...@vger.kernel.org
> Signed-off-by: Bin Liu 
[...]

MBR, Sergei