[PATCH] usb: gadget: avoid using gadget after freed

2019-06-14 Thread Lianwei Wang
The udc and gadget device will be deleted when udc device is disconnected and the related function will be unbind with it. But if the configfs is not deleted, then the function object will be kept and the bound status is kept true. Then after udc device is connected again and a new udc and gadget

[PATCH 0/8] Tegra XHCI controller ELPG support

2019-06-14 Thread JC Kuo
Tegra XHCI controler can be placed in ELPG (Engine Level PowerGate) state for power saving when all of the connected USB devices are in suspended state. This patch series includes clk, phy and pmc changes that are required for properly place controller in ELPG and bring controller out of ELPG. JC

[PATCH 4/8] phy: tegra: xusb: add sleepwalk and suspend/resume

2019-06-14 Thread JC Kuo
This commit adds sleepwalk/wake and suspend/resume interfaces to Tegra XUSB PHY driver. Signed-off-by: JC Kuo --- drivers/phy/tegra/xusb.c | 78 ++ drivers/phy/tegra/xusb.h | 8 include/linux/phy/tegra/xusb.h | 12 ++ 3 files changed, 98 inse

[PATCH 1/8] clk: tegra: Add PLLE HW power sequencer control

2019-06-14 Thread JC Kuo
PLLE hardware power sequencer has to be enabled after PEX/SATA UPHY PLL's sequencers are enabled. tegra210_plle_hw_sequence_start() for XUSB PADCTL driver to enable PLLE hardware sequencer at proper time. tegra210_plle_hw_sequence_is_enabled() for XUSB PADCTL driver to check whether PLLE hardware

[PATCH 3/8] phy: tegra: xusb: t210: rearrange UPHY init

2019-06-14 Thread JC Kuo
This commit is a preparation for enabling XUSB LP0 support. It rearranges T210 XUSB PADCTL UPHY initialization sequence, for the following reasons: 1. PLLE hardware power sequencer has to be enabled only after both PEX UPHY PLL and SATA UPHY PLL are initialized. 2. Once UPHY PLL hardware power

[PATCH 2/8] clk: tegra: don't enable PLLE HW sequencer at init

2019-06-14 Thread JC Kuo
PLLE hardware power sequencer references PEX/SATA UPHY PLL hardware power sequencers' output to enable/disable PLLE. PLLE hardware power sequencer has to be enabled only after PEX/SATA UPHY PLL's sequencers are enabled. Signed-off-by: JC Kuo --- drivers/clk/tegra/clk-pll.c | 12 1 f

[PATCH 8/8] xhci: tegra: enable ELPG for runtime/system PM

2019-06-14 Thread JC Kuo
This commit enables XUSB host controller ELPG for runtime and system power management. NEED CLEANUP. Signed-off-by: JC Kuo --- drivers/usb/host/xhci-tegra.c | 802 -- 1 file changed, 671 insertions(+), 131 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c

[PATCH 7/8] arm64: tegra: add Tegra210 XUSB PADCTL irq

2019-06-14 Thread JC Kuo
XUSB PADCTL interrupt will be raised when USB wake event happens. This is required for supporting XUSB host controller ELPG. Signed-off-by: JC Kuo --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra21

[PATCH 6/8] phy: tegra: xusb: t210: support wake and sleepwalk

2019-06-14 Thread JC Kuo
This commit implements Tegra210 XUSB PADCTL wake and sleepwalk routines. Signed-off-by: JC Kuo --- drivers/phy/tegra/xusb-tegra210.c | 574 -- 1 file changed, 548 insertions(+), 26 deletions(-) diff --git a/drivers/phy/tegra/xusb-tegra210.c b/drivers/phy/tegra/xusb-

[PATCH 5/8] soc/tegra: pmc: support T210 USB 2.0 Sleepwalk

2019-06-14 Thread JC Kuo
This commit implements Tegra210 PMC USB 2.0 (UTMI and HSIC) Sleepwalk programming sequence. With Sleepwalk enabled, XUSB host controller can be put into ELPG (Engine Level PowerGate) state when controller is idle to save power. The Sleepwalk logic is in charge of wake event detection and maintain r

Re: [PATCH] usb: host: xhci-tegra: Fix Wunused-const-variable

2019-06-14 Thread Thierry Reding
On Thu, Jun 13, 2019 at 11:58:38AM -0700, Nathan Huckleberry wrote: > Clang produces the following warning > > drivers/usb/host/xhci-tegra.c:357:27: warning: unused variable > 'mbox_cmd_name' [-Wunused-const-variable] > static const char * const mbox_cmd_name[] = { > > Looks like it was intended

[PATCH v4 1/8] doc: dt-binding: mxs-usb-phy: add compatible for 7ulp

2019-06-14 Thread Peter Chen
Add compatible for 7ulp USB PHY. Reviewed-by: Rob Herring Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/phy/mxs-usb-phy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt b/Documentation/devicetree/bindings/phy/mxs-us

[PATCH v4 0/8] Add imx7ulp USBOTG1 support

2019-06-14 Thread Peter Chen
Changes for v4: - Delete the oldest compatible for usbotg1, usbmisc and usbphy. [Patch 6/8] Changes for v3: - Using readl_poll_timeout to replace private function. [Patch 2/8] - Add more commit log for new flag CI_HDRC_PMQOS. [Patch 5/8] - Move 'compatible' at the beginning of propeties. [Patch 6/

[PATCH v4 5/8] usb: chipidea: imx: add imx7ulp support

2019-06-14 Thread Peter Chen
In this commit, we add CI_HDRC_PMQOS to avoid system entering idle, at imx7ulp, if the system enters idle, the DMA will stop, so the USB transfer can't work at this case. Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci_hdrc_imx.c | 28 +++- drivers/usb/chipidea/usbm

[PATCH v4 6/8] ARM: dts: imx7ulp: add imx7ulp USBOTG1 support

2019-06-14 Thread Peter Chen
Add imx7ulp USBOTG1 support. Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx7ulp.dtsi | 28 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi index fca6e50f37c8..5115e47715c3 100644 --- a/arch/arm/boot/

[PATCH v4 3/8] doc: dt-binding: ci-hdrc-usb2: add compatible string for imx7ulp

2019-06-14 Thread Peter Chen
Add compatible string for imx7ulp. Reviewed-by: Rob Herring Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci

[PATCH v4 7/8] ARM: dts: imx7ulp-evk: enable USBOTG1 support

2019-06-14 Thread Peter Chen
Enable USBOTG1 support for evk board, it is dual-role function port. Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx7ulp-evk.dts | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/imx7ulp-evk.dts b/arch/arm/boot/dts/imx7ulp-evk.dts ind

[PATCH v4 4/8] doc: dt-binding: usbmisc-imx: add compatible string for imx7ulp

2019-06-14 Thread Peter Chen
Add compatible string for imx7ulp Reviewed-by: Rob Herring Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmi

[PATCH v4 2/8] usb: phy: phy-mxs-usb: add imx7ulp support

2019-06-14 Thread Peter Chen
At imx7ulp, the USB related analog register is located in PHY register region too, so we need to control PLL at PHY driver directly. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 67 ++- 1 file changed, 66 insertions(+), 1 deletion(-) diff

[PATCH v4 8/8] usb: chipidea: imx: "fsl,usbphy" phandle is not mandatory now

2019-06-14 Thread Peter Chen
Since the chipidea common code support get the USB PHY phandle from "phys", the glue layer is not mandatory to get the "fsl,usbphy" phandle any more. Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci_hdrc_imx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/

Re: [PATCH] usb: xhci: dbc: get rid of global pointer

2019-06-14 Thread Mathias Nyman
On 11.6.2019 20.24, Felipe Balbi wrote: If we happen to have two XHCI controllers with DbC capability, then there's no hope this will ever work as the global pointer will be overwritten by the controller that probes last. Avoid this problem by keeping the tty_driver struct pointer inside struct

Re: [PATCH] usb: xhci: dbc: get rid of global pointer

2019-06-14 Thread Johan Hovold
On Tue, Jun 11, 2019 at 08:24:16PM +0300, Felipe Balbi wrote: > If we happen to have two XHCI controllers with DbC capability, then > there's no hope this will ever work as the global pointer will be > overwritten by the controller that probes last. > > Avoid this problem by keeping the tty_driver

DWC3 USB hub issue

2019-06-14 Thread Manivannan Sadhasivam
Hello, I'm trying to upstream Designware USB3 host driver present in the Actions Semi S900 SoC. It can successfully detect the USB hub but when any of the USB device got plugged in, it fails with following error: [4.365566] usb usb1-port1: connect-debounce failed Full log can be found here: