Re: [PATCH v2 11/12] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-03-02 Thread Rob Herring
On Mon, Feb 26, 2018 at 07:49:18PM +0800, Li Jun wrote: > TCPCI stands for typec port controller interface, its implementation > has full typec port control with power delivery support, it's a > standard i2c slave with GPIO input as irq interface, detail see spec > "Universal Serial Bus Type-C

Re: [PATCH v2 10/12] dt-bindings: connector: add properties for typec power delivery

2018-03-02 Thread Rob Herring
On Tue, Feb 27, 2018 at 09:41:19AM +0100, Andrzej Hajda wrote: > On 26.02.2018 12:49, Li Jun wrote: > > In case of usb-c-connector with power delivery support, add bingdings > > supported by current typec driver, so user can pass all those properties > > via dt. > > > > Signed-off-by: Li Jun

Re: [PATCH v2 10/12] dt-bindings: connector: add properties for typec power delivery

2018-03-02 Thread Rob Herring
On Mon, Feb 26, 2018 at 07:49:17PM +0800, Li Jun wrote: > In case of usb-c-connector with power delivery support, add bingdings > supported by current typec driver, so user can pass all those properties > via dt. > > Signed-off-by: Li Jun > --- > Changes for v2: > - Added typec

libusbgx v0.2.0 released

2018-03-02 Thread Krzysztof Opasiak
Hello, This is just a note to let you know that v0.2.0 of libusbg-neXt[1] has just been released. Summary of changes: - Use prefix for our enums - Use string names similar to USB spec - Get rid of static buffers - Add support for HID function - Add support for UAC2 function - Add support for

howto debug xhci driver?

2018-03-02 Thread Bin Liu
Hi, I am relatively new to xhci and its driver. I am trying to get a xhci driver runtime log to understand how it handles usb transactions, but I don't get much information with dynamic debug (module xhci_hcd) or enabling xhci trace events. Is there any other methods you guys use to debug xhci

Re: [PATCH] staging: typec: handle vendor defined part and modify drp toggling flow

2018-03-02 Thread 李書帆
Hi, Sorry, I modify it to plain text mode and send again 2018-03-03 2:39 GMT+08:00 李書帆 : > > Hi Jun, > > I think this operation should be moved to vendor's operation after > rechecking the specification. > > 2018-03-02 22:38 GMT+08:00 Jun Li : >> >> Hi

Re: patch 8466489ef5ba48272ba4fa4ea9f8f403306de4c7 breaks Renesas USB3 controller functionality

2018-03-02 Thread Bockholdt Arne
On Thu, 2018-03-01 at 17:37 +, Marc Zyngier wrote: > On 01/03/18 08:01, Bockholdt Arne wrote: > > > > On Thu, 2018-02-15 at 19:29 +, Marc Zyngier wrote: > > > [+ Ard, who helped me chasing the initial issue] > > > > > > On 15/02/18 06:43, Bockholdt Arne wrote: > > > > Hi all, > > > > >

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-02 Thread Pali Rohár
On Friday 02 March 2018 17:47:52 Merlijn Wajer wrote: > >> I would expect it to state "b_idle" instead of "(null)". > > > > Actually, I'd like to see (null) whenever a gadget driver is not loaded, > > which indicates a gadget is not bound to the udc. > > Hm... Sounds fine to me. I'm using this

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-02 Thread Merlijn Wajer
Hi, On 02/03/18 16:27, Bin Liu wrote: > Hi, > > On Fri, Mar 02, 2018 at 12:47:07AM +0100, Merlijn Wajer wrote: >> Hi, >> >> I found that the "mode" file in musb sys node will return "(null)" when >> one would expect it show b_idle. >> >> Wrong /mode file: >> >> [Fresh boot, cable not connected

Re: Continuous USB resets on NXP i.MX 6ULL device

2018-03-02 Thread Stefan Wahren
Am 02.03.2018 um 04:03 schrieb Peter Chen: For non-core registers, i.mx6ull can use i.mx6q as its base setting, the bits you mentioned may also be reserved at imx6qdl RM. just for my understanding: MX6_BM_NON_BURST_SETTING is a no-op on i.MX6ULL or not properly documented in reference

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-02 Thread Bin Liu
Hi, On Fri, Mar 02, 2018 at 12:47:07AM +0100, Merlijn Wajer wrote: > Hi, > > I found that the "mode" file in musb sys node will return "(null)" when > one would expect it show b_idle. > > Wrong /mode file: > > [Fresh boot, cable not connected yet] > root@n900devuan:~# modprobe g_nokia >

Re: [PATCH] net/usb/kalmia: use ARRAY_SIZE for various array sizing calculations

2018-03-02 Thread David Miller
From: Colin King Date: Fri, 2 Mar 2018 13:42:39 + > From: Colin Ian King > > Use the ARRAY_SIZE macro on a couple of arrays to determine > size of the arrays. Also fix up alignment to clean up a checkpatch > warning. Improvement

RE: [PATCH] staging: typec: handle vendor defined part and modify drp toggling flow

2018-03-02 Thread Jun Li
Hi > -Original Message- > From: shufan_lee(李書帆) [mailto:shufan_...@richtek.com] > Sent: 2018年3月1日 19:54 > To: Jun Li ; ShuFanLee ; > heikki.kroge...@linux.intel.com; li...@roeck-us.net; g...@kroah.com > Cc: cy_huang(黃啟原) ; >

Re: [PATCHv2] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-02 Thread Tony Lindgren
* Kishon Vijay Abraham I [180302 08:04]: > Hi Tony, > > On Thursday 01 March 2018 09:20 AM, Tony Lindgren wrote: > > Let's add support for the GPIO controlled USB PHY on the MDM6600 modem. > > It is used on some Motorola Mapphone series of phones and tablets such > > as Droid 4. >

[PATCH] net/usb/kalmia: use ARRAY_SIZE for various array sizing calculations

2018-03-02 Thread Colin King
From: Colin Ian King Use the ARRAY_SIZE macro on a couple of arrays to determine size of the arrays. Also fix up alignment to clean up a checkpatch warning. Improvement suggested by Coccinelle. Signed-off-by: Colin Ian King ---

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-02 Thread Heikki Krogerus
Hi, On Tue, Feb 27, 2018 at 08:11:29AM +0100, Andrzej Hajda wrote: > +2. USB-C connector attached to CC controller (s2mm005), HS lines routed > +to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort. > +DisplayPort video lines are routed to the connector via SS mux in USB3

Re: bug report : TBR oveflow

2018-03-02 Thread Mathias Nyman
On 01.03.2018 22:56, ljoubl...@gmail.com wrote: I'm a user of gentoo linux, and would like to raise a bug report. I hope these are the correct channels; if not, I apologise in advance. I'm using a realtek-based USB3 to RJ45 gigabit adapter. This plugs directly into my laptop, which is a Toshiba

[PATCH 1/1] usb: gadget: f_fs: Fix use-after-free in ffs_fs_kill_sb()

2018-03-02 Thread Xinyong
When I debug a kernel crash issue in funcitonfs, found ffs_data.ref overflowed, While functionfs is unmounting, ffs_data is put twice. Commit 43938613c6fd ("drivers, usb: convert ffs_data.ref from atomic_t to refcount_t") can avoid refcount overflow, but that is risk some situations. So no need

[PATCH v6 04/12] usb: common: Small class for USB role switches

2018-03-02 Thread Hans de Goede
From: Heikki Krogerus USB role switch is a device that can be used to choose the data role for USB connector. With dual-role capable USB controllers, the controller itself will be the switch, but on some platforms the USB host and device controllers are separate

[PATCH v6 05/12] usb: typec: tcpm: Set USB role switch to device mode when configured as such

2018-03-02 Thread Hans de Goede
Setting the mux to MUX_NONE and the switch to USB_SWITCH_DISCONNECT when the data-role is device is not correct. Plenty of devices support operating as USB device through a (separate) USB device controller. We really need 2 different versions of USB_SWITCH_CONNECT, USB_SWITCH_CONNECT_HOST and

[PATCH v6 06/12] usb: typec: tcpm: Use new Type-C switch/mux and usb-role-switch functions

2018-03-02 Thread Hans de Goede
Remove the unused (not implemented anywhere) tcpc_mux_dev abstraction and replace it with calling the new typec_set_orientation, usb_role_switch_set and typec_set_mode functions. Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck

[PATCH v6 01/12] drivers: base: Unified device connection lookup

2018-03-02 Thread Hans de Goede
From: Heikki Krogerus Several frameworks - clk, gpio, phy, pmw, etc. - maintain lookup tables for describing connections and provide custom API for handling them. This introduces a single generic lookup table and API for the connections. The motivation for this

[PATCH v6 08/12] xhci: Add Intel extended cap / otg phy mux handling

2018-03-02 Thread Hans de Goede
The xHCI controller on various Intel SoCs has an extended cap mmio-range which contains registers to control the muxing to the xHCI (host mode) or the dwc3 (device mode) and vbus-detection for the otg usb-phy. Having a role-sw driver included in the xHCI code (under drivers/usb/host) is not

[PATCH v6 07/12] xhci: Add option to get next extended capability in list by passing id = 0

2018-03-02 Thread Hans de Goede
From: Mathias Nyman Modify xhci_find_next_ext_cap(base, offset, id) to return the next capability offset if 0 is passed for id. Otherwise it will behave as previously and return the offset of the next capability with matching id capability id 0 is not used by xHCI

[PATCH v6 10/12] usb: typec: driver for Pericom PI3USB30532 Type-C cross switch

2018-03-02 Thread Hans de Goede
Add a driver for the Pericom PI3USB30532 Type-C cross switch / mux chip found on some devices with a Type-C port. Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede --- Changes

[PATCH v6 02/12] usb: typec: Start using ERR_PTR

2018-03-02 Thread Hans de Goede
From: Heikki Krogerus In order to allow the USB Type-C Class driver take care of things like muxes and other possible dependencies for the port drivers, returning ERR_PTR instead of NULL from the registration functions in case of failure. The reason for taking

[PATCH v6 12/12] extcon: axp288: Set USB role where necessary

2018-03-02 Thread Hans de Goede
The AXP288 BC1.2 charger detection / extcon code may seem like a strange place to add code to control the USB role-switch on devices with an AXP288, but there are 2 reasons to do this inside the axp288 extcon code: 1) On many devices the USB role is controlled by ACPI AML code, but the AML

[PATCH v6 03/12] usb: typec: API for controlling USB Type-C Multiplexers

2018-03-02 Thread Hans de Goede
From: Heikki Krogerus USB Type-C connectors consist of various muxes and switches that route the pins on the connector to the right locations. The USB Type-C drivers need to be able to control the muxes, as they are the ones that know things like the cable plug

[PATCH v6 11/12] platform/x86: intel_cht_int33fe: Add device connections for the Type-C port

2018-03-02 Thread Hans de Goede
We need to add device-connections for the Type-C mux/switch and usb-role code to be able to find the PI3USB30532 Type-C cross-switch and the device/host role-switch integrated in the CHT SoC. Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko

[PATCH v6 09/12] usb: roles: Add Intel xHCI USB role switch driver

2018-03-02 Thread Hans de Goede
Various Intel SoCs (Cherry Trail, Broxton and others) have an internal USB role switch for swiching the OTG USB data lines between the xHCI host controller and the dwc3 gadget controller. Note on some Cherry Trail systems there is ACPI/AML code listening to edge interrupts on the id-pin (through

[PATCH v6 00/12] USB Type-C device-connection, mux and switch support

2018-03-02 Thread Hans de Goede
Hi All, Here is version 6 of Heikki's and my USB Type-C device-connection, mux and switch support series. Versions 2 - 5 bring various small code and style fixes based on review (no major changes). Version 6 is rebased on top of the latest usb-next and brings one small but important code fix in

Re: [PATCH] usb: Don't disable Latency tolerance Messaging (LTM) before port reset

2018-03-02 Thread Mathias Nyman
On 01.03.2018 20:07, Alan Stern wrote: On Thu, 1 Mar 2018, Mathias Nyman wrote: Disabing Latency Tolerance Messaging before port reset is unnecessary. LTM is automatically disabled at port reset. If host can't communicate with the device the LTM message will fail, and the hub driver will

Re: [PATCH v5 12/12] extcon: axp288: Set USB role where necessary

2018-03-02 Thread Hans de Goede
Hi, On 02-03-18 01:39, Chanwoo Choi wrote: Hi, Basically, I have no objection. But I'll reply the my ack tag after finishing the review of 'devcon and usb_role_switch' from USB maintainer. And I have a question. Before this patch, extcon-axp288 is used to detect charger connector and

Re: [PATCHv2] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-02 Thread Kishon Vijay Abraham I
Hi Tony, On Thursday 01 March 2018 09:20 AM, Tony Lindgren wrote: > Let's add support for the GPIO controlled USB PHY on the MDM6600 modem. > It is used on some Motorola Mapphone series of phones and tablets such > as Droid 4. Generally PHY configuration is done for the PHYs that is connected to