[PATCH/RFT 05/12] USB: ohci-da8xx: Fix probe for devices with no vbus/oci gpio

2016-10-07 Thread ahaslam
From: Axel Haslam Some boards dont have gpios assigened for vbus or oci. Allow these boards to enumerate usb without declaring the set_power and/or the ocic_notify callbacks in platform data. Signed-off-by: Axel Haslam --- drivers/usb/host/ohci-da8xx.c | 8 +--- 1 file changed, 5 insertio

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

2016-10-07 Thread ahaslam
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 able to probe correctly usb form a device tree boot, reg

[PATCH/RFT 03/12] ARM: davinci: rename root_hub to platform_data

2016-10-07 Thread ahaslam
From: Axel Haslam To prepare for DT support we will remove the usb callback function pointers. Since this structure will only pass data to the driver, It seems better to rename the structure root_hub structure to platform_data There is no functional change. Signed-off-by: Axel Haslam --- arch

[PATCH/RFT 10/12] USB: ohci-da8xx: Add device tree support

2016-10-07 Thread ahaslam
From: Axel Haslam This allows the controller to be specified via device tree. Signed-off-by: Axel Haslam --- drivers/usb/host/ohci-da8xx.c | 52 +-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/us

[PATCH/RFT 04/12] USB: ohci-da8xx: Divide power up time in the ohci driver

2016-10-07 Thread ahaslam
From: Axel Haslam Instead of requiring platform data to know that the effective time should be diveded by two, Make that operation in the driver so that users (platform board files/Device tree) dont have to worry about it. Signed-off-by: Axel Haslam --- arch/arm/mach-davinci/board-da830-evm.c

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

2016-10-07 Thread ahaslam
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 ++ 1 file changed, 32 insertions(+) create mode 100644

[PATCH/RFT 02/12] ARM: davinci: hawk: add full constraints for ohci plat boot

2016-10-07 Thread ahaslam
From: Axel Haslam The phy framework requests an optional "phy" regulator. If it does not find one, it returns -EPROBE_DEFER. In the case of non-DT based boot for the omap138-lcdk board, this would prevent the usb11 phy to probe correctly and ohci would not enumerate. By calling "regulator_has_fu

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

2016-10-07 Thread ahaslam
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 overcurrent interrupt on the usb driver itself, thus avoidin

[PATCH/RFT 12/12] ARM: dts: da850-lcdk: enable ohci usb

2016-10-07 Thread ahaslam
From: Axel Haslam This enables the ohci usb controller for the lcdk board. Signed-off-by: Axel Haslam --- arch/arm/boot/dts/da850-lcdk.dts | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts index 7b8ab21..6da9d843 10

[PATCH/RFT 06/12] ARM: davinci: hawk: Remove oci and vbus gpios

2016-10-07 Thread ahaslam
From: Axel Haslam The omap138-lcdk and its predecessor the hawk board don't have gpios connected to control vbus or get the over current notifications for usb. for example, in the hawk board gpio6-13 is connected to a LED, and gpio2-4 is not connected at all. In the lcdk board, gpio 2-4 is a push

[PATCH/RFT 11/12] ARM: dts: da850: Add the usb ohci device node

2016-10-07 Thread ahaslam
From: Axel Haslam This adds the device tree node for the usb11 (ohci) controller present in the da850 family of SoC's. Signed-off-by: Axel Haslam --- arch/arm/boot/dts/da850.dtsi | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.

[PATCH/RFT 00/12] Add DT support for ohci-da8xx

2016-10-07 Thread ahaslam
From: Axel Haslam The purpose of this patch series is to add DT support to the ohci-da8xx glue driver without breaking the non-DT boot, which is still used in unconverted davinci devices. To Achieve this, the first 8 patches make sure that the non-DT based enumeration works, and prepares the sta

[PATCH/RFT 01/12] ARM: davinci: da8xx: Enable the usb20 "per" clk on phy_clk_enable

2016-10-07 Thread ahaslam
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 enable and get for the usb20 peripheral before trying to en

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

2016-10-24 Thread ahaslam
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. Signed-off-by: Manjunath Goudar --- drivers/usb/ho

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

2016-10-24 Thread ahaslam
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-da8xx.c b/drivers/usb/host/ohci-da8xx.c index bebc3f0.

[PATCH/RFT v2 14/17] ARM: davinci: register the usb20_phy clock on the DT file

2016-10-24 Thread ahaslam
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 able to probe correctly usb form a device tree boot, reg

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

2016-10-24 Thread ahaslam
From: 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 [Axel: minor fix: change id to -1] Signed-off-by: Axel Haslam --- arch/arm/mach-davinci/

[PATCH/RFT v2 10/17] USB: da8xx: use flag instead of bitmask for over current change

2016-10-24 Thread ahaslam
From: Axel Haslam The da8xx ohci has only one port connected. In hub_control we check that the port is 1, or else we bail out early. There is no point in passing as argument the port number, if we know, and check that it will always be 1. Simplify functions and callbacks, by removing the port pa

[PATCH/RFT v2 09/17] regulator: fixed: Add over current event

2016-10-24 Thread ahaslam
From: Axel Haslam Some regulator supplies have an over-current pin that is activated when the hw detects an over current condition. When this happens, the hardware enters a current limited mode. Extend the fixed regulator driver with the ability to handle irq's from the over-current pin and repo

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

2016-10-24 Thread ahaslam
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 files changed, 16 insertions(+) diff --git a/arch/arm/

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

2016-10-24 Thread ahaslam
From: Axel Haslam Instead of global variables, use the extra_priv_size of the ohci driver to add a reference to driver private data. Signed-off-by: Axel Haslam --- drivers/usb/host/ohci-da8xx.c | 135 -- 1 file changed, 79 insertions(+), 56 deletions(-)

[PATCH/RFT v2 01/17] ARM: davinci: da8xx: add usb phy clocks

2016-10-24 Thread ahaslam
From: David Lechner Up to this point, the USB phy clock configuration was handled manually in the board files and in the usb drivers. This adds proper clocks so that the usb drivers can use clk_get and clk_enable and not have to worry about the details. Also, the related code is removed from the

[PATCH/RFT v2 06/17] ARM: davinci: da8xx: Fix some redefined symbol warnings

2016-10-24 Thread ahaslam
From: Alexandre Bailon Some macro for DA8xx CFGCHIP are defined in usb-davinci.h, but da8xx-cfgchip.h intend to replace them. The usb-da8xx.c is using both headers, causing redefined symbol warnings. Remove the old macros. Signed-off-by: Alexandre Bailon --- include/linux/platform_data/usb-dav

[PATCH/RFT v2 04/17] ARM: DTS: da850: Add cfgchip syscon node

2016-10-24 Thread ahaslam
From: 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 ind

[PATCH/RFT v2 08/17] ARM: davinci: hawk: add full constraints for ohci plat boot

2016-10-24 Thread ahaslam
From: Axel Haslam The phy framework requests an optional "phy" regulator. If it does not find one, it returns -EPROBE_DEFER. In the case of non-DT based boot for the omap138-lcdk board, this would prevent the usb11 phy to probe correctly and ohci would not enumerate. By calling "regulator_has_fu

[PATCH/RFT v2 00/17] Add DT support for ohci-da8xx

2016-10-24 Thread ahaslam
From: Axel Haslam The purpose of this patch series is to add DT support and modernize the ohci-da8xx glue driver without breaking the non-DT boot, which is still used in unconverted davinci devices. The first couple of patches, are the recent and ongoing efforts from David Lechner to clean up da

[PATCH/RFT v2 03/17] ARM: davinci: da8xx: Add USB PHY platform declaration

2016-10-24 Thread ahaslam
From: 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

[PATCH/RFT v2 05/17] ARM: DTS: da850: Add usb phy node

2016-10-24 Thread ahaslam
From: 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 6bbf20d..33fcdce 100644 --- a/arch/arm/boot/dts/da

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

2016-10-24 Thread ahaslam
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 board files. Instead of requesting and handling the gpi

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

2016-10-24 Thread ahaslam
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 enable and get for the usb20 peripheral before trying to en

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

2016-10-24 Thread ahaslam
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 ++ 1 file changed, 39 insertions(+) create mode 100644

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

2016-10-26 Thread ahaslam
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 Signed-off-by: Manjunath Goudar [Axel: adapted and rebased, fixed minor comments] Sign