[PATCH v3 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-03-11 Thread Jun Li
Some typec super speed active channel switch can be controlled via a GPIO, this binding can be used to specify the switch node by a GPIO and the remote endpoint of its consumer. Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-switch-gpio.txt | 30 ++ 1 file chang

[PATCH v3 2/2] usb: typec: add typec switch via GPIO control

2019-03-11 Thread Jun Li
This patch adds a simple typec switch driver which only needs a GPIO to switch the super speed active channel according to typec orientation. Reviewed-by: Andy Shevchenko Signed-off-by: Li Jun --- Change for v3: - Remove file name in driver description. - Add Andy Shevchenko's Reviewed-by tag.

[PATCH v3 5/8] usb: typec: fusb302: Fix fusb302_handle_togdone_src Ra handling

2019-03-11 Thread Hans de Goede
The FUSB302 will stop toggling with a FUSB_REG_STATUS1A_TOGSS_SRC? status, as soon as it sees either Ra or Rd on a CC pin. Before this commit fusb302_handle_togdone_src would assume that the toggle- engine always stopped at the CC pin indicating the polarity, IOW it assumed that it stopped at the

[PATCH v3 0/8] usb: typec: fusb302: Various fixes

2019-03-11 Thread Hans de Goede
Hi All, Here is v3 of my fusb302 bug-fix series, the main fix in this series makes active adapters like Type-C to HDMI (often HDMI + USB-3-A) adapters work when they are to be powered by the Type-C port and thus present both an Ra and a Rd resistor on their Cc pins (patch 5). Changes in v3: [PAT

[PATCH v3 6/8] usb: typec: fusb302: 2 small misc. fixes

2019-03-11 Thread Hans de Goede
Fix a copy and paste error in an error message and a spelling error in a comment. Reviewed-by: Guenter Roeck Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/t

[PATCH v3 4/8] usb: typec: fusb302: Check vconn is off when we start toggling

2019-03-11 Thread Hans de Goede
The datasheet says the vconn MUST be off when we start toggling. The tcpm.c state-machine is responsible to make sure vconn is off, but lets add a WARN to catch any cases where vconn is not off for some reason. Signed-off-by: Hans de Goede --- Changes in v3: -Use WARN with a message describing th

[PATCH v3 2/8] usb: typec: fusb302: Refactor / simplify tcpm_set_cc()

2019-03-11 Thread Hans de Goede
After commit ea3b4d5523bc ("usb: typec: fusb302: Resolve fixed power role contract setup"), tcpm_set_cc always calls fusb302_set_toggling. Before this refactor tcpm_set_cc does the following: 1) fusb302_set_toggling(TOGGLING_MODE_OFF), this sets both FUSB_REG_MASK_BC_LVL and FUSB_REG_MASK_COMP

[PATCH v3 1/8] usb: typec: fusb302: Make fusb302_set_cc_polarity also set pull ups / downs

2019-03-11 Thread Hans de Goede
The 2 callers of fusb302_set_cc_polarity both call fusb302_set_cc_pull directly before calling fusb302_set_cc_polarity, this is not ideal for 2 reasons: 1) fusb302_set_cc_pull uses the cached polarity when applying the pull-ups, which maybe changed immediately afterwards, to fix this set_cc_polari

[PATCH v3 8/8] usb: typec: fusb302: Add __printf attribute to fusb302_log function

2019-03-11 Thread Hans de Goede
Add __printf attribute to fusb302_log function, so that we get compiler warnings when specifying wrong vararg parameters. Reviewed-by: Guenter Roeck Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/

[PATCH v3 3/8] usb: typec: fusb302: Fold fusb302_set_cc_pull into tcpm_set_cc

2019-03-11 Thread Hans de Goede
After the recent cleanups, tcpm_set_cc is the only caller of fusb302_set_cc_pull, fold fusb302_set_cc_pull directly into tcpm_set_cc for a nice cleanup. Reviewed-by: Guenter Roeck Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm/fusb302.c | 51 1 file cha

[PATCH v3 7/8] usb: typec: fusb302: Improve suspend/resume handling

2019-03-11 Thread Hans de Goede
Remove the code which avoids doing i2c-transfers while our parent i2c-adapter may be suspended by busy-waiting for our resume handler to be called. Instead move the interrupt handling from a threaded interrupt handler to a work-queue and install a non-threaded interrupt handler which normally queu

Re: [PATCH v3 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-03-11 Thread Hans de Goede
Hi, On 11-03-19 11:40, Jun Li wrote: Some typec super speed active channel switch can be controlled via a GPIO, this binding can be used to specify the switch node by a GPIO and the remote endpoint of its consumer. Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-switch-gpio.txt

Re: [PATCH v3 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-03-11 Thread Hans de Goede
Hi, On 11-03-19 12:02, Hans de Goede wrote: Hi, On 11-03-19 11:40, Jun Li wrote: Some typec super speed active channel switch can be controlled via a GPIO, this binding can be used to specify the switch node by a GPIO and the remote endpoint of its consumer. Signed-off-by: Li Jun ---   .../d

[PATCH V2 2/8] phy: tegra: xusb: t210: add usb3 port fake support

2019-03-11 Thread Nagarjuna Kristam
On Tegra210, usb2 only otg/peripheral ports dont work in device mode. They need an assosciated usb3 port to work in device mode. Identify an unused usb3 port and assign it as a fake USB3 port to USB2 only port whose mode is otg/peripheral Based on work by BH Hsieh . Signed-off-by: Nagarjuna Krist

[PATCH V2 Tegra XUSB gadget driver support 5/8] arm64: tegra: Add xudc node for Tegra210

2019-03-11 Thread Nagarjuna Kristam
Tegra210 has one XUSB device mode controller, which can be operated HS and SS modes. Add DT support for XUSB device mode controller. Signed-off-by: Nagarjuna Kristam --- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/b

[PATCH V2 4/8] dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding

2019-03-11 Thread Nagarjuna Kristam
Add device-tree binding documentation for the XUSB device mode controller present on tegra210 SoC. This controller supports USB 3.0 specification Based on work by Andrew Bresticker . Signed-off-by: Nagarjuna Kristam --- .../devicetree/bindings/usb/nvidia,tegra-xudc.txt | 105 ++

[PATCH V2 3/8] phy: tegra: xusb: t210: add vbus override support

2019-03-11 Thread Nagarjuna Kristam
Tegra XUSB device control driver needs to control vbus override during its operations, add API for the support Signed-off-by: Nagarjuna Kristam --- drivers/phy/tegra/xusb-tegra210.c | 61 +++ drivers/phy/tegra/xusb.c | 28 -- drivers/p

[PATCH V2 1/8] phy: tegra: xusb: t210: add XUSB dual mode support

2019-03-11 Thread Nagarjuna Kristam
The device tree bindings document the "mode" property of "ports" subnodes, but the driver was not parsing the property. In preparation for adding role switching, parse the property at probe time and confgiure the port capabilities accordingly Based on work by JC Kuo . Signed-off-by: Nagarjuna Kri

[PATCH V2 8/8] arm64: defconfig: Enable tegra XUDC driver

2019-03-11 Thread Nagarjuna Kristam
Enable support for Nvidia XUSB device mode controller driver Signed-off-by: Nagarjuna Kristam --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index b3d8209..9782571 100644 --- a/arch/arm64/configs/de

[PATCH V2 0/8] Tegra XUSB gadget driver support

2019-03-11 Thread Nagarjuna Kristam
This is the second verion of series "Tegra XUSB gadget driver support" Patches 1-3 are phy driver changes to add support for device mode. Patches 4-7 are changes related to XUSB device mode controller driver. Patch 8 is to enable XUDC driver in defconfig Test Steps(USB 2.0): - Enable "USB Gadget

[PATCH V2 6/8] arm64: tegra: Enable xudc on Jetson TX1

2019-03-11 Thread Nagarjuna Kristam
Enable XUSB device mode driver for USB0 slot on Jetson TX1. Signed-off-by: Nagarjuna Kristam --- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra2

[PATCH V2 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller

2019-03-11 Thread Nagarjuna Kristam
This patch adds UDC driver for tegra XUSB 3.0 device mode controller. XUSB device mode controller support SS, HS and FS modes Based on work by: Mark Kuo Andrew Bresticker Signed-off-by: Nagarjuna Kristam --- drivers/usb/gadget/udc/Kconfig | 10 + drivers/usb/gadget/udc/Makefile

USB bug

2019-03-11 Thread Harutyun Khachatryan
I have an old Toshiba Sattelite laptop with usb hub device 'Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller'. For kernel version >= 4.15 it doesn't recogonize and power on any usb device when other usb device already attached during system boot. I have seen th

Re: [PATCH v3 4/8] usb: typec: fusb302: Check vconn is off when we start toggling

2019-03-11 Thread Guenter Roeck
On 3/11/19 3:48 AM, Hans de Goede wrote: The datasheet says the vconn MUST be off when we start toggling. The tcpm.c state-machine is responsible to make sure vconn is off, but lets add a WARN to catch any cases where vconn is not off for some reason. Signed-off-by: Hans de Goede Reviewed-by:

Re: [PATCH v3 5/8] usb: typec: fusb302: Fix fusb302_handle_togdone_src Ra handling

2019-03-11 Thread Guenter Roeck
On 3/11/19 3:48 AM, Hans de Goede wrote: The FUSB302 will stop toggling with a FUSB_REG_STATUS1A_TOGSS_SRC? status, as soon as it sees either Ra or Rd on a CC pin. Before this commit fusb302_handle_togdone_src would assume that the toggle- engine always stopped at the CC pin indicating the polar

Re: USB bug

2019-03-11 Thread Alan Stern
On Mon, 11 Mar 2019, Harutyun Khachatryan wrote: > I have an old Toshiba Sattelite laptop with usb hub device 'Intel > Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host > Controller'. For kernel version >= 4.15 it doesn't recogonize and power > on any usb device when other usb d

Usb wifi stick doesn´t work until I reboot the system with kernel 4.20

2019-03-11 Thread Bernhard Gebetsberger
Hi, After upgrading from the 4.19 kernel to 4.20 my usb wifi stick doesn´t work until I reboot the system(the problem occurs when the system was shut down). Dmesg shows the following error when the issue occurs: xhci_hcd :15:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or e

Re[2]: USB bug

2019-03-11 Thread Alan Stern
You should always use Reply-To-All so that your message gets sent to the mailing list as well as to me. But when you do, use plain text only -- the mailing list doesn't like HTML text. Also, don't top-post. And tell your email client to wrap lines after 72 columns or so. On Mon, 11 Mar 2019,