(unknown)
Subsystems (2)
Quoted 1 line
From
a97962c53a7a441f3a08f9911f84f9b40738a989Mon Sep 17 00:00:00 2001
Message-Id: <a97962c53a7a441f3a08f9911f84f9b40738a989.1416158605.git.juergen@kreuzholzen.de>
In-Reply-To: <[email protected]>
References: <[email protected]>
From: Juergen Borleis <[email protected]>
Date: Sun, 9 Nov 2014 20:14:25 +0100
Subject: [PATCH 5/8] Samsung/S3C6410/OTG-phy: add S3C6410 support
To: [email protected]
Cc: [email protected]
In order to make the internal OTG and OHCI controller work we need to handle the OTG phy as it is also the source of the 48 MHz clock for both USB units.
Signed-off-by Juergen Borleis <[email protected]>
--- drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-s3c6410-usb2.c | 346 +++++++++++++++++++++++++++++++++++++++++ drivers/phy/phy-samsung-usb2.c | 12 ++ drivers/phy/phy-samsung-usb2.h | 3 + 5 files changed, 371 insertions(+) create mode 100644 drivers/phy/phy-s3c6410-usb2.c
drivers/phy/Kconfig +9 -0
@@ -166,6 +166,15 @@ config PHY_SAMSUNG_USB2 for particular PHYs will be enabled based on the SoC type in addition to this driver. +config PHY_S3C6410_USB2 + bool "Support for S3C6410" + depends on PHY_SAMSUNG_USB2 + depends on ARCH_S3C64XX + help + Enable USB 2.0 PHY support for S3C6410. This option is required in + order to make the SoC's USB 2.0 OTG and the USB 1.1 OHCI work, since + both USB units depend on the 48 MHz clock the USB 2.0 PHY provides. + config PHY_S5PV210_USB2 bool "Support for S5PV210" depends on PHY_SAMSUNG_USB2
drivers/phy/Makefile +1 -0
@@ -23,6 +23,7 @@ phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4210_USB2) += phy-exynos4210-usb2.o phy-exynos-usb2-$(CONFIG_PHY_EXYNOS4X12_USB2) += phy-exynos4x12-usb2.o phy-exynos-usb2-$(CONFIG_PHY_EXYNOS5250_USB2) += phy-exynos5250-usb2.o phy-exynos-usb2-$(CONFIG_PHY_S5PV210_USB2) += phy-s5pv210-usb2.o +phy-exynos-usb2-$(CONFIG_PHY_S3C6410_USB2) += phy-s3c6410-usb2.o obj-$(CONFIG_PHY_EXYNOS5_USBDRD) += phy-exynos5-usbdrd.o obj-$(CONFIG_PHY_QCOM_APQ8064_SATA) += phy-qcom-apq8064-sata.o obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA) += phy-qcom-ipq806x-sata.o
drivers/phy/phy-s3c6410-usb2.c new file +346 -0
346 lines not on this page · raw message
drivers/phy/phy-samsung-usb2.c +12 -0
@@ -117,6 +117,12 @@ static const struct of_device_id samsung_usb2_phy_of_match[] = { .data = &s5pv210_usb2_phy_config, },#endif +#ifdef CONFIG_PHY_S3C6410_USB2 + { + .compatible = "samsung,s3c6410-usb2-phy", + .data = &s3c6410_usb2_phy_config, + }, +#endif { }, };MODULE_DEVICE_TABLE (of, samsung_usb2_phy_of_match);
@@ -178,6 +184,12 @@ static int samsung_usb2_phy_probe(struct platform_device *pdev) } } + drv->power =devm_regulator_get (dev,"analog" ); +if (IS_ERR (drv->power)) { +dev_info (dev,"No power supply provided. Trying to continue without one\n" ); + drv->power =NULL ; + } + drv->clk =devm_clk_get (dev,"phy" );if (IS_ERR (drv->clk)) {dev_err (dev,"Failed to get clock of phy controller\n" );
drivers/phy/phy-samsung-usb2.h +3 -0
@@ -14,6 +14,7 @@#include <linux/clk.h> #include <linux/phy/phy.h> +#include <linux/regulator/consumer.h> #include <linux/device.h> #include <linux/regmap.h> #include <linux/spinlock.h>
@@ -43,6 +44,7 @@ struct samsung_usb2_phy_driver {void __iomem *reg_phy;struct regmap *reg_pmu;struct regmap *reg_sys; +struct regulator *power;spinlock_t lock;struct samsung_usb2_phy_instance instances[0 ]; };
@@ -68,4 +70,5 @@ extern const struct samsung_usb2_phy_config exynos4210_usb2_phy_config;extern const struct samsung_usb2_phy_config exynos4x12_usb2_phy_config;extern const struct samsung_usb2_phy_config exynos5250_usb2_phy_config;extern const struct samsung_usb2_phy_config s5pv210_usb2_phy_config; +extern const struct samsung_usb2_phy_config s3c6410_usb2_phy_config;#endif
Signature · 1 line
1.8.1