ARM: OMAP: SATA support for OMAP5 & DRA7
Subsystems (10)
v2 cover ARM: OMAP: SATA support for OMAP5 & DRA7
Hi,
This series adds SATA support for OMAP5 uevm and DRA7-evm boards.
- Cleans up the ti-pipe3 PHY driver
- Adds SATA DPLL support to ti-pipe3 PHY driver
- Adds SATA nodes to hwmod and SoC DT data
Patches are based on 3.14-rc4 with balbi/next, linux-phy/next and omap-for-v3.15/dt merged on top..
To test SATA you will also need [1].
[1] - http://article.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/7285
Changelog:
v2
- use 'depends on' instead of 'select' OCP2SCP bus driver.
- Changed DT bindings for dra7-usb2 and am437-usb2 phy.
cheers,
-roger
---
Balaji T K (2):
ARM: dts: omap5: add sata node
ARM: dts: dra7: add OCP2SCP3 and SATA nodes
Keshava Munegowda (1):
ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
Kishon Vijay Abraham I (1):
phy: rename struct omap_control_usb to struct omap_control_phy
Nikhil Devshatwar (1):
ARM: DRA7: hwmod: Add ocp2scp3 and sata hwmods
Roger Quadros (8):
phy: omap-control: Update DT binding information
phy: omap-control: update dra7 and am437 usb2 bindings
phy: ti-pipe3: cleanup clock handling
phy: ti-pipe3: Add SATA DPLL support
phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY
phy: ti-pipe3: streamline PHY operations
phy: ti-pipe3: Fix suspend/resume and module reload
phy: omap: Depend on OMAP_OCP2SCP bus driver
Documentation/devicetree/bindings/phy/ti-phy.txt | 40 ++- Documentation/devicetree/bindings/usb/omap-usb.txt | 24 -- arch/arm/boot/dts/dra7.dtsi | 39 +++ arch/arm/boot/dts/omap5.dtsi | 47 ++- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 73 +++++ arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 31 +- drivers/phy/Kconfig | 16 +- drivers/phy/Makefile | 1 + drivers/phy/phy-omap-control.c | 320 +++++++++++++++++++++ drivers/phy/phy-omap-usb2.c | 8 +- drivers/phy/phy-ti-pipe3.c | 269 ++++++++++------- drivers/usb/musb/omap2430.c | 2 +- drivers/usb/phy/Kconfig | 10 - drivers/usb/phy/Makefile | 1 - drivers/usb/phy/phy-omap-control.c | 319 -------------------- include/linux/phy/omap_control_phy.h | 89 ++++++ include/linux/usb/omap_control_usb.h | 89 ------ 17 files changed, 815 insertions(+), 563 deletions(-) create mode 100644 drivers/phy/phy-omap-control.c delete mode 100644 drivers/usb/phy/phy-omap-control.c create mode 100644 include/linux/phy/omap_control_phy.h delete mode 100644 include/linux/usb/omap_control_usb.h
Signature · 1 line
1.8.3.2
PATCH v2 1/13 phy: rename struct omap_control_usb to struct omap_control_phy
From: Kishon Vijay Abraham I <[email protected]>
Rename struct omap_control_usb to struct omap_control_phy since it can be used to control PHY of USB, SATA and PCIE. Also move the driver and include files under *phy* and made the corresponding changes in the users of phy-omap-control.
--- drivers/phy/Kconfig | 14 +- drivers/phy/Makefile | 1 + drivers/phy/phy-omap-control.c | 320 +++++++++++++++++++++++++++++++++++ drivers/phy/phy-omap-usb2.c | 8 +- drivers/phy/phy-ti-pipe3.c | 8 +- drivers/usb/musb/omap2430.c | 2 +- drivers/usb/phy/Kconfig | 10 -- drivers/usb/phy/Makefile | 1 - drivers/usb/phy/phy-omap-control.c | 319 ---------------------------------- include/linux/phy/omap_control_phy.h | 89 ++++++++++ include/linux/usb/omap_control_usb.h | 89 ---------- 11 files changed, 431 insertions(+), 430 deletions(-) create mode 100644 drivers/phy/phy-omap-control.c delete mode 100644 drivers/usb/phy/phy-omap-control.c create mode 100644 include/linux/phy/omap_control_phy.h delete mode 100644 include/linux/usb/omap_control_usb.h
drivers/phy/Kconfig +12 -2
@@ -31,12 +31,22 @@ config PHY_MVEBU_SATA depends on OF select GENERIC_PHY +config OMAP_CONTROL_PHY + tristate "OMAP CONTROL PHY Driver" + help + Enable this to add support for the PHY part present in the control + module. This driver has API to power on the USB2 PHY and to write to + the mailbox. The mailbox is present only in omap4 and the register to + power on the USB2 PHY is present in OMAP4 and OMAP5. OMAP5 has an + additional register to power on USB3 PHY/SATA PHY/PCIE PHY + (PIPE3 PHY). + config OMAP_USB2 tristate "OMAP USB2 PHY Driver" depends on ARCH_OMAP2PLUS depends on USB_PHY select GENERIC_PHY - select OMAP_CONTROL_USB + select OMAP_CONTROL_PHY help Enable this to support the transceiver that is part of SOC. This driver takes care of all the PHY functionality apart from comparator.
@@ -47,7 +57,7 @@ config TI_PIPE3 tristate "TI PIPE3 PHY Driver" depends on ARCH_OMAP2PLUS || COMPILE_TEST select GENERIC_PHY - select OMAP_CONTROL_USB + select OMAP_CONTROL_PHY help Enable this to support the PIPE3 PHY that is part of TI SOCs. This driver takes care of all the PHY functionality apart from comparator.
drivers/phy/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_BCM_KONA_USB2_PHY) += phy-bcm-kona-usb2.o obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO) += phy-exynos-dp-video.o obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO) += phy-exynos-mipi-video.o obj-$(CONFIG_PHY_MVEBU_SATA) += phy-mvebu-sata.o +obj-$(CONFIG_OMAP_CONTROL_PHY) += phy-omap-control.o obj-$(CONFIG_OMAP_USB2) += phy-omap-usb2.o obj-$(CONFIG_TI_PIPE3) += phy-ti-pipe3.o obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o
drivers/phy/phy-omap-control.c new file +320 -0
320 lines not on this page · raw message
drivers/phy/phy-omap-usb2.c +4 -4
@@ -27,7 +27,7 @@#include <linux/err.h> #include <linux/pm_runtime.h> #include <linux/delay.h> -#include <linux/usb/omap_control_usb.h> +#include <linux/phy/omap_control_phy.h> #include <linux/phy/phy.h> #include <linux/of_platform.h>
@@ -105,7 +105,7 @@ static int omap_usb_power_off(struct phy *x) {struct omap_usb *phy =phy_get_drvdata (x); -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 );return 0 ; }
@@ -114,7 +114,7 @@ static int omap_usb_power_on(struct phy *x) {struct omap_usb *phy =phy_get_drvdata (x); -omap_control_usb_phy_power (phy->control_dev,1 ); +omap_control_phy_power (phy->control_dev,1 );return 0 ; }
@@ -251,7 +251,7 @@ static int omap_usb2_probe(struct platform_device *pdev) } phy->control_dev = &control_pdev->dev; -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 ); otg->set_host = omap_usb_set_host; otg->set_peripheral = omap_usb_set_peripheral;
drivers/phy/phy-ti-pipe3.c +4 -4
@@ -26,7 +26,7 @@#include <linux/io.h> #include <linux/pm_runtime.h> #include <linux/delay.h> -#include <linux/usb/omap_control_usb.h> +#include <linux/phy/omap_control_phy.h> #include <linux/of_platform.h> #define PLL_STATUS 0x00000004
@@ -134,7 +134,7 @@ static int ti_pipe3_power_off(struct phy *x)return -EBUSY ; } -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 );return 0 ; }
@@ -232,7 +232,7 @@ static int ti_pipe3_init(struct phy *x)if (ret)return ret; -omap_control_usb_phy_power (phy->control_dev,1 ); +omap_control_phy_power (phy->control_dev,1 );return 0 ; }
@@ -304,7 +304,7 @@ static int ti_pipe3_probe(struct platform_device *pdev) phy->control_dev = &control_pdev->dev; -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 );platform_set_drvdata (pdev, phy);pm_runtime_enable (phy->dev);
drivers/usb/musb/omap2430.c +1 -1
@@ -37,7 +37,7 @@#include <linux/err.h> #include <linux/delay.h> #include <linux/usb/musb-omap.h> -#include <linux/usb/omap_control_usb.h> +#include <linux/phy/omap_control_phy.h> #include <linux/of_platform.h> #include "musb_core.h"
drivers/usb/phy/Kconfig +0 -10
@@ -75,16 +75,6 @@ config NOP_USB_XCEIV built-in with usb ip or which are autonomous and doesn't require any phy programming such as ISP1x04 etc. -config OMAP_CONTROL_USB - tristate "OMAP CONTROL USB Driver" - depends on ARCH_OMAP2PLUS || COMPILE_TEST - help - Enable this to add support for the USB part present in the control - module. This driver has API to power on the USB2 PHY and to write to - the mailbox. The mailbox is present only in omap4 and the register to - power on the USB2 PHY is present in OMAP4 and OMAP5. OMAP5 has an - additional register to power on USB3 PHY. - config AM335X_CONTROL_USB tristate
drivers/usb/phy/Makefile +0 -1
@@ -13,7 +13,6 @@ obj-$(CONFIG_ISP1301_OMAP) += phy-isp1301-omap.o obj-$(CONFIG_MV_U3D_PHY) += phy-mv-u3d-usb.o obj-$(CONFIG_NOP_USB_XCEIV) += phy-generic.o obj-$(CONFIG_TAHVO_USB) += phy-tahvo.o -obj-$(CONFIG_OMAP_CONTROL_USB) += phy-omap-control.o obj-$(CONFIG_AM335X_CONTROL_USB) += phy-am335x-control.o obj-$(CONFIG_AM335X_PHY_USB) += phy-am335x.o obj-$(CONFIG_OMAP_OTG) += phy-omap-otg.o
drivers/usb/phy/phy-omap-control.c deleted +0 -319
319 lines not on this page · raw message
include/linux/phy/omap_control_phy.h new file +89 -0
89 lines not on this page · raw message
include/linux/usb/omap_control_usb.h deleted +0 -89
89 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH RESEND v2 1/13 phy: rename struct omap_control_usb to struct omap_control_phy
In reply to Roger QuadrosFrom: Kishon Vijay Abraham I <[email protected]>
Rename struct omap_control_usb to struct omap_control_phy since it can be used to control PHY of USB, SATA and PCIE. Also move the driver and include files under *phy* and made the corresponding changes in the users of phy-omap-control.
---
drivers/phy/Kconfig | 14 +-
drivers/phy/Makefile | 1 +
drivers/{usb => }/phy/phy-omap-control.c | 165 +++++++++++----------
drivers/phy/phy-omap-usb2.c | 8 +-
drivers/phy/phy-ti-pipe3.c | 8 +-
drivers/usb/musb/omap2430.c | 2 +-
drivers/usb/phy/Kconfig | 10 --
drivers/usb/phy/Makefile | 1 -
.../omap_control_usb.h => phy/omap_control_phy.h} | 36 ++---
9 files changed, 123 insertions(+), 122 deletions(-)
rename drivers/{usb => }/phy/phy-omap-control.c (55%)
rename include/linux/{usb/omap_control_usb.h => phy/omap_control_phy.h} (68%)drivers/phy/Kconfig +12 -2
@@ -31,12 +31,22 @@ config PHY_MVEBU_SATA depends on OF select GENERIC_PHY +config OMAP_CONTROL_PHY + tristate "OMAP CONTROL PHY Driver" + help + Enable this to add support for the PHY part present in the control + module. This driver has API to power on the USB2 PHY and to write to + the mailbox. The mailbox is present only in omap4 and the register to + power on the USB2 PHY is present in OMAP4 and OMAP5. OMAP5 has an + additional register to power on USB3 PHY/SATA PHY/PCIE PHY + (PIPE3 PHY). + config OMAP_USB2 tristate "OMAP USB2 PHY Driver" depends on ARCH_OMAP2PLUS depends on USB_PHY select GENERIC_PHY - select OMAP_CONTROL_USB + select OMAP_CONTROL_PHY help Enable this to support the transceiver that is part of SOC. This driver takes care of all the PHY functionality apart from comparator.
@@ -47,7 +57,7 @@ config TI_PIPE3 tristate "TI PIPE3 PHY Driver" depends on ARCH_OMAP2PLUS || COMPILE_TEST select GENERIC_PHY - select OMAP_CONTROL_USB + select OMAP_CONTROL_PHY help Enable this to support the PIPE3 PHY that is part of TI SOCs. This driver takes care of all the PHY functionality apart from comparator.
drivers/phy/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_BCM_KONA_USB2_PHY) += phy-bcm-kona-usb2.o obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO) += phy-exynos-dp-video.o obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO) += phy-exynos-mipi-video.o obj-$(CONFIG_PHY_MVEBU_SATA) += phy-mvebu-sata.o +obj-$(CONFIG_OMAP_CONTROL_PHY) += phy-omap-control.o obj-$(CONFIG_OMAP_USB2) += phy-omap-usb2.o obj-$(CONFIG_TI_PIPE3) += phy-ti-pipe3.o obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o
drivers/phy/phy-omap-control.c renamed from drivers/usb/phy/phy-omap-control.c +83 -82
336 lines not on this page · raw message
drivers/phy/phy-omap-usb2.c +4 -4
@@ -27,7 +27,7 @@#include <linux/err.h> #include <linux/pm_runtime.h> #include <linux/delay.h> -#include <linux/usb/omap_control_usb.h> +#include <linux/phy/omap_control_phy.h> #include <linux/phy/phy.h> #include <linux/of_platform.h>
@@ -105,7 +105,7 @@ static int omap_usb_power_off(struct phy *x) {struct omap_usb *phy =phy_get_drvdata (x); -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 );return 0 ; }
@@ -114,7 +114,7 @@ static int omap_usb_power_on(struct phy *x) {struct omap_usb *phy =phy_get_drvdata (x); -omap_control_usb_phy_power (phy->control_dev,1 ); +omap_control_phy_power (phy->control_dev,1 );return 0 ; }
@@ -251,7 +251,7 @@ static int omap_usb2_probe(struct platform_device *pdev) } phy->control_dev = &control_pdev->dev; -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 ); otg->set_host = omap_usb_set_host; otg->set_peripheral = omap_usb_set_peripheral;
drivers/phy/phy-ti-pipe3.c +4 -4
@@ -26,7 +26,7 @@#include <linux/io.h> #include <linux/pm_runtime.h> #include <linux/delay.h> -#include <linux/usb/omap_control_usb.h> +#include <linux/phy/omap_control_phy.h> #include <linux/of_platform.h> #define PLL_STATUS 0x00000004
@@ -134,7 +134,7 @@ static int ti_pipe3_power_off(struct phy *x)return -EBUSY ; } -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 );return 0 ; }
@@ -232,7 +232,7 @@ static int ti_pipe3_init(struct phy *x)if (ret)return ret; -omap_control_usb_phy_power (phy->control_dev,1 ); +omap_control_phy_power (phy->control_dev,1 );return 0 ; }
@@ -304,7 +304,7 @@ static int ti_pipe3_probe(struct platform_device *pdev) phy->control_dev = &control_pdev->dev; -omap_control_usb_phy_power (phy->control_dev,0 ); +omap_control_phy_power (phy->control_dev,0 );platform_set_drvdata (pdev, phy);pm_runtime_enable (phy->dev);
drivers/usb/musb/omap2430.c +1 -1
@@ -37,7 +37,7 @@#include <linux/err.h> #include <linux/delay.h> #include <linux/usb/musb-omap.h> -#include <linux/usb/omap_control_usb.h> +#include <linux/phy/omap_control_phy.h> #include <linux/of_platform.h> #include "musb_core.h"
drivers/usb/phy/Kconfig +0 -10
@@ -75,16 +75,6 @@ config NOP_USB_XCEIV built-in with usb ip or which are autonomous and doesn't require any phy programming such as ISP1x04 etc. -config OMAP_CONTROL_USB - tristate "OMAP CONTROL USB Driver" - depends on ARCH_OMAP2PLUS || COMPILE_TEST - help - Enable this to add support for the USB part present in the control - module. This driver has API to power on the USB2 PHY and to write to - the mailbox. The mailbox is present only in omap4 and the register to - power on the USB2 PHY is present in OMAP4 and OMAP5. OMAP5 has an - additional register to power on USB3 PHY. - config AM335X_CONTROL_USB tristate
drivers/usb/phy/Makefile +0 -1
@@ -13,7 +13,6 @@ obj-$(CONFIG_ISP1301_OMAP) += phy-isp1301-omap.o obj-$(CONFIG_MV_U3D_PHY) += phy-mv-u3d-usb.o obj-$(CONFIG_NOP_USB_XCEIV) += phy-generic.o obj-$(CONFIG_TAHVO_USB) += phy-tahvo.o -obj-$(CONFIG_OMAP_CONTROL_USB) += phy-omap-control.o obj-$(CONFIG_AM335X_CONTROL_USB) += phy-am335x-control.o obj-$(CONFIG_AM335X_PHY_USB) += phy-am335x.o obj-$(CONFIG_OMAP_OTG) += phy-omap-otg.o
include/linux/phy/omap_control_phy.h renamed from include/linux/usb/omap_control_usb.h +18 -18
@@ -1,5 +1,5 @@/* -* omap_control_usb.h - Header file for the USB part of control module. +* omap_control_phy.h - Header file for the PHY part of control module. * * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com * This program is free software; you can redistribute it and/or modify
@@ -16,10 +16,10 @@* */ -#ifndef __OMAP_CONTROL_USB_H__ -#define __OMAP_CONTROL_USB_H__ +#ifndef __OMAP_CONTROL_PHY_H__ +#define __OMAP_CONTROL_PHY_H__ -enum omap_control_usb_type { +enum omap_control_phy_type {OMAP_CTRL_TYPE_OTGHS =1 ,/* Mailbox OTGHS_CONTROL */ OMAP_CTRL_TYPE_USB2 ,/* USB2_PHY, power down in CONTROL_DEV_CONF */ OMAP_CTRL_TYPE_PIPE3, /* PIPE3 PHY, DPLL & seperate Rx/Tx power */
@@ -27,7 +27,7 @@ enum omap_control_usb_type { OMAP_CTRL_TYPE_AM437USB2, /* USB2 PHY, power e.g. AM437x */ }; -struct omap_control_usb { +struct omap_control_phy {struct device *dev;u32 __iomem *otghs_control;
@@ -36,7 +36,7 @@ struct omap_control_usb {struct clk *sys_clk; -enum omap_control_usb_type type; +enum omap_control_phy_type type; };enum omap_control_usb_mode {
@@ -54,14 +54,14 @@ enum omap_control_usb_mode {#define OMAP_CTRL_DEV_SESSEND BIT(3)#define OMAP_CTRL_DEV_IDDIG BIT(4) -#define OMAP_CTRL_USB_PWRCTL_CLK_CMD_MASK 0x003FC000 -#define OMAP_CTRL_USB_PWRCTL_CLK_CMD_SHIFT 0xE +#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_MASK 0x003FC000 +#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT 0xE -#define OMAP_CTRL_USB_PWRCTL_CLK_FREQ_MASK 0xFFC00000 -#define OMAP_CTRL_USB_PWRCTL_CLK_FREQ_SHIFT 0x16 +#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_MASK 0xFFC00000 +#define OMAP_CTRL_PIPE3_PHY_PWRCTL_CLK_FREQ_SHIFT 0x16 -#define OMAP_CTRL_USB3_PHY_TX_RX_POWERON 0x3 -#define OMAP_CTRL_USB3_PHY_TX_RX_POWEROFF 0x0 +#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWERON 0x3 +#define OMAP_CTRL_PIPE3_PHY_TX_RX_POWEROFF 0x0#define OMAP_CTRL_USB2_PHY_PD BIT(28)
@@ -70,13 +70,13 @@ enum omap_control_usb_mode {#define AM437X_CTRL_USB2_OTGVDET_EN BIT(19)#define AM437X_CTRL_USB2_OTGSESSEND_EN BIT(20) -#if IS_ENABLED (CONFIG_OMAP_CONTROL_USB ) -extern void omap_control_usb_phy_power (struct device *dev,int on); -extern void omap_control_usb_set_mode (struct device *dev, -enum omap_control_usb_mode mode); +#if IS_ENABLED (CONFIG_OMAP_CONTROL_PHY ) +void omap_control_phy_power (struct device *dev,int on); +void omap_control_usb_set_mode (struct device *dev, +enum omap_control_usb_mode mode);#else -static inline void omap_control_usb_phy_power (struct device *dev,int on) +static inline void omap_control_phy_power (struct device *dev,int on) { }
@@ -86,4 +86,4 @@ static inline void omap_control_usb_set_mode(struct device *dev, }#endif -#endif /* __OMAP_CONTROL_USB_H__ */ +#endif /* __OMAP_CONTROL_PHY_H__ */
Signature · 1 line
1.8.3.2
PATCH v2 2/13 phy: omap-control: Update DT binding information
In reply to Roger QuadrosMove omap-control binding information to the right location.
--- Documentation/devicetree/bindings/phy/ti-phy.txt | 25 ++++++++++++++++++++++ Documentation/devicetree/bindings/usb/omap-usb.txt | 24 --------------------- 2 files changed, 25 insertions(+), 24 deletions(-)
Documentation/devicetree/bindings/phy/ti-phy.txt +25 -0
@@ -1,5 +1,30 @@ TI PHY: DT DOCUMENTATION FOR PHYs in TI PLATFORMs +OMAP CONTROL PHY + +Required properties: + - compatible: Should be one of + "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4. + "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register + e.g. USB2_PHY on OMAP5. + "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control + e.g. USB3 PHY and SATA PHY on OMAP5. + "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on + DRA7 platform. + "ti,control-phy-am437usb2" - if it has power down register like USB2 PHY on + AM437 platform. + - reg : Address and length of the register set for the device. It contains + the address of "otghs_control" for control-phy-otghs or "power" register + for other types. + - reg-names: should be "otghs_control" control-phy-otghs and "power" for + other types. + +omap_control_usb: omap-control-usb at 4a002300 { + compatible = "ti,control-phy-otghs"; + reg = <0x4a00233c 0x4>; + reg-names = "otghs_control"; +}; + OMAP USB2 PHY Required properties:
Documentation/devicetree/bindings/usb/omap-usb.txt +0 -24
@@ -76,27 +76,3 @@ omap_dwc3 { ranges; }; -OMAP CONTROL USB - -Required properties: - - compatible: Should be one of - "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4. - "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register - e.g. USB2_PHY on OMAP5. - "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control - e.g. USB3 PHY and SATA PHY on OMAP5. - "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on - DRA7 platform. - "ti,control-phy-am437usb2" - if it has power down register like USB2 PHY on - AM437 platform. - - reg : Address and length of the register set for the device. It contains - the address of "otghs_control" for control-phy-otghs or "power" register - for other types. - - reg-names: should be "otghs_control" control-phy-otghs and "power" for - other types. - -omap_control_usb: omap-control-usb at 4a002300 { - compatible = "ti,control-phy-otghs"; - reg = <0x4a00233c 0x4>; - reg-names = "otghs_control"; -};
Signature · 1 line
1.8.3.2
PATCH v2 3/13 phy: omap-control: update dra7 and am437 usb2 bindings
In reply to Roger QuadrosThe dra7-usb2 and am437-usb2 bindings have not yet been used. Change them to be more elegant.
--- Documentation/devicetree/bindings/phy/ti-phy.txt | 4 ++-- drivers/phy/phy-omap-control.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/phy/ti-phy.txt +2 -2
@@ -9,9 +9,9 @@ Required properties: e.g. USB2_PHY on OMAP5. "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control e.g. USB3 PHY and SATA PHY on OMAP5. - "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on + "ti,control-phy-dra7-usb2" - if it has power down register like USB2 PHY on DRA7 platform. - "ti,control-phy-am437usb2" - if it has power down register like USB2 PHY on + "ti,control-phy-am437-usb2" - if it has power down register like USB2 PHY on AM437 platform. - reg : Address and length of the register set for the device. It contains the address of "otghs_control" for control-phy-otghs or "power" register
drivers/phy/phy-omap-control.c +2 -2
@@ -228,11 +228,11 @@ static const struct of_device_id omap_control_phy_id_table[] = { .data = &pipe3_data, }, { - .compatible = "ti,control-phy-dra7usb2", + .compatible = "ti,control-phy-dra7-usb2", .data = &dra7usb2_data, }, { - .compatible = "ti,control-phy-am437usb2", + .compatible = "ti,control-phy-am437-usb2", .data = &am437usb2_data, }, {},
Signature · 1 line
1.8.3.2
PATCH v2 4/13 phy: ti-pipe3: cleanup clock handling
In reply to Roger QuadrosAs this driver is no longer USB specific, use generic clock names.
- Use 'wkupclk', 'sysclk' and 'refclk' clock-names. Update DT binding info.
- Fix PLL_SD_SHIFT from 9 to 10
- Don't separate prepare/unprepare clock from enable/disable. This ensures optimal power savings.
Update omap5 usb3_phy device tree node.
--- Documentation/devicetree/bindings/phy/ti-phy.txt | 12 ++++++ arch/arm/boot/dts/omap5.dtsi | 7 ++- drivers/phy/phy-ti-pipe3.c | 55 ++++++++++++------------ 3 files changed, 46 insertions(+), 28 deletions(-)
Documentation/devicetree/bindings/phy/ti-phy.txt +12 -0
@@ -59,6 +59,12 @@ Required properties: filled in "reg". - #phy-cells: determine the number of cells that should be given in the phandle while referencing this phy. + - clocks: a list of phandles and clock-specifier pairs, one for each entry in + clock-names. + - clock-names: should include: + * "wkupclk" - wakup clock. + * "sysclk" - system clock. + * "refclk" - reference clock. Optional properties: - ctrl-module : phandle of the control module used by PHY driver to power on
@@ -74,4 +80,10 @@ usb3phy at 4a084400 { reg-names = "phy_rx", "phy_tx", "pll_ctrl"; ctrl-module = <&omap_control_usb>; #phy-cells = <0>; + clocks = <&usb_phy_cm_clk32k>, + <&sys_clkin>, + <&usb_otg_ss_refclk960m>; + clock-names = "wkupclk", + "sysclk", + "refclk"; };
arch/arm/boot/dts/omap5.dtsi +6 -1
@@ -778,7 +778,12 @@ <0x4a084800 0x64>, <0x4a084c00 0x40>; reg-names = "phy_rx", "phy_tx", "pll_ctrl"; - ctrl-module = <&omap_control_usb3phy>; + clocks = <&usb_phy_cm_clk32k>, + <&sys_clkin>, + <&usb_otg_ss_refclk960m>; + clock-names = "wkupclk", + "sysclk", + "refclk"; #phy-cells = <0>; }; };
drivers/phy/phy-ti-pipe3.c +28 -27
105 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v2 5/13 phy: ti-pipe3: Add SATA DPLL support
In reply to Roger QuadrosUSB and SATA DPLLs need different settings. Provide the SATA DPLL settings and use the proper DPLL settings based on device tree node's compatible_id.
Update the DT binding information.
--- Documentation/devicetree/bindings/phy/ti-phy.txt | 3 +- drivers/phy/phy-ti-pipe3.c | 76 +++++++++++++++++------- 2 files changed, 57 insertions(+), 22 deletions(-)
Documentation/devicetree/bindings/phy/ti-phy.txt +2 -1
@@ -53,7 +53,8 @@ usb2phy at 4a0ad080 { TI PIPE3 PHY Required properties: - - compatible: Should be "ti,phy-usb3". "ti,omap-usb3" is deprecated. + - compatible: Should be "ti,phy-usb3" or "ti,phy-pipe3-sata". + "ti,omap-usb3" is deprecated. - reg : Address and length of the register set for the device. - reg-names: The names of the register addresses corresponding to the registers filled in "reg".
drivers/phy/phy-ti-pipe3.c +55 -21
140 lines not on this page · raw message
Signature · 1 line
1.8.3.2
PATCH v2 6/13 phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY
In reply to Roger QuadrosSATA PHY doesn't need 'wkupclk; and 'refclk' so don't try to get them for SATA PHY.
--- drivers/phy/phy-ti-pipe3.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
drivers/phy/phy-ti-pipe3.c +15 -9
@@ -294,16 +294,22 @@ static int ti_pipe3_probe(struct platform_device *pdev) phy->dev = &pdev->dev; - phy->wkupclk =devm_clk_get (phy->dev,"wkupclk" ); -if (IS_ERR (phy->wkupclk)) { -dev_err (&pdev->dev,"unable to get wkupclk\n" ); -return PTR_ERR (phy->wkupclk); - } +if (!of_device_is_compatible (node,"ti,phy-pipe3-sata" )) { + + phy->wkupclk =devm_clk_get (phy->dev,"wkupclk" ); +if (IS_ERR (phy->wkupclk)) { +dev_err (&pdev->dev,"unable to get wkupclk\n" ); +return PTR_ERR (phy->wkupclk); + } - phy->refclk =devm_clk_get (phy->dev,"refclk" ); -if (IS_ERR (phy->refclk)) { -dev_err (&pdev->dev,"unable to get refclk\n" ); -return PTR_ERR (phy->refclk); + phy->refclk =devm_clk_get (phy->dev,"refclk" ); +if (IS_ERR (phy->refclk)) { +dev_err (&pdev->dev,"unable to get refclk\n" ); +return PTR_ERR (phy->refclk); + } + }else { + phy->wkupclk =ERR_PTR (-ENODEV ); + phy->refclk =ERR_PTR (-ENODEV ); } phy->sys_clk =devm_clk_get (phy->dev,"sysclk" );
Signature · 1 line
1.8.3.2
PATCH v2 7/13 phy: ti-pipe3: streamline PHY operations
In reply to Roger QuadrosLimit .power_on() and .power_off() to just control the PHY power and not the DPLL. The DPLL will be enabled in .init() and idled in .exit().
Don't reprogram the DPLL if it has been already locked by the bootloader. This fixes a problem with SATA, where it fails if SATA was used by the bootloader.
--- drivers/phy/phy-ti-pipe3.c | 114 +++++++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 51 deletions(-)
drivers/phy/phy-ti-pipe3.c +63 -51
@@ -47,7 +47,8 @@#define PLL_SD_MASK 0x0003FC00#define PLL_SD_SHIFT 10#define SET_PLL_GO 0x1 -#define PLL_TICOPWDN 0x10000 +#define PLL_LDOPWDN BIT(15) +#define PLL_TICOPWDN BIT(16)#define PLL_LOCK 0x2#define PLL_IDLE 0x1
@@ -56,7 +57,8 @@* value required for the PIPE3PHY_PLL_CONFIGURATION2.PLL_IDLE status * to be correctly reflected in the PIPE3PHY_PLL_STATUS register. */ -# define PLL_IDLE_TIME 100; +#define PLL_IDLE_TIME 100/* in milliseconds */ +#define PLL_LOCK_TIME 100/* in milliseconds */ struct pipe3_dpll_params {u16 m;
@@ -132,24 +134,6 @@ static struct pipe3_dpll_params *ti_pipe3_get_dpll_params(struct ti_pipe3 *phy)static int ti_pipe3_power_off (struct phy *x) {struct ti_pipe3 *phy =phy_get_drvdata (x); -int val; -int timeout =PLL_IDLE_TIME ; - - val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_CONFIGURATION2 ); - val |=PLL_IDLE ; -ti_pipe3_writel (phy->pll_ctrl_base,PLL_CONFIGURATION2 , val); - -do { - val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_STATUS ); -if (val &PLL_TICOPWDN ) -break ; -udelay (5 ); - }while (--timeout); - -if (!timeout) { -dev_err (phy->dev,"power off failed\n" ); -return -EBUSY ; - }omap_control_phy_power (phy->control_dev,0 );
@@ -159,44 +143,34 @@ static int ti_pipe3_power_off(struct phy *x)static int ti_pipe3_power_on (struct phy *x) {struct ti_pipe3 *phy =phy_get_drvdata (x); -int val; -int timeout =PLL_IDLE_TIME ; - - val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_CONFIGURATION2 ); - val &= ~PLL_IDLE ; -ti_pipe3_writel (phy->pll_ctrl_base,PLL_CONFIGURATION2 , val); -do { - val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_STATUS ); -if (!(val &PLL_TICOPWDN )) -break ; -udelay (5 ); - }while (--timeout); - -if (!timeout) { -dev_err (phy->dev,"power on failed\n" ); -return -EBUSY ; - } +omap_control_phy_power (phy->control_dev,1 );return 0 ; } -static void ti_pipe3_dpll_relock (struct ti_pipe3 *phy) +static int ti_pipe3_dpll_wait_lock (struct ti_pipe3 *phy) {u32 val;unsigned long timeout; -ti_pipe3_writel (phy->pll_ctrl_base,PLL_GO ,SET_PLL_GO ); - - timeout = jiffies +msecs_to_jiffies (20 ); + timeout = jiffies +msecs_to_jiffies (PLL_LOCK_TIME );do { +cpu_relax (); val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_STATUS );if (val &PLL_LOCK )break ; - }while (!WARN_ON (time_after (jiffies, timeout))); + }while (!time_after (jiffies, timeout)); + +if (!(val &PLL_LOCK )) { +dev_err (phy->dev,"DPLL failed to lock\n" ); +return -EBUSY ; + } + +return 0 ; } -static int ti_pipe3_dpll_lock (struct ti_pipe3 *phy) +static int ti_pipe3_dpll_program (struct ti_pipe3 *phy) {u32 val;struct pipe3_dpll_params *dpll_params;
@@ -230,27 +204,65 @@ static int ti_pipe3_dpll_lock(struct ti_pipe3 *phy) val |= dpll_params->sd <<PLL_SD_SHIFT ;ti_pipe3_writel (phy->pll_ctrl_base,PLL_CONFIGURATION3 , val); -ti_pipe3_dpll_relock (phy); +ti_pipe3_writel (phy->pll_ctrl_base,PLL_GO ,SET_PLL_GO ); -return 0 ; +return ti_pipe3_dpll_wait_lock (phy); }static int ti_pipe3_init (struct phy *x) {struct ti_pipe3 *phy =phy_get_drvdata (x); -int ret; +u32 val; +int ret =0 ; - ret =ti_pipe3_dpll_lock (phy); -if (ret) -return ret; +/* Bring it out of IDLE if it is IDLE */ + val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_CONFIGURATION2 ); +if (val &PLL_IDLE ) { + val &= ~PLL_IDLE ; +ti_pipe3_writel (phy->pll_ctrl_base,PLL_CONFIGURATION2 , val); + ret =ti_pipe3_dpll_wait_lock (phy); + } -omap_control_phy_power (phy->control_dev,1 ); +/* Program the DPLL only if not locked */ + val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_STATUS ); +if (!(val &PLL_LOCK )) +if (ti_pipe3_dpll_program (phy)) +return -EINVAL ; -return 0 ; +return ret; } +static int ti_pipe3_exit (struct phy *x) +{ +struct ti_pipe3 *phy =phy_get_drvdata (x); +u32 val; +unsigned long timeout; + +/* Put DPLL in IDLE mode */ + val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_CONFIGURATION2 ); + val |=PLL_IDLE ; +ti_pipe3_writel (phy->pll_ctrl_base,PLL_CONFIGURATION2 , val); + +/* wait for LDO and Oscillator to power down */ + timeout = jiffies +msecs_to_jiffies (PLL_IDLE_TIME ); +do { +cpu_relax (); + val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_STATUS ); +if ((val &PLL_TICOPWDN ) && (val &PLL_LDOPWDN )) +break ; + }while (!time_after (jiffies, timeout)); + +if (!(val &PLL_TICOPWDN ) || !(val &PLL_LDOPWDN )) { +dev_err (phy->dev,"Failed to power down: PLL_STATUS 0x%x\n" , + val); +return -EBUSY ; + } + +return 0 ; +}static struct phy_ops ops = { .init = ti_pipe3_init, + .exit = ti_pipe3_exit, .power_on = ti_pipe3_power_on, .power_off = ti_pipe3_power_off, .owner =THIS_MODULE ,
Signature · 1 line
1.8.3.2
PATCH v2 8/13 phy: ti-pipe3: Fix suspend/resume and module reload
In reply to Roger QuadrosDue to Errata i783, SATA breaks if its DPLL is idled. The recommeded workaround to issue a softreset to the SATA controller doesn't seem to work. Here we just prevent SATA DPLL from Idling and hence avoid the issue altogether.
--- drivers/phy/phy-ti-pipe3.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/phy/phy-ti-pipe3.c +4 -0
@@ -238,6 +238,10 @@ static int ti_pipe3_exit(struct phy *x)u32 val;unsigned long timeout; +/* SATA DPLL can't be powered down due to Errata i783 */ +if (of_device_is_compatible (phy->dev->of_node,"ti,phy-pipe3-sata" )) +return 0 ; +/* Put DPLL in IDLE mode */ val =ti_pipe3_readl (phy->pll_ctrl_base,PLL_CONFIGURATION2 ); val |=PLL_IDLE ;
Signature · 1 line
1.8.3.2
PATCH v2 9/13 phy: omap: Depend on OMAP_OCP2SCP bus driver
In reply to Roger QuadrosThe OMAP_USB2 and OMAP_PIPE3 PHY devices will not be detected if the OMAP_OCP2SCP bus driver is not present. Make them depend on it.
--- drivers/phy/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
drivers/phy/Kconfig +2 -0
@@ -47,6 +47,7 @@ config OMAP_USB2 depends on USB_PHY select GENERIC_PHY select OMAP_CONTROL_PHY + depends on OMAP_OCP2SCP help Enable this to support the transceiver that is part of SOC. This driver takes care of all the PHY functionality apart from comparator.
@@ -58,6 +59,7 @@ config TI_PIPE3 depends on ARCH_OMAP2PLUS || COMPILE_TEST select GENERIC_PHY select OMAP_CONTROL_PHY + depends on OMAP_OCP2SCP help Enable this to support the PIPE3 PHY that is part of TI SOCs. This driver takes care of all the PHY functionality apart from comparator.
Signature · 1 line
1.8.3.2
PATCH v2 10/13 ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
In reply to Roger QuadrosFrom: Keshava Munegowda <[email protected]>
Create hwmods for ocp2scp3 and sata modules.
[Roger Q] Clean up.
--- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 73 ++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+)
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +73 -0
@@ -1726,6 +1726,77 @@ static struct omap_hwmod omap54xx_wd_timer2_hwmod = { }, }; +/* +* 'ocp2scp' class +* bridge to transform ocp interface protocol to scp (serial control port) +* protocol +*/ +/* ocp2scp3 */ +static struct omap_hwmod omap54xx_ocp2scp3_hwmod; +/* l4_cfg -> ocp2scp3 */ +static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp3 = { + .master = &omap54xx_l4_cfg_hwmod, + .slave = &omap54xx_ocp2scp3_hwmod, + .clk ="l4_root_clk_div" , + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; + +static struct omap_hwmod omap54xx_ocp2scp3_hwmod = { + .name ="ocp2scp3" , + .class = &omap54xx_ocp2scp_hwmod_class, + .clkdm_name ="l3init_clkdm" , + .prcm = { + .omap4 = { + .clkctrl_offs =OMAP54XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET , + .context_offs =OMAP54XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET , + .modulemode =MODULEMODE_HWCTRL , + }, + }, +}; + +/* +* 'sata' class +* sata: serial ata interface gen2 compliant ( 1 rx/ 1 tx) +*/ + +static struct omap_hwmod_class_sysconfig omap54xx_sata_sysc = { + .sysc_offs =0x0000 , + .sysc_flags = (SYSC_HAS_MIDLEMODE |SYSC_HAS_SIDLEMODE ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART | +SIDLE_SMART_WKUP |MSTANDBY_FORCE |MSTANDBY_NO | +MSTANDBY_SMART |MSTANDBY_SMART_WKUP ), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class omap54xx_sata_hwmod_class = { + .name ="sata" , + .sysc = &omap54xx_sata_sysc, +}; + +/* sata */ +static struct omap_hwmod omap54xx_sata_hwmod = { + .name ="sata" , + .class = &omap54xx_sata_hwmod_class, + .clkdm_name ="l3init_clkdm" , + .flags =HWMOD_SWSUP_SIDLE |HWMOD_SWSUP_MSTANDBY , + .main_clk ="func_48m_fclk" , + .mpu_rt_idx =1 , + .prcm = { + .omap4 = { + .clkctrl_offs =OMAP54XX_CM_L3INIT_SATA_CLKCTRL_OFFSET , + .context_offs =OMAP54XX_RM_L3INIT_SATA_CONTEXT_OFFSET , + .modulemode =MODULEMODE_SWCTRL , + }, + }, +}; + +/* l4_cfg -> sata */ +static struct omap_hwmod_ocp_if omap54xx_l4_cfg__sata = { + .master = &omap54xx_l4_cfg_hwmod, + .slave = &omap54xx_sata_hwmod, + .clk ="l3_iclk_div" , + .user =OCP_USER_MPU |OCP_USER_SDMA , +};/* * Interfaces
@@ -2399,6 +2470,8 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = { &omap54xx_l4_cfg__usb_tll_hs, &omap54xx_l4_cfg__usb_otg_ss, &omap54xx_l4_wkup__wd_timer2, + &omap54xx_l4_cfg__ocp2scp3, + &omap54xx_l4_cfg__sata, NULL, };
Signature · 1 line
1.8.3.2
PATCH v2 11/13 ARM: dts: omap5: add sata node
In reply to Roger QuadrosFrom: Balaji T K <[email protected]>
Add support for sata.
[Roger Q] Clean up.
--- arch/arm/boot/dts/omap5.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm/boot/dts/omap5.dtsi +40 -0
@@ -828,6 +828,46 @@ #thermal-sensor-cells = <1>; }; + + omap_control_sata: control-phy at 4a002374 { + compatible = "ti,control-phy-pipe3"; + reg = <0x4a002374 0x4>; + reg-names = "power"; + clocks = <&sys_clkin>; + clock-names = "sysclk"; + }; + + /* OCP2SCP3 */ + ocp2scp at 4a090000 { + compatible = "ti,omap-ocp2scp"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x4a090000 0x20>; + ranges; + ti,hwmods = "ocp2scp3"; + sata_phy: phy at 4a096000 { + compatible = "ti,phy-pipe3-sata"; + reg = <0x4A096000 0x80>, /* phy_rx */ + <0x4A096400 0x64>, /* phy_tx */ + <0x4A096800 0x40>; /* pll_ctrl */ + reg-names = "phy_rx", "phy_tx", "pll_ctrl"; + ctrl-module = <&omap_control_sata>; + clocks = <&sys_clkin>; + clock-names = "sysclk"; + #phy-cells = <0>; + }; + }; + + sata: sata at 4a141100 { + compatible = "snps,dwc-ahci"; + reg = <0x4a140000 0x1100>, <0x4a141100 0x7>; + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; + phys = <&sata_phy>; + phy-names = "sata-phy"; + clocks = <&sata_ref_clk>; + ti,hwmods = "sata"; + }; + }; };
Signature · 1 line
1.8.3.2
PATCH v2 12/13 ARM: DRA7: hwmod: Add ocp2scp3 and sata hwmods
In reply to Roger QuadrosFrom: Nikhil Devshatwar <[email protected]>
Add hwmods for ocp2scp3 and sata modules.
[Roger Q] Clean up.
--- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +26 -5
@@ -1215,6 +1215,30 @@ static struct omap_hwmod dra7xx_ocp2scp1_hwmod = { }, }; +/* ocp2scp3 */ +static struct omap_hwmod dra7xx_ocp2scp3_hwmod; + +/* l4_cfg -> ocp2scp3 */ +static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = { + .master = &dra7xx_l4_cfg_hwmod, + .slave = &dra7xx_ocp2scp3_hwmod, + .clk ="l4_root_clk_div" , + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; + +static struct omap_hwmod dra7xx_ocp2scp3_hwmod = { + .name ="ocp2scp3" , + .class = &dra7xx_ocp2scp_hwmod_class, + .clkdm_name ="l3init_clkdm" , + .prcm = { + .omap4 = { + .clkctrl_offs =DRA7XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET , + .context_offs =DRA7XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET , + .modulemode =MODULEMODE_HWCTRL , + }, + }, +}; +/* * 'qspi' class *
@@ -1268,9 +1292,6 @@ static struct omap_hwmod_class dra7xx_sata_hwmod_class = { };/* sata */ -static struct omap_hwmod_opt_clk sata_opt_clks[] = { - { .role ="ref_clk" , .clk ="sata_ref_clk" }, -};static struct omap_hwmod dra7xx_sata_hwmod = { .name ="sata" ,
@@ -1278,6 +1299,7 @@ static struct omap_hwmod dra7xx_sata_hwmod = { .clkdm_name = "l3init_clkdm", .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, .main_clk = "func_48m_fclk", + .mpu_rt_idx = 1, .prcm = { .omap4 = { .clkctrl_offs = DRA7XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
@@ -1285,8 +1307,6 @@ static struct omap_hwmod dra7xx_sata_hwmod = { .modulemode = MODULEMODE_SWCTRL, }, }, - .opt_clks = sata_opt_clks, - .opt_clks_cnt = ARRAY_SIZE(sata_opt_clks), };/*
@@ -2683,6 +2703,7 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per1__mmc4, &dra7xx_l4_cfg__mpu, &dra7xx_l4_cfg__ocp2scp1, + &dra7xx_l4_cfg__ocp2scp3, &dra7xx_l3_main_1__qspi, &dra7xx_l4_cfg__sata, &dra7xx_l4_cfg__smartreflex_core,
Signature · 1 line
1.8.3.2
Quoted 62 lines · Roger Quadros
Hi,
This series adds SATA support for OMAP5 uevm and DRA7-evm boards.
- Cleans up the ti-pipe3 PHY driver
- Adds SATA DPLL support to ti-pipe3 PHY driver
- Adds SATA nodes to hwmod and SoC DT dataPatches are based on 3.14-rc4 with balbi/next, linux-phy/next and omap-for-v3.15/dt merged on top..
To test SATA you will also need [1].
[1] - http://article.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/7285
Changelog:
v2
- use 'depends on' instead of 'select' OCP2SCP bus driver.
- Changed DT bindings for dra7-usb2 and am437-usb2 phy.cheers,
-roger---
Balaji T K (2):
ARM: dts: omap5: add sata node
ARM: dts: dra7: add OCP2SCP3 and SATA nodesKeshava Munegowda (1):
ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmodsKishon Vijay Abraham I (1):
phy: rename structomap_control_usbto structomap_control_phyNikhil Devshatwar (1):
ARM: DRA7: hwmod: Add ocp2scp3 and sata hwmodsRoger Quadros (8):
phy: omap-control: Update DT binding information
phy: omap-control: update dra7 and am437 usb2 bindings
phy: ti-pipe3: cleanup clock handling
phy: ti-pipe3: Add SATA DPLL support
phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY
phy: ti-pipe3: streamline PHY operations
phy: ti-pipe3: Fix suspend/resume and module reload
phy: omap: Depend onOMAP_OCP2SCPbus driverDocumentation/devicetree/bindings/phy/ti-phy.txt | 40 ++- Documentation/devicetree/bindings/usb/omap-usb.txt | 24 -- arch/arm/boot/dts/dra7.dtsi | 39 +++ arch/arm/boot/dts/omap5.dtsi | 47 ++- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 73 +++++ arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 31 +- drivers/phy/Kconfig | 16 +- drivers/phy/Makefile | 1 + drivers/phy/phy-omap-control.c | 320 +++++++++++++++++++++ drivers/phy/phy-omap-usb2.c | 8 +- drivers/phy/phy-ti-pipe3.c | 269 ++++++++++------- drivers/usb/musb/omap2430.c | 2 +- drivers/usb/phy/Kconfig | 10 - drivers/usb/phy/Makefile | 1 -
Quoted 9 lines
drivers/usb/phy/phy-omap-control.c | 319 -------------------- include/linux/phy/omap_control_phy.h | 89 ++++++ include/linux/usb/omap_control_usb.h | 89 ------ 17 files changed, 815 insertions(+), 563 deletions(-) create mode 100644 drivers/phy/phy-omap-control.c delete mode 100644 drivers/usb/phy/phy-omap-control.c create mode 100644 include/linux/phy/omap_control_phy.h delete mode 100644 include/linux/usb/omap_control_usb.h
oops. forgot to add -M :(.
I'll resend just the 1st patch since it contains the file rename. updated diffstat is below.
Documentation/devicetree/bindings/phy/ti-phy.txt | 40 ++-
Documentation/devicetree/bindings/usb/omap-usb.txt | 24 --
arch/arm/boot/dts/dra7.dtsi | 39 +++
arch/arm/boot/dts/omap5.dtsi | 47 +++-
arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 73 ++++++
arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 31 ++-
drivers/phy/Kconfig | 16 +-
drivers/phy/Makefile | 1 +
drivers/{usb => }/phy/phy-omap-control.c | 169 ++++++-------
drivers/phy/phy-omap-usb2.c | 8 +-
drivers/phy/phy-ti-pipe3.c | 269 +++++++++++++--------
drivers/usb/musb/omap2430.c | 2 +-
drivers/usb/phy/Kconfig | 10 -
drivers/usb/phy/Makefile | 1 -
.../omap_control_usb.h => phy/omap_control_phy.h} | 36 +--
15 files changed, 509 insertions(+), 257 deletions(-)
rename drivers/{usb => }/phy/phy-omap-control.c (53%)
rename include/linux/{usb/omap_control_usb.h => phy/omap_control_phy.h} (68%)cheers,
-roger
PATCH v2 13/13 ARM: dts: dra7: add OCP2SCP3 and SATA nodes
In reply to Roger QuadrosFrom: Balaji T K <[email protected]>
Add nodes for OCP2SCP3 bus, SATA controller and SATA PHY.
[Roger Q] Clean up.
--- arch/arm/boot/dts/dra7.dtsi | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm/boot/dts/dra7.dtsi +39 -0
@@ -772,6 +772,45 @@ dma-names = "tx0", "rx0"; status = "disabled"; }; + + omap_control_sata: control-phy at 4a002374 { + compatible = "ti,control-phy-pipe3"; + reg = <0x4a002374 0x4>; + reg-names = "power"; + clocks = <&sys_clkin1>; + clock-names = "sysclk"; + }; + + /* OCP2SCP3 */ + ocp2scp at 4a090000 { + compatible = "ti,omap-ocp2scp"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + reg = <0x4a090000 0x20>; + ti,hwmods = "ocp2scp3"; + sata_phy: phy at 4A096000 { + compatible = "ti,phy-pipe3-sata"; + reg = <0x4A096000 0x80>, /* phy_rx */ + <0x4A096400 0x64>, /* phy_tx */ + <0x4A096800 0x40>; /* pll_ctrl */ + reg-names = "phy_rx", "phy_tx", "pll_ctrl"; + ctrl-module = <&omap_control_sata>; + clocks = <&sys_clkin1>; + clock-names = "sysclk"; + #phy-cells = <0>; + }; + }; + + sata: sata at 4a141100 { + compatible = "snps,dwc-ahci"; + reg = <0x4a140000 0x1100>, <0x4a141100 0x7>; + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; + phys = <&sata_phy>; + phy-names = "sata-phy"; + clocks = <&sata_ref_clk>; + ti,hwmods = "sata"; + }; }; };
Signature · 1 line
1.8.3.2