Re: [PATCH v2 6/6] arm: exynos: removing exynos-drm device registration from non-dt platforms
On Sat, Oct 13, 2012 at 7:16 PM, Tomasz Figa tomasz.f...@gmail.com wrote: On Saturday 13 of October 2012 02:12:35 Rahul Sharma wrote: As exynos-drm is a software device, its registration is moved to the exynos drm driver. This will provide generic solution for device registration for dt and non-dt platforms. Corresponding patches are posted to dri-devel list. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/Makefile |1 - arch/arm/mach-exynos/dev-drm.c | 29 arch/arm/mach-exynos/mach-nuri.c |3 -- arch/arm/mach-exynos/mach-origen.c |3 -- arch/arm/mach-exynos/mach-smdk4x12.c |3 -- arch/arm/mach-exynos/mach-smdkv310.c |3 -- arch/arm/mach-exynos/mach-universal_c210.c |3 -- arch/arm/plat-samsung/include/plat/devs.h |2 - 8 files changed, 0 insertions(+), 47 deletions(-) delete mode 100644 arch/arm/mach-exynos/dev-drm.c Hmm, shouldn't this patch belong to the series adding registration in the driver? (http://comments.gmane.org/gmane.comp.video.dri.devel/75121) It doesn't look to be directly related to adding dt support for exynos5 hdmi. Best regards, Tomasz Figa Hi Tomasz, Actually other patch set is also about adding platform device to drm driver, not a best place for the following patch. I added it here because these deletions are done as part of adding DT support for Exynos5. But If you still feel it is totally out of place, I will post it again as an independent patch. regards, Rahul Sharma. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V5 2/2] video: exynos_dp: device tree documentation
On Saturday, October 13, 2012 5:48 AM Ajay kumar wrote Add documentation for the DT bindings in exynos display port driver. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- .../devicetree/bindings/video/exynos_dp.txt| 80 1 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt new file mode 100644 index 000..e19594b --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt @@ -0,0 +1,80 @@ +The Exynos display port interface should be configured based on the +based on the type of panel connected to it. 'based on' is duplicated. So, please fix it as bellows: +The Exynos display port interface should be configured based on +the type of panel connected to it. + +We use two nodes: + -display-port-controller node + -dptx-phy node(defined inside display-port-controller node) + +For the DP-PHY initialization, we use the dptx-phy node. +Required properties for dptx-phy: + -reg: + Base address of DP PHY register. + -samsung,enable-mask: + The bit-mask used to enable/disable DP PHY. + +For the Panel initialization, we read data from display-port-controller node. +Required properties for display-port-controller: + -compatible: + should be samsung,exynos5-dp. + -reg: + physical base address of the controller and length + of memory mapped region. + -interrupts: + interrupt combiner values. + -interrupt-parent: + phandle to Interrupt combiner node. + -samsung,color-space: + input video data format. + COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 + -samsung,dynamic-range: + dynamic range for input video data. + VESA = 0, CEA = 1 + -samsung,ycbcr-coeff: + YCbCr co-efficients for input video. + COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1 + -samsung,color-depth: + number of bits per colour component. + COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3 + -samsung,link-rate: + link rate supported by the panel. + LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A + -samsung,lane-count: + number of lanes supported by the panel. + LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 + +Optional properties for display-port-controller: + -interlaced: + interlace scan mode. + Progressive if defined, Interlaced if not defined + -vsync-active-high: + VSYNC polarity configuration. + High if defined, Low if not defined + -hsync-active-high: + HSYNC polarity configuration. + High if defined, Low if not defined + +Example: + +SOC specific portion: + display-port-controller { + compatible = samsung,exynos5-dp; + reg = 0x145b 0x1; + interrupts = 10 3; + interrupt-parent = combiner; + + dptx-phy { + reg = 0x10040720; + samsung,enable-mask = 1; + }; + +}; + +Board Specific portion: + display-port-controller { + samsung,color-space = 0; + samsung,dynamic-range = 0; + samsung,ycbcr-coeff = 0; + samsung,color-depth = 1; + samsung,link-rate = 0x0a; + samsung,lane-count = 2; + }; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V5 1/2] video: exynos_dp: Add device tree support to DP driver
On Saturday, October 13, 2012 6:44 AM Sylwester Nawrocki wrote On 10/12/2012 10:47 PM, Ajay Kumar wrote: This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Signed-off-by: Ajay Kumarajaykumar...@samsung.com Acked-by: Jingoo Hanjg1@samsung.com --- drivers/video/exynos/exynos_dp_core.c | 161 ++--- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 149 insertions(+), 14 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index d55470e..62932ba 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #includelinux/io.h #includelinux/interrupt.h #includelinux/delay.h +#includelinux/of.h #includevideo/exynos_dp.h @@ -856,6 +857,99 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void *arg) return IRQ_HANDLED; } +#ifdef CONFIG_OF +struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev) +{ + struct device_node *dp_node = dev-of_node; + struct exynos_dp_platdata *pd; + struct video_info *dp_video_config; + + pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); + if (!pd) { + dev_err(dev, memory allocation for pdata failed\n); + return ERR_PTR(-ENOMEM); + } + dp_video_config = devm_kzalloc(dev, + sizeof(*dp_video_config), GFP_KERNEL); + + if (!dp_video_config) { + dev_err(dev, memory allocation for video config failed\n); + return ERR_PTR(-ENOMEM); + } + pd-video_info = dp_video_config; + + if (of_get_property(dp_node, hsync-active-high, NULL)) + dp_video_config-h_sync_polarity = 1; + + if (of_get_property(dp_node, vsync-active-high, NULL)) + dp_video_config-v_sync_polarity = 1; + + if (of_get_property(dp_node, interlaced, NULL)) + dp_video_config-interlaced = 1; of_property_read_bool() could also be used here. OK, right. of_property_read_bool() would be better. + + of_property_read_u32(dp_node, samsung,color-space, + dp_video_config-color_space); + + of_property_read_u32(dp_node, samsung,dynamic-range, + dp_video_config-dynamic_range); + + of_property_read_u32(dp_node, samsung,ycbcr-coeff, + dp_video_config-ycbcr_coeff); + + of_property_read_u32(dp_node, samsung,color-depth, + dp_video_config-color_depth); + + of_property_read_u32(dp_node, samsung,link-rate, + dp_video_config-link_rate); + + of_property_read_u32(dp_node, samsung,lane-count, + dp_video_config-lane_count); Shouldn't it be checked whether all these required properties are present ? If someone forgets to specify any one the driver will silently ignore it, not giving a clue what's wrong. OK, right. + return pd; +} + +void exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) +{ + struct device_node *dp_phy_node; + u32 phy_base; + void *virt_phy_base; + + dp_phy_node = of_find_node_by_name(dp-dev-of_node, dptx-phy); + if (!dp_phy_node) { + dp-dp_phy_addr = NULL; Is this required ? You've allocated dp with kzalloc(). OK, right. + return; + } + + of_property_read_u32(dp_phy_node, reg,phy_base); + of_property_read_u32(dp_phy_node, samsung,enable-mask, + dp-enable_mask); I think you should check the return values, these are required properties. Some error logs might be useful here. OK, right. + virt_phy_base = ioremap(phy_base, SZ_4); How about assigning to dp-dp_phy_addr directly and gettting rid of virt_phy_base ? OK, right. There is no reason, virt_phy_base should be removed. + if (!virt_phy_base) { + dev_err(dp-dev, failed to ioremap dp-phy\n); + dp-dp_phy_addr = NULL; + return; + } + dp-dp_phy_addr = virt_phy_base; +} + +void exynos_dp_phy_init(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-dp_phy_addr); + reg |= dp-enable_mask; + __raw_writel(reg, dp-dp_phy_addr); +} + +void exynos_dp_phy_exit(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-dp_phy_addr); + reg= ~(dp-enable_mask); + __raw_writel(reg, dp-dp_phy_addr); +} +#endif /* CONFIG_OF */ + static int __devinit exynos_dp_probe(struct platform_device *pdev) { struct resource *res; @@ -864,12 +958,6 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev) int ret = 0; - pdata = pdev-dev.platform_data; - if
Re: [PATCH 4/6] ARM: S3C2410: I2C driver polling mode support
Am Dienstag, 9. Oktober 2012, 13:48:50 schrieb Vasanth Ananthan: This patch adds polling mode support for i2c s3c-2410 driver. The I2C_SATAPHY controller lacks an interrupt line but the s3c-2410 driver is interrupt driven. Hence this support is required for functioning of the I2C_SATAPHY controller. Signed-off-by: Vasanth Ananthan vasant...@samsung.com --- drivers/i2c/busses/i2c-s3c2410.c | 84 +- 1 files changed, 65 insertions(+), 19 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 5ae3b02..699b530 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c [...] @@ -102,10 +103,14 @@ static struct platform_device_id s3c24xx_driver_ids[] = { }; MODULE_DEVICE_TABLE(platform, s3c24xx_driver_ids); +static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat); + #ifdef CONFIG_OF static const struct of_device_id s3c24xx_i2c_match[] = { { .compatible = samsung,s3c2410-i2c, .data = (void *)0 }, { .compatible = samsung,s3c2440-i2c, .data = (void *)QUIRK_S3C2440 }, + { .compatible = samsung,s3c2440-sataphy-i2c, + .data = (void *)(QUIRK_S3C2440|QUIRK_SATAPHY|QUIRK_NO_GPIO) }, { .compatible = samsung,s3c2440-hdmiphy-i2c, .data = (void *)(QUIRK_S3C2440 | QUIRK_HDMIPHY | QUIRK_NO_GPIO) }, {}, Out of curiosity, why is it called s3c2440-sataphy-i2c when it's an exynos specific component? Heiko -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V6 1/2] video: exynos_dp: Add device tree support to DP driver
From: Ajay Kumar ajaykumar...@samsung.com This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com Signed-off-by: Jingoo Han jg1@samsung.com --- This patch is tested with Exynos5250. Changes since v6: - Check return values of required properties - Replace dp_phy_addr with phy_addr - Remove unnecessary NULL deference checking for 'pdata' - Remove unncessary 'virt_phy_base' variable - Make functions static - Fix build errors when CONFIG_OF option is diabled - Add return values to exynos_dp_dt_parse_phydata() drivers/video/exynos/exynos_dp_core.c | 206 ++--- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 194 insertions(+), 14 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index d55470e..0d9c0ee 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include linux/io.h #include linux/interrupt.h #include linux/delay.h +#include linux/of.h #include video/exynos_dp.h @@ -856,6 +857,145 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void *arg) return IRQ_HANDLED; } +#ifdef CONFIG_OF +static struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev) +{ + struct device_node *dp_node = dev-of_node; + struct exynos_dp_platdata *pd; + struct video_info *dp_video_config; + + pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); + if (!pd) { + dev_err(dev, memory allocation for pdata failed\n); + return ERR_PTR(-ENOMEM); + } + dp_video_config = devm_kzalloc(dev, + sizeof(*dp_video_config), GFP_KERNEL); + + if (!dp_video_config) { + dev_err(dev, memory allocation for video config failed\n); + return ERR_PTR(-ENOMEM); + } + pd-video_info = dp_video_config; + + dp_video_config-h_sync_polarity = + of_property_read_bool(dp_node, hsync-active-high); + + dp_video_config-v_sync_polarity = + of_property_read_bool(dp_node, vsync-active-high); + + dp_video_config-interlaced = + of_property_read_bool(dp_node, interlaced); + + if (of_property_read_u32(dp_node, samsung,color-space, + dp_video_config-color_space)) { + dev_err(dev, failed to get color-space\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,dynamic-range, + dp_video_config-dynamic_range)) { + dev_err(dev, failed to get dynamic-range\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,ycbcr-coeff, + dp_video_config-ycbcr_coeff)) { + dev_err(dev, failed to get ycbcr-coeff\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,color-depth, + dp_video_config-color_depth)) { + dev_err(dev, failed to get color-depth\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,link-rate, + dp_video_config-link_rate)) { + dev_err(dev, failed to get link-rate\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,lane-count, + dp_video_config-lane_count)) { + dev_err(dev, failed to get lane-count\n); + return ERR_PTR(-EINVAL); + } + + return pd; +} + +static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) +{ + struct device_node *dp_phy_node; + u32 phy_base; + + dp_phy_node = of_find_node_by_name(dp-dev-of_node, dptx-phy); + if (!dp_phy_node) { + dev_err(dp-dev, could not find dptx-phy node\n); + return -ENODEV; + } + + if (of_property_read_u32(dp_phy_node, reg, phy_base)) { + dev_err(dp-dev, faild to get reg for dptx-phy\n); + return -EINVAL; + } + + if (of_property_read_u32(dp_phy_node, samsung,enable-mask, + dp-enable_mask)) { + dev_err(dp-dev, faild to get enable-mask for dptx-phy\n); + return -EINVAL; + } + + dp-phy_addr = ioremap(phy_base, SZ_4); + if (!dp-phy_addr) { + dev_err(dp-dev, failed to ioremap dp-phy\n); + return -ENOMEM; + } + + return 0; +} + +static void exynos_dp_phy_init(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-phy_addr); + reg |= dp-enable_mask; + __raw_writel(reg, dp-phy_addr);
[PATCH V6 2/2] video: exynos_dp: device tree documentation
From: Ajay Kumar ajaykumar...@samsung.com Add documentation for the DT bindings in exynos display port driver. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com Signed-off-by: Jingoo Han jg1@samsung.com --- Changes since v6: - Remove duplicated 'based on' .../devicetree/bindings/video/exynos_dp.txt| 80 1 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt new file mode 100644 index 000..7cc7d9f --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt @@ -0,0 +1,80 @@ +The Exynos display port interface should be configured based on +the type of panel connected to it. + +We use two nodes: + -display-port-controller node + -dptx-phy node(defined inside display-port-controller node) + +For the DP-PHY initialization, we use the dptx-phy node. +Required properties for dptx-phy: + -reg: + Base address of DP PHY register. + -samsung,enable-mask: + The bit-mask used to enable/disable DP PHY. + +For the Panel initialization, we read data from display-port-controller node. +Required properties for display-port-controller: + -compatible: + should be samsung,exynos5-dp. + -reg: + physical base address of the controller and length + of memory mapped region. + -interrupts: + interrupt combiner values. + -interrupt-parent: + phandle to Interrupt combiner node. + -samsung,color-space: + input video data format. + COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 + -samsung,dynamic-range: + dynamic range for input video data. + VESA = 0, CEA = 1 + -samsung,ycbcr-coeff: + YCbCr co-efficients for input video. + COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1 + -samsung,color-depth: + number of bits per colour component. + COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3 + -samsung,link-rate: + link rate supported by the panel. + LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A + -samsung,lane-count: + number of lanes supported by the panel. + LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 + +Optional properties for display-port-controller: + -interlaced: + interlace scan mode. + Progressive if defined, Interlaced if not defined + -vsync-active-high: + VSYNC polarity configuration. + High if defined, Low if not defined + -hsync-active-high: + HSYNC polarity configuration. + High if defined, Low if not defined + +Example: + +SOC specific portion: + display-port-controller { + compatible = samsung,exynos5-dp; + reg = 0x145b 0x1; + interrupts = 10 3; + interrupt-parent = combiner; + + dptx-phy { + reg = 0x10040720; + samsung,enable-mask = 1; + }; + +}; + +Board Specific portion: + display-port-controller { + samsung,color-space = 0; + samsung,dynamic-range = 0; + samsung,ycbcr-coeff = 0; + samsung,color-depth = 1; + samsung,link-rate = 0x0a; + samsung,lane-count = 4; + }; -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH V6 1/2] video: exynos_dp: Add device tree support to DP driver
On Monday, October 15, 2012 6:12 PM Jingoo Han wrote From: Ajay Kumar ajaykumar...@samsung.com This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com Signed-off-by: Jingoo Han jg1@samsung.com --- This patch is tested with Exynos5250. Changes since v6: - Check return values of required properties - Replace dp_phy_addr with phy_addr - Remove unnecessary NULL deference checking for 'pdata' - Remove unncessary 'virt_phy_base' variable - Make functions static - Fix build errors when CONFIG_OF option is diabled - Add return values to exynos_dp_dt_parse_phydata() drivers/video/exynos/exynos_dp_core.c | 206 ++--- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 194 insertions(+), 14 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index d55470e..0d9c0ee 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include linux/io.h #include linux/interrupt.h #include linux/delay.h +#include linux/of.h #include video/exynos_dp.h @@ -856,6 +857,145 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void *arg) return IRQ_HANDLED; } +#ifdef CONFIG_OF +static struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev) +{ + struct device_node *dp_node = dev-of_node; + struct exynos_dp_platdata *pd; + struct video_info *dp_video_config; + + pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); + if (!pd) { + dev_err(dev, memory allocation for pdata failed\n); + return ERR_PTR(-ENOMEM); + } + dp_video_config = devm_kzalloc(dev, + sizeof(*dp_video_config), GFP_KERNEL); + + if (!dp_video_config) { + dev_err(dev, memory allocation for video config failed\n); + return ERR_PTR(-ENOMEM); + } + pd-video_info = dp_video_config; + + dp_video_config-h_sync_polarity = + of_property_read_bool(dp_node, hsync-active-high); + + dp_video_config-v_sync_polarity = + of_property_read_bool(dp_node, vsync-active-high); + + dp_video_config-interlaced = + of_property_read_bool(dp_node, interlaced); + + if (of_property_read_u32(dp_node, samsung,color-space, + dp_video_config-color_space)) { + dev_err(dev, failed to get color-space\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,dynamic-range, + dp_video_config-dynamic_range)) { + dev_err(dev, failed to get dynamic-range\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,ycbcr-coeff, + dp_video_config-ycbcr_coeff)) { + dev_err(dev, failed to get ycbcr-coeff\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,color-depth, + dp_video_config-color_depth)) { + dev_err(dev, failed to get color-depth\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,link-rate, + dp_video_config-link_rate)) { + dev_err(dev, failed to get link-rate\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,lane-count, + dp_video_config-lane_count)) { + dev_err(dev, failed to get lane-count\n); + return ERR_PTR(-EINVAL); + } + + return pd; +} + +static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) +{ + struct device_node *dp_phy_node; + u32 phy_base; + + dp_phy_node = of_find_node_by_name(dp-dev-of_node, dptx-phy); + if (!dp_phy_node) { + dev_err(dp-dev, could not find dptx-phy node\n); + return -ENODEV; + } + + if (of_property_read_u32(dp_phy_node, reg, phy_base)) { + dev_err(dp-dev, faild to get reg for dptx-phy\n); + return -EINVAL; + } + + if (of_property_read_u32(dp_phy_node, samsung,enable-mask, + dp-enable_mask)) { + dev_err(dp-dev, faild to get enable-mask for dptx-phy\n); + return -EINVAL; + } + + dp-phy_addr = ioremap(phy_base, SZ_4); + if (!dp-phy_addr) { + dev_err(dp-dev, failed to ioremap dp-phy\n); + return -ENOMEM; + } + + return 0; +} + +static void exynos_dp_phy_init(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-phy_addr); + reg |=
Re: [PATCH 3/6] DRIVERS: ATA: SATA PHY utility framework
Hi Tomasz, On Sat, Oct 13, 2012 at 4:00 AM, Tomasz Figa tomasz.f...@gmail.com wrote: Hi Vasanth, On Tuesday 09 of October 2012 17:18:49 Vasanth Ananthan wrote: This patch adds SATA PHY utility framework APIs. The framework acts as an interface between the SATA device and the PHY device. The SATA PHY device registers itself with the framework through the APIs provided and the SATA device finds and requests for an appropriate PHY device. Signed-off-by: Vasanth Ananthan vasant...@samsung.com --- drivers/ata/Kconfig|9 drivers/ata/Makefile |1 + drivers/ata/sata_phy.c | 99 drivers/ata/sata_phy.h | 44 + 4 files changed, 153 insertions(+), 0 deletions(-) create mode 100644 drivers/ata/sata_phy.c create mode 100644 drivers/ata/sata_phy.h diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 27cecd3..0344b78 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -83,6 +83,15 @@ config SATA_AHCI_PLATFORM If unsure, say N. +config SATA_EXYNOS + bool Exynos SATA AHCI support + depends on I2C_S3C2410 + help + This option enables support for Exynos AHCI Serial ATA + controllers. + + If unsure, say N. + config SATA_FSL tristate Freescale 3.0Gbps SATA support depends on FSL_SOC diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index a454a13..bf3fd91 100644 --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_SATA_FSL)+= sata_fsl.o obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o obj-$(CONFIG_SATA_SIL24) += sata_sil24.o obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o +obj-$(CONFIG_SATA_EXYNOS) += sata_phy.o libahci.o If the framework introduced by this patch is supposed to be generic, maybe a new Kconfig entry should be created for it, like CONFIG_SATA_PHY, which would be selected by any drivers using it? +int sata_add_phy(struct sata_phy *phy, enum sata_phy_type type) +{ + unsigned long flag; + unsigned int ret = -EINVAL; + struct sata_phy *x; If you need to handle the situation when phy is NULL here, then why not to: if (!phy) return -EINVAL; and then make the code below unconditional? I'll incorporate the suggestions. -- Vasanth -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] s5p-csis: Added RAW data format as the supported format.
csis can support jpeg, yuv and raw data format. Signed-off-by: Ritesh Kumar Solanki r.sola...@samsung.com --- drivers/media/platform/s5p-fimc/mipi-csis.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index 2f73d9e..0205ae4 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c @@ -145,6 +145,10 @@ static const struct csis_pix_format s5pcsis_formats[] = { .code = V4L2_MBUS_FMT_JPEG_1X8, .fmt_reg = S5PCSIS_CFG_FMT_USER(1), .data_alignment = 32, + }, { + .code = V4L2_MBUS_FMT_SGRBG10_1X10, + .fmt_reg = S5PCSIS_CFG_FMT_RAW10, + .data_alignment = 24, }, }; -- 1.7.2.3 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V7 1/2] video: exynos_dp: Add device tree support to DP driver
From: Ajay Kumar ajaykumar...@samsung.com This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com Signed-off-by: Jingoo Han jg1@samsung.com --- This patch is tested with Exynos5250. Changes since v6: - Fix return check for exynos_dp_dt_parse_phydata() in exynos_dp_probe() drivers/video/exynos/exynos_dp_core.c | 206 ++--- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 194 insertions(+), 14 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index d55470e..0d9c0ee 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include linux/io.h #include linux/interrupt.h #include linux/delay.h +#include linux/of.h #include video/exynos_dp.h @@ -856,6 +857,145 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void *arg) return IRQ_HANDLED; } +#ifdef CONFIG_OF +static struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev) +{ + struct device_node *dp_node = dev-of_node; + struct exynos_dp_platdata *pd; + struct video_info *dp_video_config; + + pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); + if (!pd) { + dev_err(dev, memory allocation for pdata failed\n); + return ERR_PTR(-ENOMEM); + } + dp_video_config = devm_kzalloc(dev, + sizeof(*dp_video_config), GFP_KERNEL); + + if (!dp_video_config) { + dev_err(dev, memory allocation for video config failed\n); + return ERR_PTR(-ENOMEM); + } + pd-video_info = dp_video_config; + + dp_video_config-h_sync_polarity = + of_property_read_bool(dp_node, hsync-active-high); + + dp_video_config-v_sync_polarity = + of_property_read_bool(dp_node, vsync-active-high); + + dp_video_config-interlaced = + of_property_read_bool(dp_node, interlaced); + + if (of_property_read_u32(dp_node, samsung,color-space, + dp_video_config-color_space)) { + dev_err(dev, failed to get color-space\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,dynamic-range, + dp_video_config-dynamic_range)) { + dev_err(dev, failed to get dynamic-range\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,ycbcr-coeff, + dp_video_config-ycbcr_coeff)) { + dev_err(dev, failed to get ycbcr-coeff\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,color-depth, + dp_video_config-color_depth)) { + dev_err(dev, failed to get color-depth\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,link-rate, + dp_video_config-link_rate)) { + dev_err(dev, failed to get link-rate\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,lane-count, + dp_video_config-lane_count)) { + dev_err(dev, failed to get lane-count\n); + return ERR_PTR(-EINVAL); + } + + return pd; +} + +static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) +{ + struct device_node *dp_phy_node; + u32 phy_base; + + dp_phy_node = of_find_node_by_name(dp-dev-of_node, dptx-phy); + if (!dp_phy_node) { + dev_err(dp-dev, could not find dptx-phy node\n); + return -ENODEV; + } + + if (of_property_read_u32(dp_phy_node, reg, phy_base)) { + dev_err(dp-dev, faild to get reg for dptx-phy\n); + return -EINVAL; + } + + if (of_property_read_u32(dp_phy_node, samsung,enable-mask, + dp-enable_mask)) { + dev_err(dp-dev, faild to get enable-mask for dptx-phy\n); + return -EINVAL; + } + + dp-phy_addr = ioremap(phy_base, SZ_4); + if (!dp-phy_addr) { + dev_err(dp-dev, failed to ioremap dp-phy\n); + return -ENOMEM; + } + + return 0; +} + +static void exynos_dp_phy_init(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-phy_addr); + reg |= dp-enable_mask; + __raw_writel(reg, dp-phy_addr); +} + +static void exynos_dp_phy_exit(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-phy_addr); + reg = ~(dp-enable_mask); + __raw_writel(reg, dp-phy_addr); +} +#else +static struct
[PATCH V7 2/2] video: exynos_dp: device tree documentation
From: Ajay Kumar ajaykumar...@samsung.com Add documentation for the DT bindings in exynos display port driver. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com Signed-off-by: Jingoo Han jg1@samsung.com --- No changes since v6: .../devicetree/bindings/video/exynos_dp.txt| 80 1 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt new file mode 100644 index 000..7cc7d9f --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt @@ -0,0 +1,80 @@ +The Exynos display port interface should be configured based on +the type of panel connected to it. + +We use two nodes: + -display-port-controller node + -dptx-phy node(defined inside display-port-controller node) + +For the DP-PHY initialization, we use the dptx-phy node. +Required properties for dptx-phy: + -reg: + Base address of DP PHY register. + -samsung,enable-mask: + The bit-mask used to enable/disable DP PHY. + +For the Panel initialization, we read data from display-port-controller node. +Required properties for display-port-controller: + -compatible: + should be samsung,exynos5-dp. + -reg: + physical base address of the controller and length + of memory mapped region. + -interrupts: + interrupt combiner values. + -interrupt-parent: + phandle to Interrupt combiner node. + -samsung,color-space: + input video data format. + COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 + -samsung,dynamic-range: + dynamic range for input video data. + VESA = 0, CEA = 1 + -samsung,ycbcr-coeff: + YCbCr co-efficients for input video. + COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1 + -samsung,color-depth: + number of bits per colour component. + COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3 + -samsung,link-rate: + link rate supported by the panel. + LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A + -samsung,lane-count: + number of lanes supported by the panel. + LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 + +Optional properties for display-port-controller: + -interlaced: + interlace scan mode. + Progressive if defined, Interlaced if not defined + -vsync-active-high: + VSYNC polarity configuration. + High if defined, Low if not defined + -hsync-active-high: + HSYNC polarity configuration. + High if defined, Low if not defined + +Example: + +SOC specific portion: + display-port-controller { + compatible = samsung,exynos5-dp; + reg = 0x145b 0x1; + interrupts = 10 3; + interrupt-parent = combiner; + + dptx-phy { + reg = 0x10040720; + samsung,enable-mask = 1; + }; + +}; + +Board Specific portion: + display-port-controller { + samsung,color-space = 0; + samsung,dynamic-range = 0; + samsung,ycbcr-coeff = 0; + samsung,color-depth = 1; + samsung,link-rate = 0x0a; + samsung,lane-count = 4; + }; -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] s5p-csis: Added RAW data format as the supported format.
Hi Ritesh, On 10/15/2012 11:48 AM, Ritesh Kumar Solanki wrote: csis can support jpeg, yuv and raw data format. Signed-off-by: Ritesh Kumar Solanki r.sola...@samsung.com Thanks for the patch. I already have a patch adding all three raw Bayer formats (SGRBG8/10/12) at the driver and I plan it for v3.8. So I'd like to use it instead of your patch. I'll post it as soon as I get my development branch cleaned up. Regards, Sylwester --- drivers/media/platform/s5p-fimc/mipi-csis.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index 2f73d9e..0205ae4 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c @@ -145,6 +145,10 @@ static const struct csis_pix_format s5pcsis_formats[] = { .code = V4L2_MBUS_FMT_JPEG_1X8, .fmt_reg = S5PCSIS_CFG_FMT_USER(1), .data_alignment = 32, + }, { + .code = V4L2_MBUS_FMT_SGRBG10_1X10, + .fmt_reg = S5PCSIS_CFG_FMT_RAW10, + .data_alignment = 24, }, }; -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: phy: samsung: Introducing usb phy driver for hsotg
On Fri, Oct 12, 2012 at 03:45:34PM +0530, Praveen Paneri wrote: platform_set_drvdata() required for driver's remove function, so adding it back. From v6: Added TODO for phy bindings with controller Dropped platform_set_drvdata() from driver probe This driver uses usb_phy interface to interact with s3c-hsotg. Supports phy_init and phy_shutdown functions to enable/disable phy. Tested with smdk6410 and smdkv310. More SoCs can be brought under later. this commit log needs improvement. There are stuff there which shouldn't go to git's history. I would like to get Tested-bys and Acked-by from DT maintainers. Signed-off-by: Praveen Paneri p.pan...@samsung.com Acked-by: Heiko Stuebner he...@sntech.de --- .../devicetree/bindings/usb/samsung-usbphy.txt | 11 + drivers/usb/phy/Kconfig|8 + drivers/usb/phy/Makefile |1 + drivers/usb/phy/samsung-usbphy.c | 357 include/linux/platform_data/samsung-usbphy.h | 27 ++ 5 files changed, 404 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode 100644 drivers/usb/phy/samsung-usbphy.c create mode 100644 include/linux/platform_data/samsung-usbphy.h diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file mode 100644 index 000..7b26e2d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt @@ -0,0 +1,11 @@ +* Samsung's usb phy transceiver + +The Samsung's phy transceiver is used for controlling usb otg phy for +s3c-hsotg usb device controller. +TODO: Adding the PHY binding with controller(s) according to the under +developement generic PHY driver. + +Required properties: +- compatible : should be samsung,exynos4210-usbphy +- reg : base physical address of the phy registers and length of memory mapped + region. diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 63c339b..313685f 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -32,3 +32,11 @@ config MV_U3D_PHY help Enable this to support Marvell USB 3.0 phy controller for Marvell SoC. + +config SAMSUNG_USBPHY + bool Samsung USB PHY controller Driver + depends on USB_S3C_HSOTG + select USB_OTG_UTILS + help + Enable this to support Samsung USB phy controller for samsung + SoCs. diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile index b069f29..55dcfc1 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_OMAP_USB2) += omap-usb2.o obj-$(CONFIG_USB_ISP1301)+= isp1301.o obj-$(CONFIG_MV_U3D_PHY) += mv_u3d_phy.o obj-$(CONFIG_USB_EHCI_TEGRA) += tegra_usb_phy.o +obj-$(CONFIG_SAMSUNG_USBPHY) += samsung-usbphy.o diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c new file mode 100644 index 000..14c182f --- /dev/null +++ b/drivers/usb/phy/samsung-usbphy.c @@ -0,0 +1,357 @@ +/* linux/drivers/usb/phy/samsung-usbphy.c + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Author: Praveen Paneri p.pan...@samsung.com + * + * Samsung USB2.0 High-speed OTG transceiver, talks to S3C HS OTG controller + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/module.h +#include linux/platform_device.h +#include linux/clk.h +#include linux/delay.h +#include linux/err.h +#include linux/io.h +#include linux/of.h +#include linux/usb/otg.h +#include linux/platform_data/samsung-usbphy.h + +/* Register definitions */ + +#define S3C_PHYPWR (0x00) + +#define S3C_PHYPWR_NORMAL_MASK (0x19 0) +#define S3C_PHYPWR_OTG_DISABLE (1 4) +#define S3C_PHYPWR_ANALOG_POWERDOWN (1 3) +#define S3C_PHYPWR_FORCE_SUSPEND (1 1) +/* For Exynos4 */ +#define EXYNOS4_PHYPWR_NORMAL_MASK (0x39 0) +#define EXYNOS4_PHYPWR_SLEEP (1 5) + +#define S3C_PHYCLK (0x04) + +#define S3C_PHYCLK_MODE_SERIAL (1 6) +#define S3C_PHYCLK_EXT_OSC (1 5) +#define S3C_PHYCLK_COMMON_ON_N (1 4) +#define S3C_PHYCLK_ID_PULL (1 2) +#define S3C_PHYCLK_CLKSEL_MASK
[PATCH v3 0/6] arm: exynos: add dt based support for exynos5 hdmi
This patch set adds the DT based support for Samsung's Exynos5250. It adds device tree nodes for hdmi, mixer, hdmiphy and hdmiddc. The name of these devices are changed to the one matching with drivers. Exynos-drm and exynos hdmi-drm-commmon devices are removed from machine init code. Exynos-drm and exynos hdmi-drm-commmon devices are removed from machine init code. Patch set which adds this code is posted to dri-devel list at http://comments.gmane.org/gmane.comp.video.dri.devel/75121. This patchset is based on linux v3.6-rc6, branch v3.7-next/dt-samsung at git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git v1: - dropped patch for hpd gpio initialisation from machine init. - dropped patch for platform device registration. - removed platform device registration from non-dt platforms. v2: - removed version information from hdmi, mixer dt nodes. - added DT binding documentation for hdmi, mixer, hdmiphy and hdmiddc. v3: - corrected indentations. - changed dt node names to name@address format. Rahul Sharma (6): dts: exynos: add device tree support for exynos5 hdmi dts: exynos: add device tree support for exynos5 mixer dts: exynos: add device tree support for exynos5 hdmiphy dts: exynos: add device tree support for exynos5 hdmiddc arm: exynos: add clocks for exynos5 hdmi arm: exynos: removing exynos-drm device registration from non-dt platforms .../devicetree/bindings/drm/exynos/hdmi.txt| 22 +++ .../devicetree/bindings/drm/exynos/hdmiddc.txt | 12 .../devicetree/bindings/drm/exynos/hdmiphy.txt | 12 .../devicetree/bindings/drm/exynos/mixer.txt | 15 ++ arch/arm/boot/dts/exynos5250-smdk5250.dts | 24 +++- arch/arm/boot/dts/exynos5250.dtsi | 20 + arch/arm/mach-exynos/Makefile |1 - arch/arm/mach-exynos/clock-exynos5.c | 14 - arch/arm/mach-exynos/dev-drm.c | 29 arch/arm/mach-exynos/include/mach/map.h|2 + arch/arm/mach-exynos/mach-exynos5-dt.c |8 + arch/arm/mach-exynos/mach-nuri.c |3 -- arch/arm/mach-exynos/mach-origen.c |3 -- arch/arm/mach-exynos/mach-smdk4x12.c |3 -- arch/arm/mach-exynos/mach-smdkv310.c |3 -- arch/arm/mach-exynos/mach-universal_c210.c |3 -- arch/arm/plat-samsung/include/plat/devs.h |2 - 17 files changed, 126 insertions(+), 50 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/exynos/hdmi.txt create mode 100644 Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt create mode 100644 Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt create mode 100644 Documentation/devicetree/bindings/drm/exynos/mixer.txt delete mode 100644 arch/arm/mach-exynos/dev-drm.c -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 1/6] dts: exynos: add device tree support for exynos5 hdmi
This patch adds support for device tree based discovery for exynos5 hdmi. Hdmi node is also renamed with exynos5-hdmi. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- .../devicetree/bindings/drm/exynos/hdmi.txt| 22 arch/arm/boot/dts/exynos5250-smdk5250.dts |4 +++ arch/arm/boot/dts/exynos5250.dtsi |6 + arch/arm/mach-exynos/include/mach/map.h|1 + arch/arm/mach-exynos/mach-exynos5-dt.c |2 + 5 files changed, 35 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/exynos/hdmi.txt diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmi.txt b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt new file mode 100644 index 000..8b0fa7c --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/hdmi.txt @@ -0,0 +1,22 @@ +Device-Tree bindings for drm hdmi driver + +Required properties: +- compatible: value should be samsung,exynos5-hdmi. +- reg: physical base address of the hdmi and length of memory mapped + region. +- interrupts: interrupt number to the cpu. +- hpd-gpio: following information about the hotplug gpio pin. + a) phandle of the gpio controller node. + b) pin number within the gpio controller. + c) pin function mode. + d) optional flags and pull up/down. + e) drive strength. + +Example: + + hdmi { + compatible = samsung,exynos5-hdmi; + reg = 0x1453 0x10; + interrupts = 0 95 0; + hpd-gpio = gpx3 7 0xf 1 3; + }; \ No newline at end of file diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index a352df4..0d51678 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -166,4 +166,8 @@ spi_2: spi@12d4 { status = disabled; }; + + hdmi@1453 { + hpd-gpio = gpx3 7 0xf 1 3; + }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index f69e389..ec7ea2d 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -492,4 +492,10 @@ #gpio-cells = 4; }; }; + + hdmi@1453 { + compatible = samsung,exynos5-hdmi; + reg = 0x1453 0x10; + interrupts = 0 95 0; + }; }; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 5edbbe9..7b9efb2 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -201,6 +201,7 @@ #define EXYNOS4_PA_SDO 0x12C2 #define EXYNOS4_PA_HDMI0x12D0 #define EXYNOS4_PA_IIC_HDMIPHY 0x138E +#define EXYNOS5_PA_HDMI0x1453 #define EXYNOS4_PA_IIC(x) (0x1386 + ((x) * 0x1)) #define EXYNOS5_PA_IIC(x) (0x12C6 + ((x) * 0x1)) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index ce82f30..43449fb 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -64,6 +64,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_PDMA0, dma-pl330.0, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_PDMA1, dma-pl330.1, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_MDMA1, dma-pl330.2, NULL), + OF_DEV_AUXDATA(samsung,exynos5-hdmi, EXYNOS5_PA_HDMI, + exynos5-hdmi, NULL), {}, }; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 2/6] dts: exynos: add device tree support for exynos5 mixer
This patch adds support for device tree based discovery for exynos5 mixer. Mixer node is also renamed with exynos5-mixer. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- .../devicetree/bindings/drm/exynos/mixer.txt | 15 +++ arch/arm/boot/dts/exynos5250.dtsi |6 ++ arch/arm/mach-exynos/include/mach/map.h|1 + arch/arm/mach-exynos/mach-exynos5-dt.c |2 ++ 4 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/exynos/mixer.txt diff --git a/Documentation/devicetree/bindings/drm/exynos/mixer.txt b/Documentation/devicetree/bindings/drm/exynos/mixer.txt new file mode 100644 index 000..05e4731 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/mixer.txt @@ -0,0 +1,15 @@ +Device-Tree bindings for mixer driver + +Required properties: +- compatible: value should be samsung,exynos5-mixer. +- reg: physical base address of the mixer and length of memory mapped + region. +- interrupts: interrupt number to the cpu. + +Example: + + mixer { + compatible = samsung,exynos5-mixer; + reg = 0x1445 0x1; + interrupts = 0 94 0; + }; \ No newline at end of file diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index ec7ea2d..4064b6a 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -498,4 +498,10 @@ reg = 0x1453 0x10; interrupts = 0 95 0; }; + + mixer@1445 { + compatible = samsung,exynos5-mixer; + reg = 0x1445 0x1; + interrupts = 0 94 0; + }; }; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 7b9efb2..314ee75 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -201,6 +201,7 @@ #define EXYNOS4_PA_SDO 0x12C2 #define EXYNOS4_PA_HDMI0x12D0 #define EXYNOS4_PA_IIC_HDMIPHY 0x138E +#define EXYNOS5_PA_MIXER 0x1445 #define EXYNOS5_PA_HDMI0x1453 #define EXYNOS4_PA_IIC(x) (0x1386 + ((x) * 0x1)) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 43449fb..cdad7c1 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -66,6 +66,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_MDMA1, dma-pl330.2, NULL), OF_DEV_AUXDATA(samsung,exynos5-hdmi, EXYNOS5_PA_HDMI, exynos5-hdmi, NULL), + OF_DEV_AUXDATA(samsung,exynos5-mixer, EXYNOS5_PA_MIXER, + exynos5-mixer, NULL), {}, }; -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 3/6] dts: exynos: add device tree support for exynos5 hdmiphy
This patch adds support for device tree based discovery for exynos5 hdmiphy. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- .../devicetree/bindings/drm/exynos/hdmiphy.txt | 12 arch/arm/boot/dts/exynos5250-smdk5250.dts | 10 ++ arch/arm/boot/dts/exynos5250.dtsi |8 arch/arm/mach-exynos/mach-exynos5-dt.c |2 ++ 4 files changed, 32 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt new file mode 100644 index 000..c4face5 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/hdmiphy.txt @@ -0,0 +1,12 @@ +Device-Tree bindings for hdmiphy driver + +Required properties: +- compatible: value should be samsung,exynos5-hdmiphy. +- reg: I2C address of the hdmiphy device. + +Example: + + hdmiphy { + compatible = samsung,exynos5-hdmiphy; + reg = 0x38; + }; \ No newline at end of file diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 0d51678..18ac213 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -79,6 +79,16 @@ status = disabled; }; + i2c@12CE { + samsung,i2c-sda-delay = 100; + samsung,i2c-max-bus-freq = 66000; + + hdmiphy@38 { + compatible = samsung,exynos5-hdmiphy; + reg = 0x38; + }; + }; + dwmmc_0: dwmmc0@1220 { num-slots = 1; supports-highspeed; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 4064b6a..242079a 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -152,6 +152,14 @@ #size-cells = 0; }; + i2c@12CE { + compatible = samsung,s3c2440-hdmiphy-i2c; + reg = 0x12CE 0x1000; + interrupts = 0 64 0; + #address-cells = 1; + #size-cells = 0; + }; + spi_0: spi@12d2 { compatible = samsung,exynos4210-spi; reg = 0x12d2 0x100; diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index cdad7c1..3f129db 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -47,6 +47,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { s3c2440-i2c.0, NULL), OF_DEV_AUXDATA(samsung,s3c2440-i2c, EXYNOS5_PA_IIC(1), s3c2440-i2c.1, NULL), + OF_DEV_AUXDATA(samsung,s3c2440-hdmiphy-i2c, EXYNOS5_PA_IIC(8), + s3c2440-hdmiphy-i2c, NULL), OF_DEV_AUXDATA(samsung,exynos5250-dw-mshc, EXYNOS5_PA_DWMCI0, dw_mmc.0, NULL), OF_DEV_AUXDATA(samsung,exynos5250-dw-mshc, EXYNOS5_PA_DWMCI1, -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 4/6] dts: exynos: add device tree support for exynos5 hdmiddc
This patch adds support for device tree based discovery for exynos5 hdmi ddc. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- .../devicetree/bindings/drm/exynos/hdmiddc.txt | 12 arch/arm/boot/dts/exynos5250-smdk5250.dts | 10 +- arch/arm/mach-exynos/mach-exynos5-dt.c |2 ++ 3 files changed, 23 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt diff --git a/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt new file mode 100644 index 000..c408892 --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/hdmiddc.txt @@ -0,0 +1,12 @@ +Device-Tree bindings for hdmiddc driver + +Required properties: +- compatible: value should be samsung,exynos5-hdmiddc. +- reg: I2C address of the hdmiddc device. + +Example: + + hdmiddc { + compatible = samsung,exynos5-hdmiddc; + reg = 0x50; + }; \ No newline at end of file diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 18ac213..f7b4fc4 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -56,7 +56,15 @@ }; i2c@12C8 { - status = disabled; + samsung,i2c-sda-delay = 100; + samsung,i2c-max-bus-freq = 66000; + gpios = gpa0 6 3 3 0, + gpa0 7 3 3 0; + + hdmiddc@50 { + compatible = samsung,exynos5-hdmiddc; + reg = 0x50; + }; }; i2c@12C9 { diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 3f129db..003963c 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -47,6 +47,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { s3c2440-i2c.0, NULL), OF_DEV_AUXDATA(samsung,s3c2440-i2c, EXYNOS5_PA_IIC(1), s3c2440-i2c.1, NULL), + OF_DEV_AUXDATA(samsung,s3c2440-i2c, EXYNOS5_PA_IIC(2), + s3c2440-i2c.2, NULL), OF_DEV_AUXDATA(samsung,s3c2440-hdmiphy-i2c, EXYNOS5_PA_IIC(8), s3c2440-hdmiphy-i2c, NULL), OF_DEV_AUXDATA(samsung,exynos5250-dw-mshc, EXYNOS5_PA_DWMCI0, -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 5/6] arm: exynos: add clocks for exynos5 hdmi
This patch adds support for clocks for hdmi, hdmiphy and mixer. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/clock-exynos5.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index 17e6c77..ec2a4da 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c @@ -201,6 +201,11 @@ static int exynos5_clk_ip_isp1_ctrl(struct clk *clk, int enable) return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ISP1, clk, enable); } +static int exynos5_clk_hdmiphy_ctrl(struct clk *clk, int enable) +{ + return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); +} + /* Core list of CMU_CPU side */ static struct clksrc_clk exynos5_clk_mout_apll = { @@ -612,12 +617,17 @@ static struct clk exynos5_init_clocks_off[] = { .ctrlbit= (1 0), }, { .name = hdmi, - .devname= exynos4-hdmi, + .devname= exynos5-hdmi, .enable = exynos5_clk_ip_disp1_ctrl, .ctrlbit= (1 6), }, { + .name = hdmiphy, + .devname= exynos5-hdmi, + .enable = exynos5_clk_hdmiphy_ctrl, + .ctrlbit= (1 0), + }, { .name = mixer, - .devname= s5p-mixer, + .devname= exynos5-mixer, .enable = exynos5_clk_ip_disp1_ctrl, .ctrlbit= (1 5), }, { -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3 6/6] arm: exynos: removing exynos-drm device registration from non-dt platforms
As exynos-drm is a software device, its registration is moved to the exynos drm driver. This will provide generic solution for device registration for dt and non-dt platforms. Corresponding patches are posted to dri-devel list. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/Makefile |1 - arch/arm/mach-exynos/dev-drm.c | 29 arch/arm/mach-exynos/mach-nuri.c |3 -- arch/arm/mach-exynos/mach-origen.c |3 -- arch/arm/mach-exynos/mach-smdk4x12.c |3 -- arch/arm/mach-exynos/mach-smdkv310.c |3 -- arch/arm/mach-exynos/mach-universal_c210.c |3 -- arch/arm/plat-samsung/include/plat/devs.h |2 - 8 files changed, 0 insertions(+), 47 deletions(-) delete mode 100644 arch/arm/mach-exynos/dev-drm.c diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 9b58024..1797dee 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -53,7 +53,6 @@ obj-$(CONFIG_EXYNOS4_DEV_AHCI)+= dev-ahci.o obj-$(CONFIG_EXYNOS4_DEV_DWMCI)+= dev-dwmci.o obj-$(CONFIG_EXYNOS_DEV_DMA) += dma.o obj-$(CONFIG_EXYNOS4_DEV_USB_OHCI) += dev-ohci.o -obj-$(CONFIG_EXYNOS_DEV_DRM) += dev-drm.o obj-$(CONFIG_EXYNOS_DEV_SYSMMU)+= dev-sysmmu.o obj-$(CONFIG_ARCH_EXYNOS) += setup-i2c0.o diff --git a/arch/arm/mach-exynos/dev-drm.c b/arch/arm/mach-exynos/dev-drm.c deleted file mode 100644 index 17c9c6e..000 --- a/arch/arm/mach-exynos/dev-drm.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * linux/arch/arm/mach-exynos/dev-drm.c - * - * Copyright (c) 2012 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * EXYNOS - core DRM device - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -#include linux/kernel.h -#include linux/dma-mapping.h -#include linux/platform_device.h - -#include plat/devs.h - -static u64 exynos_drm_dma_mask = DMA_BIT_MASK(32); - -struct platform_device exynos_device_drm = { - .name = exynos-drm, - .dev= { - .dma_mask = exynos_drm_dma_mask, - .coherent_dma_mask = DMA_BIT_MASK(32), - } -}; diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index ea785fc..9267caf 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c @@ -1330,9 +1330,6 @@ static struct platform_device *nuri_devices[] __initdata = { cam_vdda_fixed_rdev, cam_8m_12v_fixed_rdev, exynos4_bus_devfreq, -#ifdef CONFIG_DRM_EXYNOS - exynos_device_drm, -#endif }; static void __init nuri_map_io(void) diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index b45600f..be8fac7 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -709,9 +709,6 @@ static struct platform_device *origen_devices[] __initdata = { s5p_device_mfc_l, s5p_device_mfc_r, s5p_device_mixer, -#ifdef CONFIG_DRM_EXYNOS - exynos_device_drm, -#endif exynos4_device_ohci, origen_device_gpiokeys, origen_lcd_hv070wsa, diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index 81bf59c..f02ee11 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -317,9 +317,6 @@ static struct platform_device *smdk4x12_devices[] __initdata = { s5p_device_mfc, s5p_device_mfc_l, s5p_device_mfc_r, -#ifdef CONFIG_DRM_EXYNOS - exynos_device_drm, -#endif samsung_device_keypad, }; diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index 12a1db2..bffb1b2 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c @@ -300,9 +300,6 @@ static struct platform_device *smdkv310_devices[] __initdata = { s5p_device_fimc_md, s5p_device_g2d, s5p_device_jpeg, -#ifdef CONFIG_DRM_EXYNOS - exynos_device_drm, -#endif exynos4_device_ac97, exynos4_device_i2s0, exynos4_device_ohci, diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 4d1f40d..f7b1337 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c @@ -1084,9 +1084,6 @@ static struct platform_device *universal_devices[] __initdata = { s5p_device_onenand, s5p_device_fimd0, s5p_device_jpeg, -#ifdef CONFIG_DRM_EXYNOS - exynos_device_drm, -#endif s3c_device_usb_hsotg, s5p_device_mfc, s5p_device_mfc_l, diff --git
Re: [PATCH] usb: phy: samsung: Introducing usb phy driver for hsotg
+ Tomasz Figa, Acked-by: Kyungmin Park kyungmin.p...@samsung.com On Mon, Oct 15, 2012 at 10:28 PM, Felipe Balbi ba...@ti.com wrote: On Fri, Oct 12, 2012 at 03:45:34PM +0530, Praveen Paneri wrote: platform_set_drvdata() required for driver's remove function, so adding it back. From v6: Added TODO for phy bindings with controller Dropped platform_set_drvdata() from driver probe This driver uses usb_phy interface to interact with s3c-hsotg. Supports phy_init and phy_shutdown functions to enable/disable phy. Tested with smdk6410 and smdkv310. More SoCs can be brought under later. this commit log needs improvement. There are stuff there which shouldn't go to git's history. I would like to get Tested-bys and Acked-by from DT maintainers. Signed-off-by: Praveen Paneri p.pan...@samsung.com Acked-by: Heiko Stuebner he...@sntech.de --- .../devicetree/bindings/usb/samsung-usbphy.txt | 11 + drivers/usb/phy/Kconfig|8 + drivers/usb/phy/Makefile |1 + drivers/usb/phy/samsung-usbphy.c | 357 include/linux/platform_data/samsung-usbphy.h | 27 ++ 5 files changed, 404 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode 100644 drivers/usb/phy/samsung-usbphy.c create mode 100644 include/linux/platform_data/samsung-usbphy.h diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file mode 100644 index 000..7b26e2d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt @@ -0,0 +1,11 @@ +* Samsung's usb phy transceiver + +The Samsung's phy transceiver is used for controlling usb otg phy for +s3c-hsotg usb device controller. +TODO: Adding the PHY binding with controller(s) according to the under +developement generic PHY driver. + +Required properties: +- compatible : should be samsung,exynos4210-usbphy +- reg : base physical address of the phy registers and length of memory mapped + region. diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 63c339b..313685f 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -32,3 +32,11 @@ config MV_U3D_PHY help Enable this to support Marvell USB 3.0 phy controller for Marvell SoC. + +config SAMSUNG_USBPHY + bool Samsung USB PHY controller Driver + depends on USB_S3C_HSOTG + select USB_OTG_UTILS + help + Enable this to support Samsung USB phy controller for samsung + SoCs. diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile index b069f29..55dcfc1 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_OMAP_USB2) += omap-usb2.o obj-$(CONFIG_USB_ISP1301)+= isp1301.o obj-$(CONFIG_MV_U3D_PHY) += mv_u3d_phy.o obj-$(CONFIG_USB_EHCI_TEGRA) += tegra_usb_phy.o +obj-$(CONFIG_SAMSUNG_USBPHY) += samsung-usbphy.o diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c new file mode 100644 index 000..14c182f --- /dev/null +++ b/drivers/usb/phy/samsung-usbphy.c @@ -0,0 +1,357 @@ +/* linux/drivers/usb/phy/samsung-usbphy.c + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Author: Praveen Paneri p.pan...@samsung.com + * + * Samsung USB2.0 High-speed OTG transceiver, talks to S3C HS OTG controller + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/module.h +#include linux/platform_device.h +#include linux/clk.h +#include linux/delay.h +#include linux/err.h +#include linux/io.h +#include linux/of.h +#include linux/usb/otg.h +#include linux/platform_data/samsung-usbphy.h + +/* Register definitions */ + +#define S3C_PHYPWR (0x00) + +#define S3C_PHYPWR_NORMAL_MASK (0x19 0) +#define S3C_PHYPWR_OTG_DISABLE (1 4) +#define S3C_PHYPWR_ANALOG_POWERDOWN (1 3) +#define S3C_PHYPWR_FORCE_SUSPEND (1 1) +/* For Exynos4 */ +#define EXYNOS4_PHYPWR_NORMAL_MASK (0x39 0) +#define EXYNOS4_PHYPWR_SLEEP (1 5) + +#define S3C_PHYCLK (0x04) + +#define S3C_PHYCLK_MODE_SERIAL (1 6) +#define S3C_PHYCLK_EXT_OSC (1 5) +#define
RE: [PATCH v2 0/6] ARM: EXYNOS: Add secure firmware support
Olof Johansson wrote: Hi, On Thu, Oct 11, 2012 at 12:35:54AM +0900, Kyungmin Park wrote: Hi Arnd or Olof, Can you pick up for v3.7? To Tomasz, Can you rebase it on the latest arm-soc tree? This code should have been in arm-soc by the beginning of the merge window (and in linux-next) to be merged for 3.7, but we will be happy to queue it up for 3.8 once 3.7-rc1 is out. I have one outstanding comment on the DT binding but the rest looks OK to me. Yeah, I agree. Olof, thanks for your review. Tomasz, please rebase and send this to Kukjin so he can queue it up with other Samsung code. OK, let me apply this series in Samsung tree when Tomasz's rebased code against on v3.7-rc1 is available. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] ARM: dts: exynos4210-trats: Split memory into 4 sections
Tomasz Figa wrote: Since the maximum section size on mach-exynos is set to 256MiB, boards with memory configuration defined using sections bigger than 256MiB will fail to boot with a kernel panic. I don't think so and it works fine in my side. Probably, the reason of kernel panic you said is not a maximum sections size? This patch modifies the dts file of Samsung Trats board to define four sections of 256MiB instead of two of 512MiB to fix the boot problem. BTW, if this patch can fix the problem, OK, I will apply this for now. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. Signed-off-by: Tomasz Figa t.f...@samsung.com --- arch/arm/boot/dts/exynos4210-trats.dts | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 73567b8..a21511c 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts @@ -20,8 +20,10 @@ compatible = samsung,trats, samsung,exynos4210; memory { - reg = 0x4000 0x2000 - 0x6000 0x2000; + reg = 0x4000 0x1000 + 0x5000 0x1000 + 0x6000 0x1000 + 0x7000 0x1000; }; chosen { -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] ARM: dts: exynos4: Enable serial controllers on Origen and SMDKV310
Tomasz Figa wrote: Hi Kgene, On Monday 08 of October 2012 15:12:48 Tomasz Figa wrote: This patch adds status override of serial nodes to enable used serial ports on Origen and SMDKV310 board. Signed-off-by: Tomasz Figa t.f...@samsung.com --- arch/arm/boot/dts/exynos4210-origen.dts | 16 arch/arm/boot/dts/exynos4210-smdkv310.dts | 16 2 files changed, 32 insertions(+) I think you missed this patch when applying Exynos dts reorganization patches. It is needed to enable serial ports on Origen and SMDKV310 boards. Could you apply it as well? Oops, yeah. I will apply. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: SAMSUNG: Add naming of s3c64xx-spi devices
Hi Heiko, On 10/02/2012 02:43 PM, Heiko Stübner wrote: Commit a5238e360b71 (spi: s3c64xx: move controller information into driver data) introduced separate device names for the different subtypes of the spi controller but forgot to set these in the relevant machines. To fix this introduce a s3c64xx_spi_setname function and populate all Samsung arches with the correct names. The function resides in a new header, as the s3c64xx-spi.h contains driver platform data and should therefore at some later point move out of the Samsung include dir. Tested on a s3c2416-based machine. Signed-off-by: Heiko Stuebner he...@sntech.de Cc: sta...@vger.kernel.org This patch looks good to me. I've tested it on Exynos4412 SoC based board. And it fixes quite serious problem - broken SPI support on a all Samsung machs (non-dt) except s3c64xx in mainline v3.6 kernel. Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com Tested-by: Sylwester Nawrocki s.nawro...@samsung.com (mach-exynos only) José Miguel, can you confirm it solves the problem for you ? -- Regards, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ARM: SAMSUNG: Add naming of s3c64xx-spi devices
On 15-10-2012 15:58, Sylwester Nawrocki wrote: Hi Heiko, On 10/02/2012 02:43 PM, Heiko Stübner wrote: Commit a5238e360b71 (spi: s3c64xx: move controller information into driver data) introduced separate device names for the different subtypes of the spi controller but forgot to set these in the relevant machines. To fix this introduce a s3c64xx_spi_setname function and populate all Samsung arches with the correct names. The function resides in a new header, as the s3c64xx-spi.h contains driver platform data and should therefore at some later point move out of the Samsung include dir. Tested on a s3c2416-based machine. Signed-off-by: Heiko Stuebner he...@sntech.de Cc: sta...@vger.kernel.org This patch looks good to me. I've tested it on Exynos4412 SoC based board. And it fixes quite serious problem - broken SPI support on a all Samsung machs (non-dt) except s3c64xx in mainline v3.6 kernel. Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com Tested-by: Sylwester Nawrocki s.nawro...@samsung.com (mach-exynos only) José Miguel, can you confirm it solves the problem for you ? The driver initialization problem is solved by this patch on my S3C2416 based board. Nevertheless, I didn’t have the time yet to test an actual SPI device connected to the bus. BTW, I think the two debug messages at the end of the s3c64xx_spi_probe() routine should be promoted from dev_dbg to dev_info in order to be shown on a normal kernel boot. Best regards, José Gonçalves -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V5 1/2] video: exynos_dp: Add device tree support to DP driver
On 10/15/2012 10:14 AM, Jingoo Han wrote: On Saturday, October 13, 2012 6:44 AM Sylwester Nawrocki wrote On 10/12/2012 10:47 PM, Ajay Kumar wrote: This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Signed-off-by: Ajay Kumarajaykumar...@samsung.com Acked-by: Jingoo Hanjg1@samsung.com --- drivers/video/exynos/exynos_dp_core.c | 161 ++--- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 149 insertions(+), 14 deletions(-) ... @@ -953,8 +1062,13 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev) struct exynos_dp_platdata *pdata = pdev-dev.platform_data; struct exynos_dp_device *dp = platform_get_drvdata(pdev); This doesn't belong to your patch, but the above 2 lines could be written as: struct exynos_dp_device *dp = dev_get_drvdata(pdev-dev); Same in functions exynos_dp_suspend() and exynos_dp_resume(). No, above 2 lines cannot be reduced to 1 line, as you mentioned. This is because it makes build error. Sorry, my bad. It looks fine in case of exynos_dp_remove(). But at exynos_dp_suspend/resume() there is something like: static int exynos_dp_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_dp_platdata *pdata = pdev-dev.platform_data; struct exynos_dp_device *dp = platform_get_drvdata(pdev); You need only pdata and dp there. I think that simpler form would do as well: struct exynos_dp_device *dp = dev_get_drvdata(dev); struct exynos_dp_platdata *pdata = dev-platform_data; Sorry, this is just a nitpicking. BTW, shouldn't CONFIG_EXYNOS_VIDEO depend on ARCH_EXYNOS ? -- Regards, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V5 1/2] video: exynos_dp: Add device tree support to DP driver
On Tuesday, October 16, 2012 6:14 AM Sylwester Nawrocki wrote On 10/15/2012 10:14 AM, Jingoo Han wrote: On Saturday, October 13, 2012 6:44 AM Sylwester Nawrocki wrote On 10/12/2012 10:47 PM, Ajay Kumar wrote: This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Signed-off-by: Ajay Kumarajaykumar...@samsung.com Acked-by: Jingoo Hanjg1@samsung.com --- drivers/video/exynos/exynos_dp_core.c | 161 ++--- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 149 insertions(+), 14 deletions(-) ... @@ -953,8 +1062,13 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev) struct exynos_dp_platdata *pdata = pdev-dev.platform_data; struct exynos_dp_device *dp = platform_get_drvdata(pdev); This doesn't belong to your patch, but the above 2 lines could be written as: struct exynos_dp_device *dp = dev_get_drvdata(pdev-dev); Same in functions exynos_dp_suspend() and exynos_dp_resume(). No, above 2 lines cannot be reduced to 1 line, as you mentioned. This is because it makes build error. Sorry, my bad. It looks fine in case of exynos_dp_remove(). But at exynos_dp_suspend/resume() there is something like: static int exynos_dp_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_dp_platdata *pdata = pdev-dev.platform_data; struct exynos_dp_device *dp = platform_get_drvdata(pdev); You need only pdata and dp there. I think that simpler form would do as well: struct exynos_dp_device *dp = dev_get_drvdata(dev); struct exynos_dp_platdata *pdata = dev-platform_data; OK, I see. I will accept your suggestion, because it is helpful to reduce lines. Then, I will send v8 patch, soon. Sorry, this is just a nitpicking. BTW, shouldn't CONFIG_EXYNOS_VIDEO depend on ARCH_EXYNOS ? -- Regards, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-fbdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH V8 1/2] video: exynos_dp: Add device tree support to DP driver
From: Ajay Kumar ajaykumar...@samsung.com This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com Signed-off-by: Jingoo Han jg1@samsung.com --- This patch is tested with Exynos5250. Changes since v7: - Replace platform_get_drvdata() with dev_get_drvdata() in suspend/resume drivers/video/exynos/exynos_dp_core.c | 216 ++--- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 198 insertions(+), 20 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index d55470e..9a9ecc1 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include linux/io.h #include linux/interrupt.h #include linux/delay.h +#include linux/of.h #include video/exynos_dp.h @@ -856,6 +857,145 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void *arg) return IRQ_HANDLED; } +#ifdef CONFIG_OF +static struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev) +{ + struct device_node *dp_node = dev-of_node; + struct exynos_dp_platdata *pd; + struct video_info *dp_video_config; + + pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); + if (!pd) { + dev_err(dev, memory allocation for pdata failed\n); + return ERR_PTR(-ENOMEM); + } + dp_video_config = devm_kzalloc(dev, + sizeof(*dp_video_config), GFP_KERNEL); + + if (!dp_video_config) { + dev_err(dev, memory allocation for video config failed\n); + return ERR_PTR(-ENOMEM); + } + pd-video_info = dp_video_config; + + dp_video_config-h_sync_polarity = + of_property_read_bool(dp_node, hsync-active-high); + + dp_video_config-v_sync_polarity = + of_property_read_bool(dp_node, vsync-active-high); + + dp_video_config-interlaced = + of_property_read_bool(dp_node, interlaced); + + if (of_property_read_u32(dp_node, samsung,color-space, + dp_video_config-color_space)) { + dev_err(dev, failed to get color-space\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,dynamic-range, + dp_video_config-dynamic_range)) { + dev_err(dev, failed to get dynamic-range\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,ycbcr-coeff, + dp_video_config-ycbcr_coeff)) { + dev_err(dev, failed to get ycbcr-coeff\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,color-depth, + dp_video_config-color_depth)) { + dev_err(dev, failed to get color-depth\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,link-rate, + dp_video_config-link_rate)) { + dev_err(dev, failed to get link-rate\n); + return ERR_PTR(-EINVAL); + } + + if (of_property_read_u32(dp_node, samsung,lane-count, + dp_video_config-lane_count)) { + dev_err(dev, failed to get lane-count\n); + return ERR_PTR(-EINVAL); + } + + return pd; +} + +static int exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) +{ + struct device_node *dp_phy_node; + u32 phy_base; + + dp_phy_node = of_find_node_by_name(dp-dev-of_node, dptx-phy); + if (!dp_phy_node) { + dev_err(dp-dev, could not find dptx-phy node\n); + return -ENODEV; + } + + if (of_property_read_u32(dp_phy_node, reg, phy_base)) { + dev_err(dp-dev, faild to get reg for dptx-phy\n); + return -EINVAL; + } + + if (of_property_read_u32(dp_phy_node, samsung,enable-mask, + dp-enable_mask)) { + dev_err(dp-dev, faild to get enable-mask for dptx-phy\n); + return -EINVAL; + } + + dp-phy_addr = ioremap(phy_base, SZ_4); + if (!dp-phy_addr) { + dev_err(dp-dev, failed to ioremap dp-phy\n); + return -ENOMEM; + } + + return 0; +} + +static void exynos_dp_phy_init(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-phy_addr); + reg |= dp-enable_mask; + __raw_writel(reg, dp-phy_addr); +} + +static void exynos_dp_phy_exit(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-phy_addr); + reg = ~(dp-enable_mask); + __raw_writel(reg, dp-phy_addr); +} +#else +static struct
[PATCH V8 2/2] video: exynos_dp: device tree documentation
From: Ajay Kumar ajaykumar...@samsung.com Add documentation for the DT bindings in exynos display port driver. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com Signed-off-by: Jingoo Han jg1@samsung.com --- No changes since v7: .../devicetree/bindings/video/exynos_dp.txt| 80 1 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt new file mode 100644 index 000..7cc7d9f --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt @@ -0,0 +1,80 @@ +The Exynos display port interface should be configured based on +the type of panel connected to it. + +We use two nodes: + -display-port-controller node + -dptx-phy node(defined inside display-port-controller node) + +For the DP-PHY initialization, we use the dptx-phy node. +Required properties for dptx-phy: + -reg: + Base address of DP PHY register. + -samsung,enable-mask: + The bit-mask used to enable/disable DP PHY. + +For the Panel initialization, we read data from display-port-controller node. +Required properties for display-port-controller: + -compatible: + should be samsung,exynos5-dp. + -reg: + physical base address of the controller and length + of memory mapped region. + -interrupts: + interrupt combiner values. + -interrupt-parent: + phandle to Interrupt combiner node. + -samsung,color-space: + input video data format. + COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 + -samsung,dynamic-range: + dynamic range for input video data. + VESA = 0, CEA = 1 + -samsung,ycbcr-coeff: + YCbCr co-efficients for input video. + COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1 + -samsung,color-depth: + number of bits per colour component. + COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3 + -samsung,link-rate: + link rate supported by the panel. + LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A + -samsung,lane-count: + number of lanes supported by the panel. + LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 + +Optional properties for display-port-controller: + -interlaced: + interlace scan mode. + Progressive if defined, Interlaced if not defined + -vsync-active-high: + VSYNC polarity configuration. + High if defined, Low if not defined + -hsync-active-high: + HSYNC polarity configuration. + High if defined, Low if not defined + +Example: + +SOC specific portion: + display-port-controller { + compatible = samsung,exynos5-dp; + reg = 0x145b 0x1; + interrupts = 10 3; + interrupt-parent = combiner; + + dptx-phy { + reg = 0x10040720; + samsung,enable-mask = 1; + }; + +}; + +Board Specific portion: + display-port-controller { + samsung,color-space = 0; + samsung,dynamic-range = 0; + samsung,ycbcr-coeff = 0; + samsung,color-depth = 1; + samsung,link-rate = 0x0a; + samsung,lane-count = 4; + }; -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: phy: samsung: Introducing usb phy driver for hsotg
On Mon, Oct 15, 2012 at 6:58 PM, Felipe Balbi ba...@ti.com wrote: On Fri, Oct 12, 2012 at 03:45:34PM +0530, Praveen Paneri wrote: platform_set_drvdata() required for driver's remove function, so adding it back. From v6: Added TODO for phy bindings with controller Dropped platform_set_drvdata() from driver probe This driver uses usb_phy interface to interact with s3c-hsotg. Supports phy_init and phy_shutdown functions to enable/disable phy. Tested with smdk6410 and smdkv310. More SoCs can be brought under later. this commit log needs improvement. There are stuff there which shouldn't go to git's history. I will resend the patches with improved commit log. Thanks, Praveen I would like to get Tested-bys and Acked-by from DT maintainers. Signed-off-by: Praveen Paneri p.pan...@samsung.com Acked-by: Heiko Stuebner he...@sntech.de --- .../devicetree/bindings/usb/samsung-usbphy.txt | 11 + drivers/usb/phy/Kconfig|8 + drivers/usb/phy/Makefile |1 + drivers/usb/phy/samsung-usbphy.c | 357 include/linux/platform_data/samsung-usbphy.h | 27 ++ 5 files changed, 404 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/samsung-usbphy.txt create mode 100644 drivers/usb/phy/samsung-usbphy.c create mode 100644 include/linux/platform_data/samsung-usbphy.h diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt new file mode 100644 index 000..7b26e2d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt @@ -0,0 +1,11 @@ +* Samsung's usb phy transceiver + +The Samsung's phy transceiver is used for controlling usb otg phy for +s3c-hsotg usb device controller. +TODO: Adding the PHY binding with controller(s) according to the under +developement generic PHY driver. + +Required properties: +- compatible : should be samsung,exynos4210-usbphy +- reg : base physical address of the phy registers and length of memory mapped + region. diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig index 63c339b..313685f 100644 --- a/drivers/usb/phy/Kconfig +++ b/drivers/usb/phy/Kconfig @@ -32,3 +32,11 @@ config MV_U3D_PHY help Enable this to support Marvell USB 3.0 phy controller for Marvell SoC. + +config SAMSUNG_USBPHY + bool Samsung USB PHY controller Driver + depends on USB_S3C_HSOTG + select USB_OTG_UTILS + help + Enable this to support Samsung USB phy controller for samsung + SoCs. diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile index b069f29..55dcfc1 100644 --- a/drivers/usb/phy/Makefile +++ b/drivers/usb/phy/Makefile @@ -8,3 +8,4 @@ obj-$(CONFIG_OMAP_USB2) += omap-usb2.o obj-$(CONFIG_USB_ISP1301)+= isp1301.o obj-$(CONFIG_MV_U3D_PHY) += mv_u3d_phy.o obj-$(CONFIG_USB_EHCI_TEGRA) += tegra_usb_phy.o +obj-$(CONFIG_SAMSUNG_USBPHY) += samsung-usbphy.o diff --git a/drivers/usb/phy/samsung-usbphy.c b/drivers/usb/phy/samsung-usbphy.c new file mode 100644 index 000..14c182f --- /dev/null +++ b/drivers/usb/phy/samsung-usbphy.c @@ -0,0 +1,357 @@ +/* linux/drivers/usb/phy/samsung-usbphy.c + * + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Author: Praveen Paneri p.pan...@samsung.com + * + * Samsung USB2.0 High-speed OTG transceiver, talks to S3C HS OTG controller + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/module.h +#include linux/platform_device.h +#include linux/clk.h +#include linux/delay.h +#include linux/err.h +#include linux/io.h +#include linux/of.h +#include linux/usb/otg.h +#include linux/platform_data/samsung-usbphy.h + +/* Register definitions */ + +#define S3C_PHYPWR (0x00) + +#define S3C_PHYPWR_NORMAL_MASK (0x19 0) +#define S3C_PHYPWR_OTG_DISABLE (1 4) +#define S3C_PHYPWR_ANALOG_POWERDOWN (1 3) +#define S3C_PHYPWR_FORCE_SUSPEND (1 1) +/* For Exynos4 */ +#define EXYNOS4_PHYPWR_NORMAL_MASK (0x39 0) +#define EXYNOS4_PHYPWR_SLEEP (1 5) + +#define S3C_PHYCLK (0x04) + +#define S3C_PHYCLK_MODE_SERIAL (1 6) +#define S3C_PHYCLK_EXT_OSC (1 5) +#define