Re: [PATCH v4 0/7] da8xx USB PHY (was da8xx USB clocks)

2016-05-04 Thread David Lechner
On 04/14/2016 01:35 PM, David Lechner wrote: The "da8xx USB clocks" patch series was growing a bit too big, so on the advice of Sekhar Nori, I am splitting it into two parts. This part contains everything in drivers/ and the other part will contain everything in arch/arm/mach-davi

Re: [PATCH v4 3/7] phy: Add set_mode callback

2016-05-04 Thread David Lechner
On 05/04/2016 01:10 PM, Bin Liu wrote: Hi, On Thu, Apr 14, 2016 at 01:35:14PM -0500, David Lechner wrote: The initial use for this is for PHYs that have a mode related to USB OTG. There are several SoCs (e.g. TI OMAP and DA8xx) that have a mode setting in the USB PHY to override OTG VBUS and

Re: [PATCH v4 3/7] phy: Add set_mode callback

2016-05-04 Thread David Lechner
On 05/04/2016 01:39 PM, Bin Liu wrote: Have you already tested this? I never tried changing mode via sysfs, but by quickly reviewing the code, I am wondering how it works. the core only calls ops->set_mode() but nothing else. To really switch the mode, the driver has to talk to the root hub, and

Re: [PATCH v4 3/7] phy: Add set_mode callback

2016-05-09 Thread David Lechner
On 05/04/2016 01:39 PM, Bin Liu wrote: On Wed, May 04, 2016 at 01:20:36PM -0500, David Lechner wrote: This is something I actually plan on using because the device I am using (LEGO MINDSTORMS EV3) is not wired for OTG, so the callback is needed to override the ID and VBUS signals when switching

[PATCH v5 4/7] phy: da8xx-usb: new driver for DA8xx SoC USB PHY

2016-05-09 Thread David Lechner
This is a new phy driver for the SoC USB controllers on the TI DA8xx family of microcontrollers. The USB 1.1 PHY is just a simple on/off. The USB 2.0 PHY also allows overriding the VBUS and ID pins. Signed-off-by: David Lechner --- drivers/phy/Kconfig | 10 ++ drivers/phy/Makefile

[PATCH v5 7/7] usb: musb: da8xx: Remove mach code

2016-05-09 Thread David Lechner
Use the new phy-da8xx-usb driver to take the place of the mach code that pokes CFGCHIP2 in the da8xx musb glue driver. This unbreaks the driver. Signed-off-by: David Lechner --- drivers/usb/musb/Kconfig | 2 +- drivers/usb/musb/da8xx.c | 135 ++- 2

[PATCH v5 6/7] usb: musb: da8xx: Use devm in probe

2016-05-09 Thread David Lechner
Simplify things a bit by using devm functions where possible. Signed-off-by: David Lechner --- drivers/usb/musb/da8xx.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index b03d3b8..0c1997c 100644

[PATCH v5 1/7] mfd: da8xx-cfgchip: New header file for CFGCHIP registers.

2016-05-09 Thread David Lechner
they didn't really belong there anyway. Signed-off-by: David Lechner Acked-by: Lee Jones --- include/linux/mfd/da8xx-cfgchip.h | 153 ++ include/linux/platform_data/usb-davinci.h | 22 - 2 files changed, 153 insertions(+), 22 deletions(-) create

[PATCH v5 5/7] usb: ohci-da8xx: Remove code that references mach

2016-05-09 Thread David Lechner
Including mach/* is frowned upon in device drivers, so get rid of it. This replaces usb20_clk and code that pokes CFGCHIP2 with a proper phy driver. Signed-off-by: David Lechner Acked-by: Alan Stern --- drivers/usb/host/Kconfig | 1 + drivers/usb/host/ohci-da8xx.c | 102

[PATCH v5 3/7] phy: Add set_mode callback

2016-05-09 Thread David Lechner
. Suggested-by: Kishon Vijay Abraham I Signed-off-by: David Lechner --- drivers/phy/phy-core.c | 15 +++ include/linux/phy/phy.h | 17 + 2 files changed, 32 insertions(+) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index e7e574d..fe0344c 100644 --- a

[PATCH v5 2/7] dt-bindings: Add bindings for phy-da8xx-usb

2016-05-09 Thread David Lechner
Device tree binding for new phy-da8xx-usb driver. Signed-off-by: David Lechner Acked-by: Rob Herring --- .../devicetree/bindings/phy/phy-da8xx-usb.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-da8xx-usb.txt

[PATCH v5 0/7] da8xx USB PHY (was da8xx USB clocks)

2016-05-09 Thread David Lechner
v5 changes: Functionally, nothing has really changed. Just some cleanups based on feedback. * Renamed "usbphy" to "usb_phy" or "usb-phy" as appropriate * License header matches MODULE_LICENSE in new phy driver David Lechner (7): mfd: da8xx-cfgchip: New header fi

[PATCH v5 0/5] da8xx USB PHY platform devices and clocks (was "da8xx UBS clocks")

2016-05-09 Thread David Lechner
v5 changes: renamed "usbphy" to "usb_phy" or "usb-phy" as appropriate David Lechner (5): ARM: davinci: da8xx: add usb phy clocks ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration. ARM: davinci: da8xx: Add USB PHY platform declaration ARM: DTS:

[PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.

2016-05-09 Thread David Lechner
The CFGCHIP registers are used by a number of devices, so using a syscon device to share them. The first consumer of this will by the phy-da8xx-usb driver. Signed-off-by: David Lechner --- arch/arm/mach-davinci/board-da830-evm.c | 4 arch/arm/mach-davinci/board-da850-evm.c | 4

[PATCH v5 5/5] ARM: DTS: da850: Add usb phy node

2016-05-09 Thread David Lechner
Add a node for the new usb phy driver. Signed-off-by: David Lechner --- arch/arm/boot/dts/da850.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 9546ace..b2ebbe5 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch

[PATCH v5 4/5] ARM: DTS: da850: Add cfgchip syscon node

2016-05-09 Thread David Lechner
Add a syscon node for the SoC CFGCHIPn registers. This is needed for the new usb phy driver. Signed-off-by: David Lechner --- arch/arm/boot/dts/da850.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index cf1aad8..9546ace

[PATCH v5 1/5] ARM: davinci: da8xx: add usb phy clocks

2016-05-09 Thread David Lechner
replaced with the new clock registration functions. Signed-off-by: David Lechner --- arch/arm/mach-davinci/board-da830-evm.c | 22 ++- arch/arm/mach-davinci/board-omapl138-hawk.c | 16 +- arch/arm/mach-davinci/include/mach/da8xx.h | 3 + arch/arm/mach-davinci/usb-da8xx.c | 219

[PATCH v5 3/5] ARM: davinci: da8xx: Add USB PHY platform declaration

2016-05-09 Thread David Lechner
There is now a proper phy driver for the DA8xx SoC USB PHY. This adds the platform device declarations needed to use it. Signed-off-by: David Lechner --- arch/arm/mach-davinci/board-da830-evm.c | 28 +--- arch/arm/mach-davinci/board-omapl138-hawk.c | 5 + arch

Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.

2016-05-10 Thread David Lechner
On 05/10/2016 06:26 AM, Sergei Shtylyov wrote: On 5/10/2016 2:46 AM, David Lechner wrote: The CFGCHIP registers are used by a number of devices, so using a syscon device to share them. The first consumer of this will by the phy-da8xx-usb driver. Signed-off-by: David Lechner [...] diff

Re: [PATCH v5 0/5] da8xx USB PHY platform devices and clocks (was "da8xx UBS clocks")

2016-05-23 Thread David Lechner
On 05/09/2016 06:46 PM, David Lechner wrote: v5 changes: renamed "usbphy" to "usb_phy" or "usb-phy" as appropriate David Lechner (5): ARM: davinci: da8xx: add usb phy clocks ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration. ARM: davinc

Re: [PATCH v5 3/7] phy: Add set_mode callback

2016-06-22 Thread David Lechner
On 06/22/2016 12:57 AM, Kishon Vijay Abraham I wrote: Hi, On Tuesday 10 May 2016 05:09 AM, David Lechner wrote: The initial use for this is for PHYs that have a mode related to USB OTG. There are several SoCs (e.g. TI OMAP and DA8xx) that have a mode setting in the USB PHY to override OTG VBUS

Re: [PATCH v5 4/7] phy: da8xx-usb: new driver for DA8xx SoC USB PHY

2016-06-22 Thread David Lechner
From 2261f0ea15690623dcefd71b8aaaea6089b16468 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 16 Mar 2016 14:16:08 -0500 Subject: [PATCH] phy: da8xx-usb: new driver for DA8xx SoC USB PHY This is a new phy driver for the SoC USB controllers on the TI DA8xx family of microcontrollers. The

Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.

2016-06-22 Thread David Lechner
From b0ae5eeba849b49f82980218a374c6d3f06487b8 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 24 Mar 2016 01:38:54 -0500 Subject: [PATCH] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration. The CFGCHIP registers are used by a number of devices, so using a syscon device to

Re: [PATCH v5 3/5] ARM: davinci: da8xx: Add USB PHY platform declaration

2016-06-22 Thread David Lechner
From 53c9b38e0a7860e51ce7bdfe6d4f1d83cf2394a5 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 16 Mar 2016 14:25:23 -0500 Subject: [PATCH] ARM: davinci: da8xx: Add USB PHY platform declaration There is now a proper phy driver for the DA8xx SoC USB PHY. This adds the platform device

Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.

2016-06-22 Thread David Lechner
On 05/25/2016 06:15 AM, Sekhar Nori wrote: On Tuesday 10 May 2016 10:14 PM, David Lechner wrote: On 05/10/2016 06:26 AM, Sergei Shtylyov wrote: On 5/10/2016 2:46 AM, David Lechner wrote: The CFGCHIP registers are used by a number of devices, so using a syscon device to share them. The first

Re: [PATCH v5 4/7] phy: da8xx-usb: new driver for DA8xx SoC USB PHY

2016-06-22 Thread David Lechner
This is a new phy driver for the SoC USB controllers on the TI DA8xx family of microcontrollers. The USB 1.1 PHY is just a simple on/off. The USB 2.0 PHY also allows overriding the VBUS and ID pins. Signed-off-by: David Lechner Reviewed-by: Sekhar Nori --- Just one small change here. Changed

Re: [PATCH v5 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.

2016-06-24 Thread David Lechner
Re: USB needing fixed, I'm not sure how to do this and I won't have time for at least the next 2 or 3 months to do anything about it. The problem is that the MUSB can't detect the ID pin. As a workaround, it is detecting the VBUS state and using that to determine the ID pin state. So, when you at

Re: [v5,1/5] USB: ohci: da8xx: use ohci priv data instead of globals

2016-11-19 Thread David Lechner
if (PTR_ERR(da8xx_ohci->usb11_phy) != -EPROBE_DEFER) dev_err(&pdev->dev, "Failed to get phy.\n"); - return PTR_ERR(usb11_phy); + error = PTR_ERR(da8xx_ohci->usb11_phy); + goto err; } same here ... Tested-by: D

Re: [v5,3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-19 Thread David Lechner
On 11/14/2016 08:41 AM, ahas...@baylibre.com wrote: Using a regulator to handle VBUS will eliminate the need for platform data and callbacks, and make the driver more generic allowing different types of regulators to handle VBUS. The regulator equivalents to the platform callbacks are: set_p

Re: [v5,3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-19 Thread David Lechner
On 11/19/2016 09:31 PM, David Lechner wrote: On 11/14/2016 08:41 AM, ahas...@baylibre.com wrote: +ocic_mask |= 1; I thought that a previous patch got rid of all globals. Why is ocic_mask still a global variable? I suppose if I read the commit message, I will know the answer

Re: [PATCH v3 10/10] ARM: dts: da850: add usb device node

2016-11-20 Thread David Lechner
On 11/07/2016 02:39 PM, Axel Haslam wrote: This adds the ohci device node for the da850 soc. It also enables it for the omapl138 hawk board. Signed-off-by: Axel Haslam --- arch/arm/boot/dts/da850-lcdk.dts | 8 arch/arm/boot/dts/da850.dtsi | 8 2 files changed, 16 insertio

Re: [v5,3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-21 Thread David Lechner
On 11/21/2016 04:22 AM, Axel Haslam wrote: Hi David, Thanks for the review, You're welcome. @@ -160,15 +212,41 @@ static void ohci_da8xx_ocic_handler(struct da8xx_ohci_root_hub *hub, hub->set_power(port, 0); } +static int ohci_da8xx_regulator_event(struct notifier_block *

Re: [PATCH v6 3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-22 Thread David Lechner
On 11/21/2016 10:30 AM, Axel Haslam wrote: Using a regulator to handle VBUS will eliminate the need for platform data and callbacks, and make the driver more generic allowing different types of regulators to handle VBUS. The regulator equivalents to the platform callbacks are: set_power ->

Re: [PATCH v6 1/5] USB: ohci: da8xx: use ohci priv data instead of globals

2016-11-22 Thread David Lechner
pointer. This will be moved on a later patch. Signed-off-by: Axel Haslam --- Looks good to me (other than the spelling error above). Tested-by: David Lechner -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kerne

Re: [PATCH v6 3/5] USB: ohci: da8xx: Allow a regulator to handle VBUS

2016-11-22 Thread David Lechner
On 11/22/2016 02:46 PM, Axel Haslam wrote: On Tue, Nov 22, 2016 at 9:37 PM, David Lechner wrote: On 11/21/2016 10:30 AM, Axel Haslam wrote: Using a regulator to handle VBUS will eliminate the need for platform data and callbacks, and make the driver more generic allowing different types of

[PATCH] Revert "usb: gadget: f_hid: use alloc_ep_req()"

2017-01-02 Thread David Lechner
This reverts commit ba1582f22231821c57534e87b077d84adbc15dbd. I am getting a null pointer dereference when setting up an hid gadget using configfs. Reverting this commit fixes the crash. dmesg: [ 382.406622] Unable to handle kernel NULL pointer dereference at virtual address 0002 [ 382.40

[PATCH] usb: gadget: Fix copy/pasted error message

2017-01-02 Thread David Lechner
This fixes an error message that was probably copied and pasted. The same message is used for both the in and out endpoints, so it makes it impossible to know which one actually failed because both cases say "IN". Make the out endpoint error message say "OUT". Signed-o

Re: [PATCH 3/3] ARM: dts: da850: Enable cppi41 dma for da850-lcdk

2017-01-09 Thread David Lechner
On 01/09/2017 10:24 AM, Alexandre Bailon wrote: This enable the cppi41 dma controller used by the usb otg for the da850-lcdk board. Signed-off-by: Alexandre Bailon --- arch/arm/boot/dts/da850-lcdk.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/ar

Re: [PATCH 1/3] ARM: dts: da850: Add the cppi41 dma node

2017-01-10 Thread David Lechner
On 01/09/2017 12:26 PM, Sergei Shtylyov wrote: Hello. On 01/09/2017 07:24 PM, Alexandre Bailon wrote: This adds the device tree node for the cppi41 dma used by the usb otg controller present in the da850 family of SoC's. Signed-off-by: Alexandre Bailon --- arch/arm/boot/dts/da850.dtsi | 16

Re: [PATCH 4/4] usb: gadget: f_hid: fix: Move IN request allocation to set_alt()

2017-01-20 Thread David Lechner
fixes a crash I was experiencing in the v4.9.4 kernel caused by "usb: gadget: f_hid: use alloc_ep_req()"[1]. Thank you! [1]: http://lkml.iu.edu/hypermail/linux/kernel/1701.0/00575.html Tested-by: David Lechner -- To unsubscribe from this list: send the line "unsubscribe lin

Re: [PATCH v6 1/3] usb: ohci-da8xx: Remove code that references mach

2016-10-04 Thread David Lechner
On 10/04/2016 08:38 AM, Greg Kroah-Hartman wrote: On Tue, Oct 04, 2016 at 11:18:03AM +0200, Kevin Hilman wrote: Hi Greg, On Mon, Sep 5, 2016 at 10:00 PM, David Lechner wrote: Including mach/* is frowned upon in device drivers, so get rid of it. This replaces usb20_clk and code that pokes

Re: [PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle interrupt in the driver

2016-10-10 Thread David Lechner
On 10/07/2016 11:42 AM, ahas...@baylibre.com wrote: From: Axel Haslam Currently requesting the vbus and overcurrent gpio is handled on the board specific file. But this does not play well moving to device tree. In preparation to migrate to a device tree boot, handle requesting gpios and overcu

Re: [PATCH/RFT 08/12] ARM: davinci: register the usb20_phy clock on the SoC file

2016-10-10 Thread David Lechner
On 10/07/2016 11:42 AM, ahas...@baylibre.com wrote: From: Axel Haslam The usb20_phy clock needs to be registered for the driver to be able to get and enable a clock. Currently the usb phy clocks are registered form board files, which will not be called during a device tree based boot. To be ab

Re: [PATCH/RFT 09/12] usb: host: ohci-da8xx: Add devicetree bindings documentation

2016-10-10 Thread David Lechner
On 10/07/2016 11:42 AM, ahas...@baylibre.com wrote: From: Axel Haslam This patch documents the device tree bindings required for the ohci controller found in TI da8xx family of SoC's Signed-off-by: Axel Haslam --- .../devicetree/bindings/usb/ohci-da8xx.txt | 32 ++

Re: [PATCH/RFT 07/12] USB: ohci-da8xx: Request gpios and handle interrupt in the driver

2016-10-12 Thread David Lechner
On 10/12/2016 10:01 AM, Axel Haslam wrote: I agree that we should use a regulator for the vbus power. i will make that change. However, im not so sure about using the regulator for the overcurrent handling. There seems to be no other driver doing this, and as you mention, we would need to chang

Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver

2016-10-24 Thread David Lechner
On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Manjunath Goudar Separate the Davinci OHCI host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11.

Re: [PATCH/RFT v2 17/17] ARM: dts: da850: add usb device node

2016-10-24 Thread David Lechner
On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Axel Haslam This adds the usb (ohci) device node for the da850 soc. Also it enables it for the lcdk board Signed-off-by: Axel Haslam --- arch/arm/boot/dts/da850-lcdk.dts | 8 arch/arm/boot/dts/da850.dtsi | 8 2 f

Re: [PATCH/RFT v2 16/17] USB: ohci-da8xx: Allow probing from DT

2016-10-24 Thread David Lechner
On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Axel Haslam This adds the compatible string to the ohci driver to be able to probe from DT Signed-off-by: Axel Haslam --- drivers/usb/host/ohci-da8xx.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/host/ohci-

Re: [PATCH/RFT v2 15/17] usb: host: ohci-da8xx: Add devicetree bindings documentation

2016-10-24 Thread David Lechner
On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Axel Haslam This patch documents the device tree bindings required for the ohci controller found in TI da8xx family of SoC's Signed-off-by: Axel Haslam --- .../devicetree/bindings/usb/ohci-da8xx.txt | 39 ++

Re: [PATCH/RFT v2 13/17] USB: da8xx: use ohci priv data instead of globals

2016-10-24 Thread David Lechner
On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Axel Haslam > static const struct ohci_driver_overrides da8xx_overrides __initconst = { - .reset = ohci_da8xx_reset + .reset = ohci_da8xx_reset, + .extra_priv_size = sizeof(struct da8xx_ohci_hcd), ni

Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent

2016-10-24 Thread David Lechner
On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Axel Haslam Currently, the da8xx ohci driver uses a set of gpios and callbacks in board files to handle vbus and overcurrent irqs form the power supply. However, this does not play nice when moving to a DT based boot were we wont have bo

Re: [PATCH/RFT v2 07/17] ARM: davinci: da8xx: Enable the usb20 "per" clk on phy_clk_enable

2016-10-24 Thread David Lechner
On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Axel Haslam While probing ochi phy with usb20 phy as a parent clock for usb11_phy, the usb20_phy clock enable would time out. This is because the usb20 module clock needs to enabled while trying to lock the usb20_phy PLL. Call clk enabl

Re: [PATCH/RFT v2 02/17] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration.

2016-10-25 Thread David Lechner
Hi Sekhar, On 10/25/2016 05:17 AM, Sekhar Nori wrote: On Tuesday 25 October 2016 03:07 PM, Axel Haslam wrote: Hi Sekar, On Tue, Oct 25, 2016 at 10:10 AM, Sekhar Nori wrote: On Monday 24 October 2016 10:16 PM, ahas...@baylibre.com wrote: From: David Lechner The CFGCHIP registers are used

Re: [PATCH/RFT v2 07/17] ARM: davinci: da8xx: Enable the usb20 "per" clk on phy_clk_enable

2016-10-25 Thread David Lechner
On 10/25/2016 05:12 AM, Sekhar Nori wrote: On Monday 24 October 2016 10:16 PM, ahas...@baylibre.com wrote: diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c index 9e41a7f..982e105 100644 --- a/arch/arm/mach-davinci/usb-da8xx.c +++ b/arch/arm/mach-davinci/usb-da8

Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver

2016-10-25 Thread David Lechner
On 10/25/2016 02:39 AM, Axel Haslam wrote: On Tue, Oct 25, 2016 at 2:38 AM, David Lechner wrote: On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: -#ifndef CONFIG_ARCH_DAVINCI_DA8XX -#error "This file is DA8xx bus glue. Define CONFIG_ARCH_DAVINCI_DA8XX." -#endif +#inclu

Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver

2016-10-25 Thread David Lechner
On 10/25/2016 11:21 AM, Axel Haslam wrote: On Tue, Oct 25, 2016 at 6:12 PM, David Lechner wrote: On 10/25/2016 02:39 AM, Axel Haslam wrote: On Tue, Oct 25, 2016 at 2:38 AM, David Lechner wrote: On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: -#ifndef CONFIG_ARCH_DAVINCI_DA8XX

Re: [PATCH/RFT v2 12/17] USB: ochi-da8xx: Use a regulator for vbus/overcurrent

2016-10-25 Thread David Lechner
On 10/25/2016 03:24 AM, Axel Haslam wrote: On Tue, Oct 25, 2016 at 3:39 AM, David Lechner wrote: On 10/24/2016 11:46 AM, ahas...@baylibre.com wrote: From: Axel Haslam Currently, the da8xx ohci driver uses a set of gpios and callbacks in board files to handle vbus and overcurrent irqs form

[PATCH] usb: musb: da8xx: Don't print phy error on -EPROBE_DEFER

2016-10-25 Thread David Lechner
This suppresses printing the error message "failed to get phy" in the kernel log when the error is -EPROBE_DEFER. This prevents usless noise in the kernel log. Signed-off-by: David Lechner --- drivers/usb/musb/da8xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 1/3] usb: musb: da8xx: Call earlier clk_prepare_enable()

2016-10-25 Thread David Lechner
On 10/25/2016 08:52 AM, Alexandre Bailon wrote: The first attempt to read a register may fail because the clock may not be enabled, and then the probe of musb driver will fail. Call clk_prepare_enable() before the first register read. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/da8xx.

Re: [PATCH 2/3] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-10-25 Thread David Lechner
On 10/25/2016 08:52 AM, Alexandre Bailon wrote: If we configure the da8xx OTG phy in OTG mode, neither device or host mode will work. That is because the PHY is not able to detect and notify the driver that value of ID pin changed. To work despite this hardware limitation, the da8xx glue implemen

Re: [PATCH 4/4] ARM: dts: da850: Add the usb otg device node

2016-10-25 Thread David Lechner
On 10/25/2016 09:39 AM, Alexandre Bailon wrote: This adds the device tree node for the usb otg controller present in the da850 family of SoC's. This also enables the otg usb controller for the lcdk board. Signed-off-by: Alexandre Bailon --- arch/arm/boot/dts/da850-lcdk.dts | 8 arch/

Re: [PATCH v2 2/3] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-10-26 Thread David Lechner
On 10/26/2016 05:58 AM, Alexandre Bailon wrote: If we configure the da8xx OTG phy in OTG mode, neither device or host mode will work. That is because the PHY is not able to detect and notify the driver that value of ID pin changed. To work despite this hardware limitation, the da8xx glue implemen

Re: [PATCH] USB: OHCI: make ohci-da8xx a separate driver

2016-10-26 Thread David Lechner
On 10/26/2016 04:08 PM, ahas...@baylibre.com wrote: +module_exit(ohci_da8xx_exit); +MODULE_DESCRIPTION(DRIVER_DESC); +MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:ohci"); The "ohci" in MODULE_ALIAS() should also be replaced with hcd_name. -- To unsubscribe from this list: send the line "un

Re: [PATCH] USB: OHCI: make ohci-da8xx a separate driver

2016-10-26 Thread David Lechner
[Axel: adapted and rebased, fixed minor comments] Signed-off-by: Axel Haslam --- This is working for me as a module on LEGO MINDSTORMS EV3. Tested-By: David Lechner -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.

Re: [PATCH v2 3/4] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-10-26 Thread David Lechner
ble); #endif + static struct platform_driver da8xx_driver = { .probe = da8xx_probe, .remove = da8xx_remove, .driver = { .name = "musb-da8xx", + .of_match_table = of_match_ptr(da8xx_id_table), }, }; Tested workin

Re: [PATCH v2 2/4] usb: musb: core: added helper function for parsing DT

2016-10-26 Thread David Lechner
s not found or not recognized returns MUSB_OTG + */ +extern enum musb_mode musb_get_mode(struct device *dev); + #endif /* __MUSB_CORE_H__ */ Tested working on LEGO MINDSTORMS EV3 using dr_mode = "peripheral" and no vbus-supply. Tested-By: David Lechner -- To unsubscribe from this

Re: [PATCH v2 0/3] usb: musb: da8xx: Fix few issues

2016-10-27 Thread David Lechner
On 10/26/2016 05:58 AM, Alexandre Bailon wrote: Currently, the USB OTG of the da8xx doesn't work. This series intend to fix them. Change in v2: * Fix the error path da8xx_musb_init() Alexandre Bailon (3): usb: musb: da8xx: Call earlier clk_prepare_enable() phy: da8xx-usb: Configure CFGCHIP2

Re: [PATCH v2 0/3] usb: musb: da8xx: Fix few issues

2016-10-27 Thread David Lechner
On 10/27/2016 12:16 PM, David Lechner wrote: On 10/26/2016 05:58 AM, Alexandre Bailon wrote: Currently, the USB OTG of the da8xx doesn't work. This series intend to fix them. Change in v2: * Fix the error path da8xx_musb_init() Alexandre Bailon (3): usb: musb: da8xx: Call ea

Re: [PATCH v2 3/3] usb: musb: da8xx: Only execute the OTG workaround when phy in OTG mode

2016-10-27 Thread David Lechner
On 10/26/2016 05:58 AM, Alexandre Bailon wrote: When the phy is forced in host mode, only the first hot plug and hot remove works. That is actually because the driver execute the OTG workaround, whereas it is not applicable in host or device mode. Indeed, to work correctly, the VBUS sense and ses

Re: [PATCH v2 0/3] usb: musb: da8xx: Fix few issues

2016-10-28 Thread David Lechner
On 10/28/2016 04:31 AM, Alexandre Bailon wrote: On 10/27/2016 08:44 PM, David Lechner wrote: On 10/27/2016 12:16 PM, David Lechner wrote: On 10/26/2016 05:58 AM, Alexandre Bailon wrote: Currently, the USB OTG of the da8xx doesn't work. This series intend to fix them. Change in v2: * Fi

Re: [PATCH v2 3/3] usb: musb: da8xx: Only execute the OTG workaround when phy in OTG mode

2016-10-28 Thread David Lechner
On 10/28/2016 07:39 AM, Alexandre Bailon wrote: On 10/28/2016 04:56 AM, David Lechner wrote: On 10/26/2016 05:58 AM, Alexandre Bailon wrote: When the phy is forced in host mode, only the first hot plug and hot remove works. That is actually because the driver execute the OTG workaround

Re: [PATCH 1/3] ARM: davinci: da8xx: Fix ohci driver name

2016-11-02 Thread David Lechner
On 11/02/2016 07:44 AM, Axel Haslam wrote: There is a single instance of the ohci driver, while the clk lookup table is making reference to "ohci" other subsystems (such as phy) are looking for "ohci.0" This patch changes the "device" name, not the "driver" name. You use "driver" above and in

Re: [PATCH 2/3] phy: da8xx-usb: rename the ohci device to ohci-da8xx

2016-11-02 Thread David Lechner
On 11/02/2016 07:44 AM, Axel Haslam wrote: There is only one ohci on the da8xx series of chips, so remove the ".0" when creating the phy. Also add the "-da8xx" postfix to be consistent across davinci usb drivers. It would be more accurate to say that the device name is being changed in the mac

Re: [PATCH 3/3] usb: ohci-da8xx: rename driver to ohci-da8xx

2016-11-02 Thread David Lechner
On 11/02/2016 07:44 AM, Axel Haslam wrote: To be consistent on the usb driver for the davinci platform follow the example of musb, and add the "-da8xx" postfix to the driver name. It is probably worth mentioning that the existing driver name is "ohci" which is a bit too generic. -- To unsub

Re: [PATCH v2 0/3] davinci: ohci: fix usb ohci device name

2016-11-03 Thread David Lechner
" matching. while we are fixing this, rename the driver from "ohci" to "ohci-da8xx" which is less generic and consistent with other usb drivers. changes form v1 -> v2 *Reword commit messages (David Lechner) Because of the recently accepted patches on the ARM-davinci si

Re: [PATCH v3 3/5] dt/bindings: Add a new property to DA8xx USB PHY

2016-11-03 Thread David Lechner
On 11/03/2016 10:26 AM, Alexandre Bailon wrote: The USB PHY is able to operate in OTG, host or peripheral. Some board may be wired to work act only as host or peripheral. In such case, the dr_mode property of controller must be set to host or peripheral. But doing that will also configure the PHY

Re: [PATCH v3 2/5] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-11-03 Thread David Lechner
On 11/03/2016 10:26 AM, Alexandre Bailon wrote: If we configure the da8xx OTG phy in OTG mode, neither device or host mode will work. That is because the PHY is not able to detect and notify the driver that value of ID pin changed. To work despite this hardware limitation, the da8xx glue implemen

Re: [PATCH v3 5/5] usb: musb: da8xx: Remove set_mode callback

2016-11-03 Thread David Lechner
On 11/03/2016 10:26 AM, Alexandre Bailon wrote: The USB PHY is able to operate in OTG, host or peripheral. Some board may be wired to work act only as host or peripheral. In such case, the dr_mode property of controller must be set to host or peripheral. But doing that will also configure the PHY

Re: [PATCH v3 3/5] dt/bindings: Add a new property to DA8xx USB PHY

2016-11-03 Thread David Lechner
On 11/03/2016 12:33 PM, Alexandre Bailon wrote: On 11/03/2016 05:53 PM, David Lechner wrote: On 11/03/2016 10:26 AM, Alexandre Bailon wrote: The USB PHY is able to operate in OTG, host or peripheral. Some board may be wired to work act only as host or peripheral. In such case, the dr_mode

Re: [PATCH v4 3/4] usb: musb: Add a quirk flag to skip the phy set mode

2016-11-04 Thread David Lechner
On 11/04/2016 11:43 AM, Alexandre Bailon wrote: During the init, the driver will use the mode to configure the controller mode and the phy mode. The PHY of DA8xx has some issues when the phy is forced in host or device. Add way to skip the set mode and let the da8xx glue manage the phy mode. I

Re: [PATCH v5 0/5] da8xx USB PHY platform devices and clocks (was "da8xx UBS clocks")

2016-08-19 Thread David Lechner
On 08/19/2016 11:40 AM, Kevin Hilman wrote: David, On Wed, Aug 17, 2016 at 4:35 AM, Kishon Vijay Abraham I wrote: Hi Kevin, On Saturday 13 August 2016 02:54 AM, Kevin Hilman wrote: On Wed, May 25, 2016 at 6:18 AM, Sekhar Nori wrote: On Monday 23 May 2016 08:44 PM, David Lechner wrote

[PATCH v6 2/3] usb: musb: da8xx: Use devm in probe

2016-09-05 Thread David Lechner
Simplify things a bit by using devm functions where possible. Signed-off-by: David Lechner --- drivers/usb/musb/da8xx.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index b03d3b8..0c1997c 100644

[PATCH v6 3/3] usb: musb: da8xx: Remove mach code

2016-09-05 Thread David Lechner
Use the new phy-da8xx-usb driver to take the place of the mach code that pokes CFGCHIP2 in the da8xx musb glue driver. This unbreaks the driver. Signed-off-by: David Lechner --- drivers/usb/musb/Kconfig | 2 +- drivers/usb/musb/da8xx.c | 135 ++- 2

[PATCH v6 0/3] da8xx USB PHY platform devices and clocks

2016-09-05 Thread David Lechner
Just resending to get these merged into usb. The phy parts of this patch series have already been merged into Linus' tree. I have rebased on 4.8-rc5 but there have not been any changes to these since the last time I submitted. David Lechner (3): usb: ohci-da8xx: Remove code that refer

[PATCH v6 1/3] usb: ohci-da8xx: Remove code that references mach

2016-09-05 Thread David Lechner
Including mach/* is frowned upon in device drivers, so get rid of it. This replaces usb20_clk and code that pokes CFGCHIP2 with a proper phy driver. Signed-off-by: David Lechner Acked-by: Alan Stern --- drivers/usb/host/Kconfig | 1 + drivers/usb/host/ohci-da8xx.c | 102

Re: [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver

2016-03-14 Thread David Lechner
On 03/14/2016 02:00 AM, Felipe Balbi wrote: Hi, Petr Kulhavy writes: + - ti,usb2-phy-refclock-hz : Integer. Frequency in Hz of the USB 2.0 PHY reference clock, + either provided by the internal PLL or an external source. + The supported values are: 12MHz, 13MHz, 19.2MHz, 20MHz, 24MHz

[PATCH 0/5] da8xx USB clocks

2016-03-15 Thread David Lechner
e tree bindings for da8xx ohci and musb. David Lechner (4): ARM: davinci: da8xx: add usb phy clocks ARM: davinci: da8xx: add cfgchip2 to resources usb: ohci-da8xx: Remove clock code that references mach usb: musb-da8xx: remove board-specific clock handling Petr Kulhavy (1):

[PATCH 5/5] usb: musb-da8xx: remove board-specific clock handling

2016-03-15 Thread David Lechner
This driver should not have to worry about how the clocks are configured on a system. Added a usb20_phy clock to handle the USB 2.0 PLL clock externally. Also changed to using devm_ to simplify code a bit. Signed-off-by: David Lechner --- drivers/usb/musb/da8xx.c | 93

[PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-15 Thread David Lechner
The usb ohci driver has been change to not include mach/*, so we need to pass the cfgchip2 address to the driver so that it can turn the usb phy on and off. Signed-off-by: David Lechner --- arch/arm/mach-davinci/usb.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach

[PATCH 4/5] usb: ohci-da8xx: Remove clock code that references mach

2016-03-15 Thread David Lechner
clock code. Signed-off-by: David Lechner --- drivers/usb/host/ohci-da8xx.c | 81 --- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index e5c33bc..37fa3fb 100644 --- a/drivers/usb

[PATCH 1/5] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY

2016-03-15 Thread David Lechner
From: Petr Kulhavy Only few MUSB PHY reference clock frequencies were defined. This patch defines macros for the missing frequencies: 19.2MHz, 38.4MHz, 13MHz, 26MHz, 20MHz, 40MHz Signed-off-by: Petr Kulhavy . Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu --- include/linux/platform_data/us

[PATCH 2/5] ARM: davinci: da8xx: add usb phy clocks

2016-03-15 Thread David Lechner
-off-by: David Lechner --- arch/arm/mach-davinci/board-da830-evm.c | 12 --- arch/arm/mach-davinci/board-omapl138-hawk.c | 7 -- arch/arm/mach-davinci/da830.c | 128 ++-- arch/arm/mach-davinci/da850.c | 113 4 files

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-15 Thread David Lechner
On 03/15/2016 05:45 PM, Sergei Shtylyov wrote: No, this register is shared b/w MUSB and OHCI. The proper thing to do is to write the PHY driver and let it control this shared register. OK. I've started working on this. I am looking at using struct usb_phy, however, enum usb_phy_type only

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-15 Thread David Lechner
On 03/15/2016 10:46 PM, David Lechner wrote: On 03/15/2016 05:45 PM, Sergei Shtylyov wrote: No, this register is shared b/w MUSB and OHCI. The proper thing to do is to write the PHY driver and let it control this shared register. OK. I've started working on this. I am looking at

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-18 Thread David Lechner
On 03/16/2016 12:38 PM, Sergei Shtylyov wrote: On 03/16/2016 07:57 AM, David Lechner wrote: Also, I am not finding any existing data structure to pass the musb set_mode function to the phy in either usb_phy or usb_otg. Setting the mode (host/peripheral/otg) is done in the same PHY register, so

[PATCH v2 05/11] dt-bindings: Add bindings for phy-da8xx-usb

2016-03-18 Thread David Lechner
Device tree binding for new phy-da8xx-usb driver. Signed-off-by: David Lechner --- v2 changes: This is new patch in v2. .../devicetree/bindings/phy/phy-da8xx-usb.txt | 34 ++ 1 file changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy

[PATCH v2 06/11] phy: da8xx-usb: new driver for DA8XX SoC USB PHY

2016-03-18 Thread David Lechner
This is a new phy driver for the SoC USB controllers on the TI DA8XX family of microcontrollers. The USB 1.1 PHY is just a simple on/off. The USB 2.0 PHY also allows overriding the VBUS and ID pins. Signed-off-by: David Lechner --- v2 changes: This is new patch in v2. drivers/phy/Kconfig

[PATCH v2 08/11] ARM: dt: da850: Add usb phy node

2016-03-19 Thread David Lechner
Add a node for the new usb phy driver. Signed-off-by: David Lechner --- v2 changes: This is new patch in v2. arch/arm/boot/dts/da850.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index 591660d..06f36cd 100644 --- a

[PATCH v2 04/11] ARM: davinci: da8xx: add usb phy clocks

2016-03-19 Thread David Lechner
-off-by: David Lechner --- v2 changes: Move clock mux code to set_parent callback. Also fixed some other issues from feedback on the previous patch. arch/arm/mach-davinci/board-da830-evm.c | 12 --- arch/arm/mach-davinci/board-omapl138-hawk.c | 7 -- arch/arm/mach-davinci/da830.c

Re: [PATCH 3/5] ARM: davinci: da8xx: add cfgchip2 to resources

2016-03-19 Thread David Lechner
On 03/16/2016 01:22 PM, Sergei Shtylyov wrote: The set_mode() method doesn't have anything to do with the predefined roles. What CFGCHIP2 setting do is to override the ID input (and also the VBUS level comparator). This is not required for the normal functioning of either host or peripheral

  1   2   >