[PATCH 03/21] usb: ulpi: Avoid reading/writing in device creation with OF devices

2016-06-26 Thread Stephen Boyd
ULPI devices are matched up against ULPI drivers by reading the vendor id and product id registers in the ULPI address space. Before we try to read those registers we'll do a scratch write to test the interface. Unfortunately, this doesn't work well if the ULPI device is not powered at the time of

[PATCH 12/21] usb: chipidea: msm: Keep device runtime enabled

2016-06-26 Thread Stephen Boyd
Sometimes the usb wrapper device is part of a power domain that needs to stay on as long as the device is active. Let's get and put the device in driver probe/remove so that we keep the power domain powered as long as the device is attached. We can fine tune this later to handle wakeup interrupts,

[PATCH 14/21] usb: chipidea: msm: Add proper clk and reset support

2016-06-26 Thread Stephen Boyd
The msm chipidea controller uses two main clks, an AHB clk to read/write the MMIO registers and a core clk called the system clk that drives the controller itself. Add support for these clks as they're required in all designs. Also add support for an optional third clk that we need to turn on to r

[PATCH 13/21] usb: chipidea: msm: Allow core to get usb phy

2016-06-26 Thread Stephen Boyd
The chipidea core gets the usb phy and initializes the phy at the right point now so we don't need to get the phy in this driver. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/ci_hdrc_msm.c | 21 - 1 file changed, 21 deletions(-)

[PATCH 11/21] usb: chipidea: msm: Use hw_write_id_reg() instead of writel directly

2016-06-26 Thread Stephen Boyd
The MSM_USB_BASE macro trick is not very clear, and we're using it for only one register write so let's just move to using hw_write_id_reg() and passing the ci pointer instead. That clearly shows what offset we're using and avoids needing to include the msm_hsusb_hw.h file when we're going to delet

[PATCH 21/21] phy: Add support for Qualcomm's USB HS phy

2016-06-26 Thread Stephen Boyd
The high-speed phy on qcom SoCs is controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hs-phy.txt| 71 ++ drivers/phy/Kconfig| 8 + drivers/phy/Makefile

[PATCH 08/21] usb: chipidea: Kick OTG state machine for AVVIS with vbus extcon

2016-06-26 Thread Stephen Boyd
Force the OTG state machine to go forward when we're using an extcon for vbus detection. In this case, the controller may never raise an interrupt for AVVIS, so we need to simulate the event by toggling the appropriate OTG fsm bits and kicking the state machine again. Cc: Peter Chen Cc: Greg Kroa

[PATCH 10/21] usb: chipidea: msm: Rely on core to override AHBBURST

2016-06-26 Thread Stephen Boyd
The core framework already handles setting this parameter with a platform quirk. Add the appropriate flag so that we always set AHBBURST to 0. Technically DT should be doing this, but we always do it for msm chipidea devices so setting the flag in the driver works just as well. Cc: Peter Chen Cc:

[PATCH 07/21] usb: chipidea: Notify of reset when switching into host mode

2016-06-26 Thread Stephen Boyd
The chipidea/udc.c file sends a CI_HDRC_CONTROLLER_RESET_EVENT to the wrapper drivers when it calls hw_device_reset(), but that function is not called from chipidea/host.c. The intent of this event is to allow the wrapper driver to do any wrapper specific things after the reset bit has been set in

[PATCH 09/21] usb: chipidea: Add support for ULPI PHY bus

2016-06-26 Thread Stephen Boyd
Some phys for the chipidea controller are controlled via the ULPI viewport. Add support for the ULPI bus so that these sorts of phys can be probed and read/written automatically without having to duplicate the viewport logic in each phy driver. Cc: Peter Chen Cc: Greg Kroah-Hartman Cc: Heikki Kr

[PATCH 17/21] usb: chipidea: msm: Make platform data driver local instead of global

2016-06-26 Thread Stephen Boyd
If two devices are probed with this same driver, they'll share the same platform data structure, while the chipidea core layer writes and modifies it. This can lead to interesting results especially if one device is an OTG type chipidea controller and another is a host. Let's create a copy of this

[PATCH 18/21] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-06-26 Thread Stephen Boyd
The MSM chipidea wrapper has two bits that are used to reset the first or second phy. Add support for these bits via the reset controller framework, so that phy drivers can reset their hardware at the right time during initialization. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen

[PATCH 19/21] usb: chipidea: msm: Be silent on probe defer errors

2016-06-26 Thread Stephen Boyd
If something fails in ci_hdrc_add_device() due to probe defer, we shouldn't print an error message. Be silent in this case as we'll try probe again later. Cc: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd --- drivers/usb/chipidea/ci_hdrc_msm.c | 3 ++- 1 file changed, 2 inserti

[PATCH 06/21] usb: chipidea: Initialize and reinitialize phy later

2016-06-26 Thread Stephen Boyd
The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Move the phy initialization to a later point, and shut it down outside of driver remove so that the phy state is prop

[PATCH 04/21] usb: chipidea: Only read/write OTGSC from one place

2016-06-26 Thread Stephen Boyd
With the id and vbus detection done via extcon we need to make sure we poll the status of OTGSC properly by considering what the extcon is saying, and not just what the register is saying. Let's move this hw_wait_reg() function to the only place it's used and simplify it for polling the OTGSC regis

[PATCH 20/21] phy: Add support for Qualcomm's USB HSIC phy

2016-06-26 Thread Stephen Boyd
The HSIC USB controller on qcom SoCs has an integrated all digital phy controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hsic-phy.txt | 60 drivers/phy/Kconfig| 7 +

[PATCH 05/21] usb: chipidea: Handle extcon events properly

2016-06-26 Thread Stephen Boyd
We're currently emulating the vbus and id interrupts in the OTGSC read API, but we also need to make sure that if we're handling the events with extcon that we don't enable the interrupts for those events in the hardware. Therefore, properly emulate this register if we're using extcon, but don't en

[PATCH 02/21] usb: ulpi: Support device discovery via DT

2016-06-26 Thread Stephen Boyd
The qcom HSIC ulpi phy doesn't have any bits set in the vendor or product id ulpi registers. This makes it impossible to make a ulpi driver match against the id registers. Add support to discover the ulpi phys via DT to help alleviate this problem. We'll look for a ulpi bus node underneath the devi

[PATCH 15/21] usb: chipidea: msm: Mux over secondary phy at the right time

2016-06-26 Thread Stephen Boyd
We need to pick the correct phy at runtime based on how the SoC has been wired onto the board. If the secondary phy is used, take it out of reset and mux over to it by writing into the TCSR register. Make sure to do this on reset too, because this register is reset to the default value (primary phy

[PATCH 16/21] usb: chipidea: msm: Restore wrapper settings after reset

2016-06-26 Thread Stephen Boyd
When the RESET bit is set in the USBCMD register it resets quite a few of the wrapper's registers to their reset state. This includes the GENCONFIG and GENCONFIG2 registers. Currently this is done by the usb phy and ehci-msm drivers writing into the controller wrapper's MMIO address space. Let's co

[PATCH 00/21] Support qcom's HSIC USB and rewrite USB2 HS phy support

2016-06-26 Thread Stephen Boyd
The state of USB ChipIdea support on Qualcomm's platforms is not great. The DT description of these devices requires up to three different nodes for what amounts to be the same hardware block, when there should really only be one. Furthermore, the "phy" driver that is in mainline (phy-msm-usb.c) du

[PATCH 01/21] of: device: Support loading a module with OF based modalias

2016-06-26 Thread Stephen Boyd
In the case of ULPI devices, we want to be able to load the driver before registering the device so that we don't get stuck in a loop waiting for the phy module to appear and failing usb controller probe. Currently we request the ulpi module via the ulpi ids, but in the DT case we might need to req

[PATCH 1/1] usb: dwc2: add printf attribute to cat_printf()

2016-06-26 Thread Nicolas Iooss
As cat_printf() uses printf format strings in its parameters, adding __printf attribute allows the compiler to detect at compile-time some errors related to format strings (with -Wformat warning flag). Signed-off-by: Nicolas Iooss --- drivers/usb/dwc2/hcd_queue.c | 3 ++- 1 file changed, 2 inser

Re: [PATCH] usb: ohci-at91: make at91_dt_syscon_sfr static

2016-06-26 Thread Greg Kroah-Hartman
On Fri, Jun 17, 2016 at 04:11:55PM +0100, Ben Dooks wrote: > Make at91_dt_syscon_sfr() static as it is not used or declared > outside the drivers/usb/host/ohci-at91.c file. > > drivers/usb/host/ohci-at91.c:144:15: warning: symbol 'at91_dt_syscon_sfr' was > not declared. Should it be static? > >

Re: [PATCH 00/10] musb patches for v4.8-rc1

2016-06-26 Thread Greg KH
On Fri, Jun 17, 2016 at 12:50:10PM -0500, Bin Liu wrote: > Hi Greg, > > On Fri, Jun 17, 2016 at 12:31:59PM -0500, Bin Liu wrote: > > Hi Greg, > > > > This musb patch set is for next v4.8. It adds tracepoints to musb drivers > > to help debugging. > > > > The patches have been on linux-usb@ list

Re: [PATCH 18/21] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-06-26 Thread kbuild test robot
Hi, [auto build test ERROR on peter.chen-usb/ci-for-usb-next] [also build test ERROR on v4.7-rc5 next-20160624] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Stephen-Boyd/Support-qcom-s-HSIC-US

Re: [PATCH 02/21] usb: ulpi: Support device discovery via DT

2016-06-26 Thread kbuild test robot
Hi, [auto build test ERROR on peter.chen-usb/ci-for-usb-next] [also build test ERROR on v4.7-rc5 next-20160624] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Stephen-Boyd/Support-qcom-s-HSIC-US

Re: [PATCH 18/21] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-06-26 Thread kbuild test robot
Hi, [auto build test ERROR on peter.chen-usb/ci-for-usb-next] [also build test ERROR on v4.7-rc5 next-20160624] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Stephen-Boyd/Support-qcom-s-HSIC-US

[PATCH net-next 6/6] r8152: add byte_enable for ocp_read_word function

2016-06-26 Thread Hayes Wang
Add byte_enable for ocp_read_word() to replace reading 4 bytes data with reading the desired 2 bytes data. This is used to avoid the issue which is described in commit:b4d99def. The origin method always reads 4 bytes data, and it may have problem when reading the PHY regiters. The new method is s

[PATCH net-next 1/6] r8152: add aldps_enable for rtl_ops

2016-06-26 Thread Hayes Wang
Add aldps_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 11178f9..b253003 100644 --- a/drivers/net/usb/r8152.c +++ b/drive

[PATCH net-next 5/6] r8152: support RTL8153B

2016-06-26 Thread Hayes Wang
Support new chip RTL8153B. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 560 +--- 1 file changed, 533 insertions(+), 27 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3ccbff0..2fd4944 100644 --- a/drivers/

[PATCH net-next 2/6] r8152: add u1u2_enable for rtl_ops

2016-06-26 Thread Hayes Wang
Add u1u2_enable() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index b253003..f51d799 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/u

[PATCH net-next 3/6] r8152: add power_cut_en for rtl_ops

2016-06-26 Thread Hayes Wang
Add power_cut_en() for rtl_ops. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index f51d799..a4f8a01 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/

[PATCH net-next 4/6] r8152: support the new chip 8050

2016-06-26 Thread Hayes Wang
Support a new chip which has the product ID 0x8050. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index a4f8a01..3ccbff0 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/u

[PATCH net-next 0/6] r8152: support new chips

2016-06-26 Thread Hayes Wang
In order to support new chips, adjust some codes. Then, add the settings for the new chips. Hayes Wang (6): r8152: add aldps_enable for rtl_ops r8152: add u1u2_enable for rtl_ops r8152: add power_cut_en for rtl_ops r8152: support the new chip 8050 r8152: support RTL8153B r8152: add byt