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 <da...@lechnology.com> 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

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 <da...@lechnology.com> 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. Thi

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 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 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 <da...@lechnology.com> 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

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 <da...@lechnology.com> Reviewed-by: Sekhar Nori <nsek.

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

[PATCH v3 4/5] mmc: davinci: prepare clock

2016-03-18 Thread David Lechner
When trying to use this driver with the common clock framework, enabling the clock fails because it was not prepared. This fixes the problem by calling clk_prepare and clk_enable in a single function. Ditto for clk_disable_unprepare. Signed-off-by: David Lechner <da...@lechnology.com>

[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 <da...@lechnology.com> --- 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..3

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

2016-03-15 Thread David Lechner
-off-by: David Lechner <da...@lechnology.com> --- 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

[PATCH v3 5/5] ARM: davinci: remove mmc dma resources

2016-03-18 Thread David Lechner
The davinci_mmc driver no longer uses platform resources for getting dma channels. Instead lookup is now done using dma_slave_map. Signed-off-by: David Lechner <da...@lechnology.com> Acked-by: Sekhar Nori <nsek...@ti.com> --- v3 changes: none. arch/arm/mach-davinci/devices-

[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 <da...@lechnology.com> --- v2 changes: This is new patch

[PATCH v2 00/11] da8xx USB clocks

2016-03-18 Thread David Lechner
that controls the SoC USB PHY (both USB 1.1 and USB 2.0). The ohci and musb drivers have been updated to use this new phy driver. David Lechner (10): ARM: davinci: add set_parent callback for mux clocks ARM: davinci: da850: use clk->set_parent for async3 ARM: davinci: da8xx: add usb phy clo

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

2016-03-18 Thread David Lechner
Add a node for the new usb phy driver. Signed-off-by: David Lechner <da...@lechnology.com> --- 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 5

[PATCH 0/5] da8xx USB clocks

2016-03-15 Thread David Lechner
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): ARM: davinci: defined missing

[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

[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 <da...@lechnology.com> --- drivers/usb/musb/da8xx.

[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 <da...@lechnology.com> --- arch/arm/mach-davinci/usb.c | 5 + 1 file changed, 5 insertions(+) diff

Re: [PATCH v2 4/5] mmc: davinci: don't use dma platform resources

2016-03-15 Thread David Lechner
On 03/15/2016 03:54 AM, Peter Ujfalusi wrote: On 03/15/16 00:54, David Lechner wrote: host->dma_tx = - dma_request_slave_channel_compat(mask, edma_filter_fn, - >txdma, mmc_dev(host->mmc), "tx"); + dma_re

[PATCH v2 3/5] mmc: davinci: prepare clock

2016-03-14 Thread David Lechner
When trying to use this driver with the common clock framework, enabling the clock fails because it was not prepared. This fixes the problem by calling clk_prepare and clk_enable in a single function. Ditto for clk_disable_unprepare. Signed-off-by: David Lechner <da...@lechnology.com> -

[PATCH v2 0/5] davinci_mmc fixes

2016-03-14 Thread David Lechner
I've updated the patche set based on feedback. This is tested on linux-next with LEGO MINDSTORMS EV3 (da850), both with and without device tree enabled. David Lechner (5): mmc: davinci: remove matching string mmc: davinci: fix unwinding in probe mmc: davinci: prepare clock mmc: davinci

[PATCH v2 2/5] mmc: davinci: fix unwinding in probe

2016-03-14 Thread David Lechner
Unwiding from an error in davinci_mmcsd_probe was a mess. Some errors were not handled and not all paths unwound correctly. Also using devm_ where possible to simplify things. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: use devm_ where possible drivers/mm

[PATCH v3 0/5] davinci_mmc fixes

2016-03-19 Thread David Lechner
I have replaced one of my patches with the patch from Peter Ujfalusi and fixed a mistake in the "fix unwinding..." patch. Tested working on LEGO MINDSTORMS EV3 (da850-ish). David Lechner (4): mmc: davinci: remove matching string mmc: davinci: fix unwinding in probe mmc: davinc

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

2016-03-19 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 v3 1/5] mmc: davinci_mmc: Use dma_request_chan() to requesting DMA channel

2016-03-19 Thread David Lechner
From: Peter Ujfalusi With the new dma_request_chan() the client driver does not need to look for the DMA resource and it does not need to pass filter_fn anymore. By switching to the new API the driver can now support deferred probing against DMA. Signed-off-by: Peter

[PATCH v3 2/5] mmc: davinci: remove matching string

2016-03-19 Thread David Lechner
The string "MMCSDCLK" is not actually used for clock lookup, so can be removed. Signed-off-by: David Lechner <da...@lechnology.com> Acked-by: Sekhar Nori <nsek...@ti.com> --- v3 changes: none. drivers/mmc/host/davinci_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 d

Re: [PATCH v2 11/11] usb: musb: da8xx: Remove mach code

2016-03-19 Thread David Lechner
On 03/17/2016 08:11 AM, Sergei Shtylyov wrote: On 3/17/2016 5:26 AM, David Lechner wrote: glue->dev= >dev; pdata->platform_ops= _ops; -glue->phy = usb_phy_generic_register(); -if (IS_ERR(glue->phy)) { -ret = PTR_ERR(glue->p

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

2016-03-19 Thread David Lechner
On 03/16/2016 07:27 AM, Sergei Shtylyov wrote: +static struct clk usb20_clk = { +.name= "usb20", +.parent= _sysclk2, +.lpsc= DA8XX_LPSC1_USB20, +.gpsc= 1, +}; Why move it? For organization, to keep all of the USB clocks together. I can

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

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

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

2016-03-19 Thread David Lechner
On 03/16/2016 01:04 PM, Sergei Shtylyov wrote: No, I mean why is not this implemented as a part of clk_set_parent()? There is not currently any framework for mux clocks in the davinci clocks. I am hoping to eventually get the davinci clocks moved to the common clock framework, so this

[PATCH v2 07/11] ARM: davinci: da8xx: Add USB PHY platform declaration

2016-03-19 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 <da...@lechnology.com> --- v2 changes: This is new patch in v2. arch/arm/mach-davinci/include/mach/da8xx.h | 1 + arch/arm/mach-davinci

[PATCH v2 02/11] ARM: davinci: add set_parent callback for mux clocks

2016-03-19 Thread David Lechner
Introduce a set_parent callback that will be used for mux clocks, such as the USB PHY muxes and the async3 clock domain mux. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: This is a new patch in v2. arch/arm/mach-davinci/clock.c | 17 - arch/ar

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

[PATCH v2 11/11] usb: musb: da8xx: Remove mach code

2016-03-19 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. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: This is part of a previous patch that was split. This version uses the new phy driver instead of a

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

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 using

[PATCH] clocksource: Add missing include of of.h.

2016-03-09 Thread David Lechner
This header uses OF_DELCARE_1 which is defined in linux/of.h. This fixes getting unhelpful compiler error messages about missing ')' before a string constant. Signed-off-by: David Lechner <da...@lechnology.com> --- include/linux/clocksource.h | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v2 5/5] arm: davinci: remove mmc dma resources

2016-03-14 Thread David Lechner
The davinci_mmc driver no longer uses platform resources for getting dma channels. Instead lookup is now done using dma_slave_map. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: This is a new patch in v2. arch/arm/mach-davinci/devices-da8xx.

[PATCH v2 4/5] mmc: davinci: don't use dma platform resources

2016-03-14 Thread David Lechner
The davinci arch now has dma_slave_map tables for dma resources, so it is no longer necessary to pass dma resources through the platform device. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: Remove platform_get_resource completly instead of just ignoring it. drive

[PATCH v2 1/5] mmc: davinci: remove matching string

2016-03-14 Thread David Lechner
The string "MMCSDCLK" is not actually used for clock lookup, so can be removed. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: none drivers/mmc/host/davinci_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/davinci

Re: [PATCH v3 00/16] da8xx USB clocks

2016-04-07 Thread David Lechner
On 03/24/2016 06:51 PM, David Lechner wrote: This is a reworking of the v2 series based of feedback and review. There were very many suggestions, so hopefully I didn't miss any. Here are the highlights... New stuff: * Fixed the davinci device tree declarations to use the preferred DT address

Re: [PATCH v3 0/5] davinci_mmc fixes

2016-04-05 Thread David Lechner
On 04/05/2016 12:07 PM, David Lechner wrote: On 04/05/2016 11:51 AM, David Lechner wrote: On 04/05/2016 06:12 AM, Ulf Hansson wrote: Patch 3 triggers a compiler warning, please fix it. ../drivers/mmc/host/davinci_mmc.c: In function ‘davinci_mmcsd_probe’: ../drivers/mmc/host/davinci_mmc.c

[PATCH v4 3/3] ARM: davinci: remove mmc dma resources

2016-04-05 Thread David Lechner
The davinci_mmc driver no longer uses platform resources for getting dma channels. Instead lookup is now done using dma_slave_map. Signed-off-by: David Lechner <da...@lechnology.com> Acked-by: Sekhar Nori <nsek...@ti.com> --- no change arch/arm/mach-davinci/devices-

[PATCH v4 0/3] davinci_mmc fixes

2016-04-05 Thread David Lechner
This fixes a compiler warning in the "fix unwinding in probe" patch where ret was used uninitalized. David Lechner (3): mmc: davinci: fix unwinding in probe mmc: davinci: prepare clock ARM: davinci: remove mmc dma resources arch/arm/mach-davinci/devices-da8xx.c | 20 ---

[PATCH v4 1/3] mmc: davinci: fix unwinding in probe

2016-04-05 Thread David Lechner
Unwiding from an error in davinci_mmcsd_probe was a mess. Some errors were not handled and not all paths unwound correctly. Also using devm_ where possible to simplify things. Signed-off-by: David Lechner <da...@lechnology.com> --- v4 change: set ret before goto ioremap_fail. drivers/mm

[PATCH v4 2/3] mmc: davinci: prepare clock

2016-04-05 Thread David Lechner
When trying to use this driver with the common clock framework, enabling the clock fails because it was not prepared. This fixes the problem by calling clk_prepare and clk_enable in a single function. Ditto for clk_disable_unprepare. Signed-off-by: David Lechner <da...@lechnology.

Re: [PATCH v3 0/5] davinci_mmc fixes

2016-04-05 Thread David Lechner
On 04/05/2016 06:12 AM, Ulf Hansson wrote: Patch 3 triggers a compiler warning, please fix it. ../drivers/mmc/host/davinci_mmc.c: In function ‘davinci_mmcsd_probe’: ../drivers/mmc/host/davinci_mmc.c:1208:6: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized] I

Re: [PATCH v3 0/5] davinci_mmc fixes

2016-04-05 Thread David Lechner
On 04/05/2016 11:51 AM, David Lechner wrote: On 04/05/2016 06:12 AM, Ulf Hansson wrote: Patch 3 triggers a compiler warning, please fix it. ../drivers/mmc/host/davinci_mmc.c: In function ‘davinci_mmcsd_probe’: ../drivers/mmc/host/davinci_mmc.c:1208:6: warning: ‘ret’ may be used uninitialized

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

2016-03-19 Thread David Lechner
-off-by: David Lechner <da...@lechnology.com> --- 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/ar

[PATCH v2 01/11] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY

2016-03-19 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

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

2016-03-19 Thread David Lechner
On 03/16/2016 09:50 AM, Alan Stern wrote: Is it theoretically impossible for a da8xx platform to have more than one OHCI controller? If it isn't, you better not use static variables to hold per-device data. Yes, it is theoretically impossible, but probably better to not use static variables

[PATCH v2 09/11] usb: ohci-da8xx: Remove code that references mach

2016-03-19 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 <da...@lechnology.com> --- v2 changes: Uses the new phy driver instead of using a second clock. drivers/us

[PATCH v3 3/5] mmc: davinci: fix unwinding in probe

2016-03-19 Thread David Lechner
Unwiding from an error in davinci_mmcsd_probe was a mess. Some errors were not handled and not all paths unwound correctly. Also using devm_ where possible to simplify things. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: fixed ret = -ENODEV mistake. Updated to apply

[PATCH v2 10/11] usb: musb: da8xx: Use devm in probe

2016-03-20 Thread David Lechner
Simplify things a bit by using devm functions where possible. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: This is part of a previous patch that was split. No changes from previous version. drivers/usb/musb/da8xx.c | 28 1 file chan

[PATCH v2 03/11] ARM: davinci: da850: use clk->set_parent for async3

2016-03-20 Thread David Lechner
the appropriate child clocks. The default is use to pll1_sysclk2 since it is not affected by processor frequency scaling. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: This is a new patch in v2. arch/arm/mach-davinci/da850.c | 88 ---

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

2016-03-23 Thread David Lechner
On 03/23/2016 12:06 PM, Sekhar Nori wrote: On Thursday 17 March 2016 07:56 AM, David Lechner wrote: Device tree binding for new phy-da8xx-usb driver. Signed-off-by: David Lechner <da...@lechnology.com> --- v2 changes: This is new patch in v2. .../devicetree/bindings/phy/phy-da8xx-u

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

2016-03-23 Thread David Lechner
On 03/23/2016 12:21 PM, Sekhar Nori wrote: +/* DA8xx CFGCHIP2 (USB PHY Control) register bits */ +#define PHYCLKGD (1 << 17) +#define VBUSSENSE (1 << 16) +#define RESET (1 << 15) +#define OTGMODE_MASK (3 << 13) +#define NO_OVERRIDE

Re: [PATCH v2 03/11] ARM: davinci: da850: use clk->set_parent for async3

2016-03-23 Thread David Lechner
On 03/23/2016 10:56 AM, Sekhar Nori wrote: On Thursday 17 March 2016 07:56 AM, David Lechner wrote: The da850 family of processors has an async3 clock domain that can be muxed to either pll0_sysclk2 or pll1_sysclk2. Now that the davinci clocks have a set_parent callback, we can use

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

2016-03-23 Thread David Lechner
On 03/23/2016 11:56 AM, Sekhar Nori wrote: +static struct clk usb_ref_clk = { + .name = "usb_ref_clk", + .rate = 4800, + .set_rate = davinci_simple_set_rate, +}; can we call this usb_refclkin so it matches the TRM name? Also, should this node be

[PATCH] phy: da8xx-usb: new driver for DA8xx SoC USB PHY

2016-03-24 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 <da...@lechnology.com> --- I made a last minute change an

Re: [PATCH v2 03/11] ARM: davinci: da850: use clk->set_parent for async3

2016-03-23 Thread David Lechner
On 03/23/2016 12:29 PM, Sekhar Nori wrote: Alright, I guess 'can be called' in the comment should have used stronger language :) How about late registration of USB clocks as I suggested. It should also help consolidate code across da830 and da850. What about the new async3 clock? It will

[PATCH v3 11/16] ARM: davinci: da8xx: Add USB PHY platform declaration

2016-03-24 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 <da...@lechnology.com> --- v3 changes: * The declaration is now in the new usb-da8xx.c file. arch/arm/mach-davinci/board-da830-evm.c

[PATCH v3 16/16] usb: musb: da8xx: Remove mach code

2016-03-24 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 <da...@lechnology.com> --- v3 changes: * removed depends on BROKEN and added select PHY_DA8XX_USB to Kconfig *

[PATCH v3 10/16] ARM: davinci: da8xx: Add CFGCHIPn syscon platform declaration.

2016-03-24 Thread David Lechner
The CFGCHIPn 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 <da...@lechnology.com> --- v3 changes: This is a new patch. There is one syscon device for all C

[PATCH v3 04/16] ARM: davinci: Move clock init after ioremap.

2016-03-24 Thread David Lechner
Some clocks (such as the USB PHY clocks in DA8xx) will need to use iomem. The davinci_common_init() function must be called before the ioremap, so the clock init is now split out as separate function. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: This is a new

[PATCH v3 02/16] mfd: da8xx-cfgchip: New header file for CFGCHIP registers.

2016-03-24 Thread David Lechner
and they didn't really belong there anyway. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: This is a new patch. It replaces the previous patch that just added some missing CFGCHIP2 registers to the platform_data/usb-davinci.h file. I took David Laight's advice and includ

[PATCH v3 00/16] da8xx USB clocks

2016-03-24 Thread David Lechner
ed: * USB clocks are moved to a common file instead of having duplicated code. * PHY driver uses syscon for CFGCHIP registers instead of using them directly. David Lechner (16): dt: davinci: use proper address after @ mfd: da8xx-cfgchip: New header file for CFGCHIP registers. ARM: davinici: da8xx

[PATCH v3 01/16] dt: davinci: use proper address after @

2016-03-24 Thread David Lechner
TI has been using the physical address in DT after the @ in device nodes. The device tree convention is to use the same address that is used for the reg property. This updates all davinci DT files to use the proper convention. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 c

[PATCH v3 14/16] usb: ohci-da8xx: Remove code that references mach

2016-03-24 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 <da...@lechnology.com> Acked-by: Alan Stern <st...@rowland.harvard.edu> --- v3 changes: * add phy_init

[PATCH v3 08/16] dt-bindings: Add bindings for phy-da8xx-usb

2016-03-24 Thread David Lechner
Device tree binding for new phy-da8xx-usb driver. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: * added cfgchip info and example * correct usage of "DA8xx" * correct address after @ * dropped 11 before @ in usb@ .../devicetree/bindings/phy/phy-da8xx-u

[PATCH v3 05/16] ARM: davinci: add set_parent callback for mux clocks

2016-03-24 Thread David Lechner
Introduce a set_parent callback that will be used for mux clocks, such as the USB PHY muxes and the async3 clock domain mux. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: none. arch/arm/mach-davinci/clock.c | 17 - arch/arm/mach-davinci/clock.h |

[PATCH v3 06/16] ARM: davinci: da850: use clk->set_parent for async3

2016-03-24 Thread David Lechner
the appropriate child clocks. The default is use to pll1_sysclk2 since it is not affected by processor frequency scaling. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: * Does not use ioremap in da850_async3_set_parent(). This works now becuase the clock init has been moved. *

[PATCH v3 07/16] ARM: davinci: da8xx: add usb phy clocks

2016-03-24 Thread David Lechner
and replaced with the new clock registration functions. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: * Clocks are now in usb-da8xx.c instead of having duplicated code in da830.c and da850.c. * No longer calling ioremap in set_parent() functions. * Added timeout while w

[PATCH v3 12/16] ARM: dt: da850: Add cfgchip syscon node

2016-03-24 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 <da...@lechnology.com> --- v3 changes: This is a new patch. arch/arm/boot/dts/da850.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts

[PATCH v3 09/16] phy: da8xx-usb: new driver for DA8xx SoC USB PHY

2016-03-24 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 <da...@lechnology.com> --- v3 changes: * Uses syscon

[PATCH v3 15/16] usb: musb: da8xx: Use devm in probe

2016-03-24 Thread David Lechner
Simplify things a bit by using devm functions where possible. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: * Kept clk variable to minimize noise. drivers/usb/musb/da8xx.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/d

[PATCH v3 13/16] ARM: dt: da850: Add usb phy node

2016-03-24 Thread David Lechner
Add a node for the new usb phy driver. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: * No longer needs reg property since we are now using syscon instead. arch/arm/boot/dts/da850.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/da85

[PATCH v3 03/16] ARM: davinici: da8xx: move usb code to new file

2016-03-24 Thread David Lechner
We will be adding more da8xx-specific code for phy and clocks, so it will be better to have this in a separate file. This way we don't have a bunch of #ifdefs for all of the da8xx stuff. Signed-off-by: David Lechner <da...@lechnology.com> --- v3 changes: this is a new patch. The diff

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

2016-04-01 Thread David Lechner
On 04/01/2016 09:45 AM, Bin Liu wrote: +EXPORT_SYMBOL_GPL(da8xx_usb20_phy_set_mode); Don't prefer export symbols from PHY driver. That'll create unnecessary dependencies between the controller and the PHY. Agreed. I think it'll be better to create a new attribute and use it? Another

Re: [PATCH v3 15/16] usb: musb: da8xx: Use devm in probe

2016-03-31 Thread David Lechner
On 03/31/2016 05:21 PM, Bin Liu wrote: - glue = kzalloc(sizeof(*glue), GFP_KERNEL); + glue = devm_kzalloc(>dev, sizeof(*glue), GFP_KERNEL); if (!glue) { dev_err(>dev, "failed to allocate glue context\n"); - goto err0; + return

Re: [PATCH v3 02/16] mfd: da8xx-cfgchip: New header file for CFGCHIP registers.

2016-03-28 Thread David Lechner
On 03/25/2016 12:22 PM, Sergei Shtylyov wrote: On 03/25/2016 02:51 AM, David Lechner wrote: +/* register offsets */ +#define CFGCHIP_REG(n)(n * 4) +#define CFGCHIP0_REGCFGCHIP_REG(0) +#define CFGCHIP1_REGCFGCHIP_REG(1) +#define CFGCHIP2_REG

Re: [PATCH v2 3/4] ARM: davinci: disable mdio and eth0 in da850.dtsi

2016-04-25 Thread David Lechner
On 04/25/2016 08:30 AM, Sekhar Nori wrote: Hi David, On Saturday 16 April 2016 10:30 PM, David Lechner wrote: All other devices are disabled by default and not all boards will use these devices, so these should be disabled too.. da850-evm.dtb already had status = "okay" for the

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 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/ma

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 <

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

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,

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 1/7] mfd: da8xx-cfgchip: New header file for CFGCHIP registers.

2016-05-09 Thread David Lechner
and they didn't really belong there anyway. Signed-off-by: David Lechner <da...@lechnology.com> Acked-by: Lee Jones <lee.jo...@linaro.org> --- include/linux/mfd/da8xx-cfgchip.h | 153 ++ include/linux/platform_data/usb-davinci.h | 22 - 2 files

[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 <da...@lechnology.com> --- drivers/usb/musb/Kconfig | 2 +- drivers/usb/musb/da8xx.c

[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 <da...@lechnology.com> --- drivers/phy/Kconfig

[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 <da...@lechnology.com> --- 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

[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 <da...@lechnology.com> Acked-by: Alan Stern <st...@rowland.harvard.edu> --- drivers/usb/host/Kconfi

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

2016-05-09 Thread David Lechner
. Suggested-by: Kishon Vijay Abraham I <kis...@ti.com> Signed-off-by: David Lechner <da...@lechnology.com> --- 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/dri

[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 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 <da...@lechnology.com> Acked-by: Rob Herring <r...@kernel.org> --- .../devicetree/bindings/phy/phy-da8xx-usb.txt | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 D

[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 <da...@lechnology.com> --- 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/bo

[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 <da...@lechnology.com> --- arch/arm/mach-davinci/board-da830-evm.c | 4 arch/arm/mach-davinci

[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 <da...@lechnology.com> --- arch/arm/mach-davinci/board-da830-evm.c | 28 +--- arch/arm/mach-davinci/board-om

[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 <da...@lechnology.com> --- 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/da85

  1   2   3   4   5   6   7   8   9   10   >