Re: [PATCH] video: exynos_dp: Add device tree support to DP driver
Hello, Please post the documentation for the bindings. Thanks, Leela Krishna Amudala. On Fri, Sep 14, 2012 at 12:09 AM, Ajay Kumar ajaykumar...@samsung.com 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. DP-PHY should be regarded as a seperate device node while being passed from device tree list, and device node for DP should contain DP-PHY as child node with property name dp-phy associated with it. Signed-off-by: Ajay Kumar ajaykumar...@samsung.com --- drivers/video/exynos/exynos_dp_core.c | 156 +++-- drivers/video/exynos/exynos_dp_core.h |2 + 2 files changed, 151 insertions(+), 7 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index f57c915..15887bd 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,20 +857,117 @@ 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, samsung,h-sync-polarity, NULL)) + dp_video_config-h_sync_polarity = 1; + + if (of_get_property(dp_node, samsung,v-sync-polarity, NULL)) + dp_video_config-v_sync_polarity = 1; + + if (of_get_property(dp_node, samsung,interlaced, NULL)) + dp_video_config-interlaced = 1; + + 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); + return pd; +} + +void exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp) +{ + struct device_node *dp_phy_node; + + const __be32 *parp; + + u32 phy_base; + + void *virt_phy_base; + + parp = of_get_property(dp-dev-of_node, dp_phy, NULL); + if (!parp) { + dp-dp_phy_addr = NULL; + return; + } + + dp_phy_node = of_find_node_by_phandle(be32_to_cpup(parp)); + if (!dp_phy_node) { + dp-dp_phy_addr = NULL; + return; + } + + of_property_read_u32(dp_phy_node, samsung,dptx_phy_reg, phy_base); + of_property_read_u32(dp_phy_node, samsung,enable_bit, + dp-enable_bit); + virt_phy_base = ioremap(phy_base, SZ_4); + 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 dp_phy_init(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-dp_phy_addr); + reg |= dp-enable_bit; + __raw_writel(reg, dp-dp_phy_addr); +} + +void dp_phy_exit(struct exynos_dp_device *dp) +{ + u32 reg; + + reg = __raw_readl(dp-dp_phy_addr); + reg = ~(dp-enable_bit); + __raw_writel(reg, dp-dp_phy_addr); +} +#endif /* CONFIG_OF */ + static int __devinit exynos_dp_probe(struct platform_device *pdev) { struct resource *res; struct exynos_dp_device *dp; - struct exynos_dp_platdata *pdata; + struct exynos_dp_platdata *pdata = pdev-dev.platform_data; int ret = 0; - pdata = pdev-dev.platform_data; - if (!pdata) { - dev_err(pdev-dev, no
[PATCH] ARM: dts: exynos4210-origen: Enable on-board keys as wakeup source
On board keys on Origen board can serve as wakeup sources, hence they are marked accordingly in the device tree file. Signed-off-by: Tushar Behera tushar.beh...@linaro.org --- arch/arm/boot/dts/exynos4210-origen.dts |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts index 0c49caa..e867eb7 100644 --- a/arch/arm/boot/dts/exynos4210-origen.dts +++ b/arch/arm/boot/dts/exynos4210-origen.dts @@ -64,30 +64,35 @@ label = Up; gpios = gpx2 0 0 0 2; linux,code = 103; + gpio-key,wakeup; }; down { label = Down; gpios = gpx2 1 0 0 2; linux,code = 108; + gpio-key,wakeup; }; back { label = Back; gpios = gpx1 7 0 0 2; linux,code = 158; + gpio-key,wakeup; }; home { label = Home; gpios = gpx1 6 0 0 2; linux,code = 102; + gpio-key,wakeup; }; menu { label = Menu; gpios = gpx1 5 0 0 2; linux,code = 139; + gpio-key,wakeup; }; }; -- 1.7.4.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
[PATCH 0/3] Add device tree based discovery support for drm-fimd
This patch set adds arch side support for device tree based discovery for drm-fimd. The patches are created against for-next branch of Kukjin Kim's tree on 3.6-rc6 at: git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git This patchset has been tested on smdk5250 board and seen the bootup logo on LCD using the patchset http://www.spinics.net/lists/arm-kernel/msg193348.html which was applied on inki-dae's next branch Leela Krishna Amudala (3): ARM: EXYNOS5: Add fimd node to the exynos5250 dtsi file ARM: EXYNOS: add device tree based discovery support for FIMD ARM: EXYNOS: Add drm-device node to the dtsi file arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 arch/arm/boot/dts/exynos5250.dtsi | 11 +++ arch/arm/mach-exynos/include/mach/map.h |1 + arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++ 4 files changed, 30 insertions(+), 0 deletions(-) -- 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 1/3] ARM: EXYNOS5: Add fimd node to the exynos5250 dtsi file
This patch adds the fimd node with compatibility string, hardware address, interrupt line numbers to the exynos5250 dtsi file. Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com --- arch/arm/boot/dts/exynos5250.dtsi |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index b55794b..6d27ca4 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -488,4 +488,11 @@ reg = 0x13e3 0x1000; interrupts = 0 88 0; }; + + fimd { + compatible = samsung,exynos5-drm; + interrupt-parent = combiner; + reg = 0x1440 0x4; + interrupts = 18 5, 18 4, 18 6; + }; }; -- 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 2/3] ARM: EXYNOS: add device tree based discovery support for FIMD
This patch adds support for device tree based discovery for Samsung's display controller. Adds DRM-Fimd plat data for smdk5250 evt1 to the corresponding dts file Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com --- arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 arch/arm/mach-exynos/include/mach/map.h |1 + arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++ 3 files changed, 19 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 8a5e348..c8d32f5 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -109,4 +109,20 @@ spi_2: spi@12d4 { status = disabled; }; + + lcd_fimd0: lcd_panel0 { + lcd-htiming = 4 4 4 1280; + lcd-vtiming = 4 4 4 800; + supports-mipi-panel; + }; + + fimd { + samsung,fimd-display = lcd_fimd0; + samsung,fimd-vidout-rgb; + samsung,fimd-inv-vclk; + samsung,fimd-frame-rate = 60; + samsung,default-window = 0; + samsung,fimd-win-bpp = 32; + }; + }; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index b2021bd..dd9cea3 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -174,6 +174,7 @@ #define EXYNOS4_PA_MIPI_CSIS1 0x1189 #define EXYNOS4_PA_FIMD0 0x11C0 +#define EXYNOS5_PA_FIMD0x1440 #define EXYNOS4_PA_HSMMC(x)(0x1251 + ((x) * 0x1)) #define EXYNOS4_PA_DWMCI 0x1255 diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index e707eb1..0d35d31 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 = { exynos-gsc.2, NULL), OF_DEV_AUXDATA(samsung,exynos5-gsc, EXYNOS5_PA_GSC3, exynos-gsc.3, NULL), + OF_DEV_AUXDATA(samsung,exynos5-fimd, EXYNOS5_PA_FIMD, + exynos5-fb.1, 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] video: drm: Add match table for drm platform device
This patch adds match table for drm platform device. Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com --- drivers/gpu/drm/exynos/exynos_drm_drv.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index d070719..18abdcc 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -294,12 +294,21 @@ static int exynos_drm_platform_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id drm_device_dt_match[] = { + { .compatible = samsung,exynos-drm-device}, + {}, +}; +MODULE_DEVICE_TABLE(of, drm_device_dt_match); +#endif + static struct platform_driver exynos_drm_platform_driver = { .probe = exynos_drm_platform_probe, .remove = __devexit_p(exynos_drm_platform_remove), .driver = { .owner = THIS_MODULE, .name = exynos-drm, + .of_match_table = of_match_ptr(drm_device_dt_match), }, }; -- 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
[GIT PULL] Samsung fixes-3 for v3.6
Hi Arnd, Olof This is re-sending Samsung fixes-3 I talked to Olof before. The branch is including two commits are using spin_lock_{irqsave, irqrestore} in clk_set_parent() and clk_set_rate() to avoid spinlock recursion/locking. If any problems, please kindly let me know. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. The following changes since commit 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d: Linux 3.6-rc4 (2012-09-01 10:39:58 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git v3.6-samsung-fixes-3 Mandeep Singh Baines (1): ARM: SAMSUNG: use spin_lock_irqsave() in clk_set_parent Tushar Behera (1): ARM: SAMSUNG: Use spin_lock_{irqsave,irqrestore} in clk_set_rate arch/arm/plat-samsung/clock.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) -- 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: [GIT PULL] Samsung fixes-3 for v3.6
On Tue, Sep 18, 2012 at 6:24 AM, Kukjin Kim kgene@samsung.com wrote: Hi Arnd, Olof This is re-sending Samsung fixes-3 I talked to Olof before. The branch is including two commits are using spin_lock_{irqsave, irqrestore} in clk_set_parent() and clk_set_rate() to avoid spinlock recursion/locking. If any problems, please kindly let me know. Thanks. Best regards, Kgene. -- Kukjin Kim kgene@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. The following changes since commit 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d: Linux 3.6-rc4 (2012-09-01 10:39:58 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git v3.6-samsung-fixes-3 Thanks, pulled! -Olof -- 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