Re: [RFC 0/5] usb: chipidea: Add support for Tegra20 through Tegra124

2016-05-26 Thread Peter Chen
On Thu, May 26, 2016 at 05:40:00PM +0200, Thierry Reding wrote:
> From: Thierry Reding 
> 
> All Tegra SoC generations from Tegra20 through Tegra124 have a ChipIdea
> USB device controller. This set of patches adds very rudimentary support
> for it to the existing ChipIdea driver and enables them on the set of
> boards that I could easily test on.
> 
> I'm sending this out as RFC because I'm not sure yet how to merge this.
> While the driver seems to work fine (tested by exporting a USB driver or
> eMMC via the mass storage function) I don't yet understand how to make
> the driver switch between host and device modes dynamically. It might be
> useful to get this merged before, but I'd like to have some feedback on
> this, because doing so would mean that we need to use device mode on the
> devices where it's enabled and can't use the USBD port in host mode.
> 

Chipidea driver supports many ways to switch between host and device
mode. It can support switching with/without disconnecting cable.

Most of cases need to disconnect cable (Micro-AB) to switch between
host and device mode, I just take this as an example:

Using ID pin which is at Micro-B receptacle on the board to determine host (ID 
= 0)
or device (ID = 1 )mode.

- ID pin connects to CPU, and ID interrupt and value can be get through
register OTGSC.
- ID pin does not connect to CPU, and there is a dedicated GPIO for ID.

-- 

Best Regards,
Peter Chen


Re: [RFC 0/5] usb: chipidea: Add support for Tegra20 through Tegra124

2016-05-26 Thread Peter Chen
On Thu, May 26, 2016 at 05:40:00PM +0200, Thierry Reding wrote:
> From: Thierry Reding 
> 
> All Tegra SoC generations from Tegra20 through Tegra124 have a ChipIdea
> USB device controller. This set of patches adds very rudimentary support
> for it to the existing ChipIdea driver and enables them on the set of
> boards that I could easily test on.
> 
> I'm sending this out as RFC because I'm not sure yet how to merge this.
> While the driver seems to work fine (tested by exporting a USB driver or
> eMMC via the mass storage function) I don't yet understand how to make
> the driver switch between host and device modes dynamically. It might be
> useful to get this merged before, but I'd like to have some feedback on
> this, because doing so would mean that we need to use device mode on the
> devices where it's enabled and can't use the USBD port in host mode.
> 

Chipidea driver supports many ways to switch between host and device
mode. It can support switching with/without disconnecting cable.

Most of cases need to disconnect cable (Micro-AB) to switch between
host and device mode, I just take this as an example:

Using ID pin which is at Micro-B receptacle on the board to determine host (ID 
= 0)
or device (ID = 1 )mode.

- ID pin connects to CPU, and ID interrupt and value can be get through
register OTGSC.
- ID pin does not connect to CPU, and there is a dedicated GPIO for ID.

-- 

Best Regards,
Peter Chen


[RFC 0/5] usb: chipidea: Add support for Tegra20 through Tegra124

2016-05-26 Thread Thierry Reding
From: Thierry Reding 

All Tegra SoC generations from Tegra20 through Tegra124 have a ChipIdea
USB device controller. This set of patches adds very rudimentary support
for it to the existing ChipIdea driver and enables them on the set of
boards that I could easily test on.

I'm sending this out as RFC because I'm not sure yet how to merge this.
While the driver seems to work fine (tested by exporting a USB driver or
eMMC via the mass storage function) I don't yet understand how to make
the driver switch between host and device modes dynamically. It might be
useful to get this merged before, but I'd like to have some feedback on
this, because doing so would mean that we need to use device mode on the
devices where it's enabled and can't use the USBD port in host mode.

Thierry

Thierry Reding (5):
  usb: chipidea: Add support for Tegra20/30/114/124
  ARM: tegra: Enable UDC on TrimSlice
  ARM: tegra: Enable UDC on Beaver
  ARM: tegra: Enable UDC on Dalmore
  ARM: tegra: Enable UDC on Jetson TK1

 arch/arm/boot/dts/tegra114-dalmore.dts|  11 +++
 arch/arm/boot/dts/tegra124-jetson-tk1.dts |  13 +++-
 arch/arm/boot/dts/tegra20-trimslice.dts   |   3 +
 arch/arm/boot/dts/tegra30-beaver.dts  |  11 +++
 drivers/usb/chipidea/Makefile |   1 +
 drivers/usb/chipidea/ci_hdrc_tegra.c  | 109 ++
 6 files changed, 147 insertions(+), 1 deletion(-)
 create mode 100644 drivers/usb/chipidea/ci_hdrc_tegra.c

-- 
2.8.3



[RFC 0/5] usb: chipidea: Add support for Tegra20 through Tegra124

2016-05-26 Thread Thierry Reding
From: Thierry Reding 

All Tegra SoC generations from Tegra20 through Tegra124 have a ChipIdea
USB device controller. This set of patches adds very rudimentary support
for it to the existing ChipIdea driver and enables them on the set of
boards that I could easily test on.

I'm sending this out as RFC because I'm not sure yet how to merge this.
While the driver seems to work fine (tested by exporting a USB driver or
eMMC via the mass storage function) I don't yet understand how to make
the driver switch between host and device modes dynamically. It might be
useful to get this merged before, but I'd like to have some feedback on
this, because doing so would mean that we need to use device mode on the
devices where it's enabled and can't use the USBD port in host mode.

Thierry

Thierry Reding (5):
  usb: chipidea: Add support for Tegra20/30/114/124
  ARM: tegra: Enable UDC on TrimSlice
  ARM: tegra: Enable UDC on Beaver
  ARM: tegra: Enable UDC on Dalmore
  ARM: tegra: Enable UDC on Jetson TK1

 arch/arm/boot/dts/tegra114-dalmore.dts|  11 +++
 arch/arm/boot/dts/tegra124-jetson-tk1.dts |  13 +++-
 arch/arm/boot/dts/tegra20-trimslice.dts   |   3 +
 arch/arm/boot/dts/tegra30-beaver.dts  |  11 +++
 drivers/usb/chipidea/Makefile |   1 +
 drivers/usb/chipidea/ci_hdrc_tegra.c  | 109 ++
 6 files changed, 147 insertions(+), 1 deletion(-)
 create mode 100644 drivers/usb/chipidea/ci_hdrc_tegra.c

-- 
2.8.3