Skip to contentSkip to conversation

Updated s5p-tv platform definitions

PATCH Superseded Marek Szyprowski 2 participants 7 messages Jul 21, 2011

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Updated s5p-tv platform definitions

Hello,

This patch series contains platform definitions for s5p-tv driver rebased onto latest for-next branch (including generic GIC and clockdev changes).

Changes since v1:
- renamed i2c8 to common i2c-hdmiphy
- moved common vpll code to plat-s5p/clocks.c
- added check for pll locking
- various minor coding style fixes here and there

Best regards

Signature · 46 lines
Marek Szyprowski
Samsung Poland R&D Center


Patch summary:

Tomasz Stanislawski (4):
  ARM: Samsung: add i2c hdmiphy controller definitions
  ARM: S5P: add support for tv device
  ARM: Exynos4: enable TV support on Universal_C210 board
  ARM: S5PV210: enable TV support on GONI board

 arch/arm/mach-exynos4/Kconfig                    |    2 +
 arch/arm/mach-exynos4/clock.c                    |  140 +++++++++++++++++++++-
 arch/arm/mach-exynos4/cpu.c                      |    4 +
 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h |   16 +++
 arch/arm/mach-exynos4/include/mach/irqs.h        |    4 +
 arch/arm/mach-exynos4/include/mach/map.h         |   12 ++
 arch/arm/mach-exynos4/include/mach/regs-pmu.h    |    6 +
 arch/arm/mach-exynos4/mach-universal_c210.c      |   74 ++++++++++++
 arch/arm/mach-s5pv210/Kconfig                    |    1 +
 arch/arm/mach-s5pv210/clock.c                    |   87 ++++++++++++--
 arch/arm/mach-s5pv210/cpu.c                      |    4 +
 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h |   16 +++
 arch/arm/mach-s5pv210/include/mach/irqs.h        |    4 +-
 arch/arm/mach-s5pv210/include/mach/map.h         |   13 ++
 arch/arm/mach-s5pv210/include/mach/regs-clock.h  |    9 +-
 arch/arm/mach-s5pv210/mach-goni.c                |    9 ++
 arch/arm/plat-s5p/Kconfig                        |   10 ++
 arch/arm/plat-s5p/Makefile                       |    2 +
 arch/arm/plat-s5p/clock.c                        |   73 +++++++++++
 arch/arm/plat-s5p/dev-i2c-hdmiphy.c              |   59 +++++++++
 arch/arm/plat-s5p/dev-tv.c                       |  100 +++++++++++++++
 arch/arm/plat-s5p/include/plat/s5p-clock.h       |    4 +
 arch/arm/plat-samsung/include/plat/devs.h        |    6 +
 arch/arm/plat-samsung/include/plat/iic.h         |    1 +
 arch/arm/plat-samsung/include/plat/tv-core.h     |   44 +++++++
 25 files changed, 684 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
 create mode 100644 arch/arm/plat-s5p/dev-tv.c
 create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h

-- 
1.7.1.569.g6f426
#1 lore raw

PATCH v2 1/4 ARM: Samsung: add i2c hdmiphy controller definitions

From: Tomasz Stanislawski <[email protected]>

This patch adds hdmiphy dedicated i2c controller definitions.

[m.szyprowski: renamed to i2c-hdmiphy and squashed Exynos4 and S5PV210 patches]
---
 arch/arm/mach-exynos4/clock.c                    |    6 ++
 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h |   16 ++++++
 arch/arm/mach-exynos4/include/mach/irqs.h        |    2 +
 arch/arm/mach-exynos4/include/mach/map.h         |    4 ++
 arch/arm/mach-s5pv210/clock.c                    |    6 ++
 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h |   16 ++++++
 arch/arm/mach-s5pv210/include/mach/irqs.h        |    2 +-
 arch/arm/mach-s5pv210/include/mach/map.h         |    3 +
 arch/arm/plat-s5p/Kconfig                        |    5 ++
 arch/arm/plat-s5p/Makefile                       |    1 +
 arch/arm/plat-s5p/dev-i2c-hdmiphy.c              |   59 ++++++++++++++++++++++
 arch/arm/plat-samsung/include/plat/devs.h        |    1 +
 arch/arm/plat-samsung/include/plat/iic.h         |    1 +
 13 files changed, 121 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
arch/arm/mach-exynos4/clock.c +6 -0
index 629ea1d..965475c 100644
@@ -581,6 +581,12 @@ static struct clk init_clocks_off[] = {
 		.enable		= exynos4_clk_ip_peril_ctrl,
 		.ctrlbit	= (1 << 13),
 	}, {
+		.name		= "i2c",
+		.devname	= "s3c2440-hdmiphy-i2c",
+		.parent		= &clk_aclk_100.clk,
+		.enable		= exynos4_clk_ip_peril_ctrl,
+		.ctrlbit	= (1 << 14),
+	}, {
 		.name		= "SYSMMU_MDMA",
 		.enable		= exynos4_clk_ip_image_ctrl,
 		.ctrlbit	= (1 << 5),
arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h new file +16 -0
new file mode 100644
index 0000000..4f070e0
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics Co., Ltd.
+ *
+ * S5P series i2c hdmiphy helper definitions
+ *
+ * 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.
+ */
+
+#ifndef PLAT_S5P_IIC_HDMIPHY_H_
+#define PLAT_S5P_IIC_HDMIPHY_H_
+
+#define S5P_IIC_HDMIPHY_BUS_NUM		(8)
+
+#endif
arch/arm/mach-exynos4/include/mach/irqs.h +2 -0
index e2995be..e8eeb94 100644
@@ -94,6 +94,8 @@
 #define IRQ_2D			IRQ_SPI(89)
 #define IRQ_PCIE		IRQ_SPI(90)
 
+#define IRQ_IIC_HDMIPHY		IRQ_SPI(93)
+
 #define IRQ_MFC			IRQ_SPI(94)
 
 #define IRQ_AUDIO_SS		IRQ_SPI(96)
arch/arm/mach-exynos4/include/mach/map.h +4 -0
index 0d0b13c3..0b2b1dd 100644
@@ -110,6 +110,8 @@
 
 #define EXYNOS4_PA_UART			0x13800000
 
+#define EXYNOS4_PA_IIC_HDMIPHY		0x138E0000
+
 #define EXYNOS4_PA_IIC(x)		(0x13860000 + ((x) * 0x10000))
 
 #define EXYNOS4_PA_ADC			0x13910000
@@ -158,6 +160,8 @@
 #define S5P_PA_TIMER			EXYNOS4_PA_TIMER
 #define S5P_PA_EHCI			EXYNOS4_PA_EHCI
 
+#define S5P_PA_IIC_HDMIPHY		EXYNOS4_PA_IIC_HDMIPHY
+
 #define SAMSUNG_PA_KEYPAD		EXYNOS4_PA_KEYPAD
 
 /* UART */
arch/arm/mach-s5pv210/clock.c +6 -0
index 52a8e60..90a1966 100644
@@ -407,6 +407,12 @@ static struct clk init_clocks_off[] = {
 		.enable		= s5pv210_clk_ip3_ctrl,
 		.ctrlbit	= (1<<9),
 	}, {
+		.name		= "i2c",
+		.devname	= "s3c2440-hdmiphy-i2c",
+		.parent		= &clk_pclk_psys.clk,
+		.enable		= s5pv210_clk_ip3_ctrl,
+		.ctrlbit	= (1 << 11),
+	}, {
 		.name		= "spi",
 		.devname	= "s3c64xx-spi.0",
 		.parent		= &clk_pclk_psys.clk,
arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h new file +16 -0
new file mode 100644
index 0000000..b6ce613
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics Co., Ltd.
+ *
+ * S5P series i2c hdmiphy helper definitions
+ *
+ * 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.
+ */
+
+#ifndef PLAT_S5P_IIC_HDMIPHY_H_
+#define PLAT_S5P_IIC_HDMIPHY_H_
+
+#define S5P_IIC_HDMIPHY_BUS_NUM		(3)
+
+#endif
arch/arm/mach-s5pv210/include/mach/irqs.h +1 -1
index b9f9ec3..c1da0a7 100644
@@ -56,7 +56,7 @@
 #define IRQ_SPI2		S5P_IRQ_VIC1(17)
 #define IRQ_IRDA		S5P_IRQ_VIC1(18)
 #define IRQ_IIC2		S5P_IRQ_VIC1(19)
-#define IRQ_IIC3		S5P_IRQ_VIC1(20)
+#define IRQ_IIC_HDMIPHY		S5P_IRQ_VIC1(20)
 #define IRQ_HSIRX		S5P_IRQ_VIC1(21)
 #define IRQ_HSITX		S5P_IRQ_VIC1(22)
 #define IRQ_UHOST		S5P_IRQ_VIC1(23)
arch/arm/mach-s5pv210/include/mach/map.h +3 -0
index aac343c..a420654 100644
@@ -90,6 +90,8 @@
 #define S5PV210_PA_FIMC1		0xFB300000
 #define S5PV210_PA_FIMC2		0xFB400000
 
+#define S5PV210_PA_IIC_HDMIPHY		0xFA900000
+
 /* Compatibiltiy Defines */
 
 #define S3C_PA_FB			S5PV210_PA_FB
@@ -110,6 +112,7 @@
 #define S5P_PA_FIMC2			S5PV210_PA_FIMC2
 #define S5P_PA_MIPI_CSIS0		S5PV210_PA_MIPI_CSIS
 #define S5P_PA_MFC			S5PV210_PA_MFC
+#define S5P_PA_IIC_HDMIPHY		S5PV210_PA_IIC_HDMIPHY
 #define S5P_PA_ONENAND			S5PC110_PA_ONENAND
 #define S5P_PA_ONENAND_DMA		S5PC110_PA_ONENAND_DMA
 #define S5P_PA_SDRAM			S5PV210_PA_SDRAM
arch/arm/plat-s5p/Kconfig +5 -0
index 56f66ea..61bff07 100644
@@ -71,6 +71,11 @@ config S5P_DEV_FIMC3
 	help
 	  Compile in platform device definitions for FIMC controller 3
 
+config S5P_DEV_I2C_HDMIPHY
+	bool
+	help
+	  Compile in platform device definitions for I2C HDMIPHY controller
+
 config S5P_DEV_MFC
 	bool
 	help
arch/arm/plat-s5p/Makefile +1 -0
index 18925ab..48f3261 100644
@@ -30,6 +30,7 @@ obj-$(CONFIG_S5P_DEV_FIMC0)	+= dev-fimc0.o
 obj-$(CONFIG_S5P_DEV_FIMC1)	+= dev-fimc1.o
 obj-$(CONFIG_S5P_DEV_FIMC2)	+= dev-fimc2.o
 obj-$(CONFIG_S5P_DEV_FIMC3)	+= dev-fimc3.o
+obj-$(CONFIG_S5P_DEV_I2C_HDMIPHY) += dev-i2c-hdmiphy.o
 obj-$(CONFIG_S5P_DEV_ONENAND)	+= dev-onenand.o
 obj-$(CONFIG_S5P_DEV_CSIS0)	+= dev-csis0.o
 obj-$(CONFIG_S5P_DEV_CSIS1)	+= dev-csis1.o
arch/arm/plat-s5p/dev-i2c-hdmiphy.c new file +59 -0

59 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/devs.h +1 -0
index 404499a..fcb53f6 100644
@@ -60,6 +60,7 @@ extern struct platform_device s3c_device_i2c4;
 extern struct platform_device s3c_device_i2c5;
 extern struct platform_device s3c_device_i2c6;
 extern struct platform_device s3c_device_i2c7;
+extern struct platform_device s5p_device_i2c_hdmiphy;
 extern struct platform_device s3c_device_rtc;
 extern struct platform_device s3c_device_adc;
 extern struct platform_device s3c_device_sdi;
arch/arm/plat-samsung/include/plat/iic.h +1 -0
index 56b0059..51d52e7 100644
@@ -60,6 +60,7 @@ extern void s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *i2c);
 extern void s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *i2c);
 extern void s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *i2c);
 extern void s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *i2c);
+extern void s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *i2c);
 
 /* defined by architecture to configure gpio */
 extern void s3c_i2c0_cfg_gpio(struct platform_device *dev);
Signature · 1 line
1.7.1.569.g6f426
#2 lore raw

PATCH v2 2/4 ARM: S5P: add support for tv device

In reply to Marek Szyprowski

From: Tomasz Stanislawski <[email protected]>

This patch adds all the resources for TV drivers and devices for Samsung Exynos4 and S5PV210 platforms.

[m.szyprowski: moved common vpll code to plat-s5p/clocks.c, squashed Exynos4
and S5PV210 patches and rewrote commit message]

---
 arch/arm/mach-exynos4/clock.c                   |  134 ++++++++++++++++++++++-
 arch/arm/mach-exynos4/cpu.c                     |    4 +
 arch/arm/mach-exynos4/include/mach/irqs.h       |    4 +-
 arch/arm/mach-exynos4/include/mach/map.h        |    8 ++
 arch/arm/mach-exynos4/include/mach/regs-pmu.h   |    6 +
 arch/arm/mach-s5pv210/clock.c                   |   81 ++++++++++++--
 arch/arm/mach-s5pv210/cpu.c                     |    4 +
 arch/arm/mach-s5pv210/include/mach/irqs.h       |    2 +-
 arch/arm/mach-s5pv210/include/mach/map.h        |   10 ++
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |    9 +-
 arch/arm/plat-s5p/Kconfig                       |    5 +
 arch/arm/plat-s5p/Makefile                      |    1 +
 arch/arm/plat-s5p/clock.c                       |   73 ++++++++++++
 arch/arm/plat-s5p/dev-tv.c                      |  100 +++++++++++++++++
 arch/arm/plat-s5p/include/plat/s5p-clock.h      |    4 +
 arch/arm/plat-samsung/include/plat/devs.h       |    5 +
 arch/arm/plat-samsung/include/plat/tv-core.h    |   44 ++++++++
 17 files changed, 478 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/plat-s5p/dev-tv.c
 create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
arch/arm/mach-exynos4/clock.c +133 -1
index 965475c..3b0e7e5 100644
@@ -83,6 +83,11 @@ static int exynos4_clk_ip_mfc_ctrl(struct clk *clk, int enable)
 	return s5p_gatectrl(S5P_CLKGATE_IP_MFC, clk, enable);
 }
 
+static int exynos4_clksrc_mask_tv_ctrl(struct clk *clk, int enable)
+{
+	return s5p_gatectrl(S5P_CLKSRC_MASK_TV, clk, enable);
+}
+
 static int exynos4_clk_ip_cam_ctrl(struct clk *clk, int enable)
 {
 	return s5p_gatectrl(S5P_CLKGATE_IP_CAM, clk, enable);
@@ -123,6 +128,16 @@ static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int enable)
 	return s5p_gatectrl(S5P_CLKGATE_IP_PERIR, clk, enable);
 }
 
+static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable)
+{
+	return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable);
+}
+
+static int exynos4_clk_dac_ctrl(struct clk *clk, int enable)
+{
+	return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable);
+}
+
 /* Core list of CMU_CPU side */
 
 static struct clksrc_clk clk_mout_apll = {
@@ -449,6 +464,36 @@ static struct clk init_clocks_off[] = {
 		.enable		= exynos4_clk_ip_fsys_ctrl,
 		.ctrlbit	= (1 << 9),
 	}, {
+		.name		= "dac",
+		.devname	= "s5p-sdo",
+		.enable		= exynos4_clk_ip_tv_ctrl,
+		.ctrlbit	= (1 << 2),
+	}, {
+		.name		= "mixer",
+		.devname	= "s5p-mixer",
+		.enable		= exynos4_clk_ip_tv_ctrl,
+		.ctrlbit	= (1 << 1),
+	}, {
+		.name		= "vp",
+		.devname	= "s5p-mixer",
+		.enable		= exynos4_clk_ip_tv_ctrl,
+		.ctrlbit	= (1 << 0),
+	}, {
+		.name		= "hdmi",
+		.devname	= "s5p-hdmi",
+		.enable		= exynos4_clk_ip_tv_ctrl,
+		.ctrlbit	= (1 << 3),
+	}, {
+		.name		= "hdmiphy",
+		.devname	= "s5p-hdmi",
+		.enable		= exynos4_clk_hdmiphy_ctrl,
+		.ctrlbit	= (1 << 0),
+	}, {
+		.name		= "dacphy",
+		.devname	= "s5p-sdo",
+		.enable		= exynos4_clk_dac_ctrl,
+		.ctrlbit	= (1 << 0),
+	}, {
 		.name		= "sata",
 		.parent		= &clk_aclk_133.clk,
 		.enable		= exynos4_clk_ip_fsys_ctrl,
@@ -788,6 +833,81 @@ static struct clksrc_sources clkset_mout_mfc = {
 	.nr_sources	= ARRAY_SIZE(clkset_mout_mfc_list),
 };
 
+static struct clk *clkset_sclk_dac_list[] = {
+	[0] = &clk_sclk_vpll.clk,
+	[1] = &clk_sclk_hdmiphy,
+};
+
+static struct clksrc_sources clkset_sclk_dac = {
+	.sources	= clkset_sclk_dac_list,
+	.nr_sources	= ARRAY_SIZE(clkset_sclk_dac_list),
+};
+
+static struct clksrc_clk clk_sclk_dac = {
+	.clk		= {
+		.name		= "sclk_dac",
+		.enable		= exynos4_clksrc_mask_tv_ctrl,
+		.ctrlbit	= (1 << 8),
+	},
+	.sources = &clkset_sclk_dac,
+	.reg_src = { .reg = S5P_CLKSRC_TV, .shift = 8, .size = 1 },
+};
+
+static struct clksrc_clk clk_sclk_pixel = {
+	.clk		= {
+		.name		= "sclk_pixel",
+		.parent = &clk_sclk_vpll.clk,
+	},
+	.reg_div = { .reg = S5P_CLKDIV_TV, .shift = 0, .size = 4 },
+};
+
+static struct clk *clkset_sclk_hdmi_list[] = {
+	[0] = &clk_sclk_pixel.clk,
+	[1] = &clk_sclk_hdmiphy,
+};
+
+static struct clksrc_sources clkset_sclk_hdmi = {
+	.sources	= clkset_sclk_hdmi_list,
+	.nr_sources	= ARRAY_SIZE(clkset_sclk_hdmi_list),
+};
+
+static struct clksrc_clk clk_sclk_hdmi = {
+	.clk		= {
+		.name		= "sclk_hdmi",
+		.enable		= exynos4_clksrc_mask_tv_ctrl,
+		.ctrlbit	= (1 << 0),
+	},
+	.sources = &clkset_sclk_hdmi,
+	.reg_src = { .reg = S5P_CLKSRC_TV, .shift = 0, .size = 1 },
+};
+
+static struct clk *clkset_sclk_mixer_list[] = {
+	[0] = &clk_sclk_dac.clk,
+	[1] = &clk_sclk_hdmi.clk,
+};
+
+static struct clksrc_sources clkset_sclk_mixer = {
+	.sources	= clkset_sclk_mixer_list,
+	.nr_sources	= ARRAY_SIZE(clkset_sclk_mixer_list),
+};
+
+static struct clksrc_clk clk_sclk_mixer = {
+	.clk		= {
+		.name		= "sclk_mixer",
+		.enable		= exynos4_clksrc_mask_tv_ctrl,
+		.ctrlbit	= (1 << 4),
+	},
+	.sources = &clkset_sclk_mixer,
+	.reg_src = { .reg = S5P_CLKSRC_TV, .shift = 4, .size = 1 },
+};
+
+static struct clksrc_clk *sclk_tv[] = {
+	&clk_sclk_dac,
+	&clk_sclk_pixel,
+	&clk_sclk_hdmi,
+	&clk_sclk_mixer,
+};
+
 static struct clksrc_clk clk_dout_mmc0 = {
 	.clk		= {
 		.name		= "dout_mmc0",
@@ -1129,6 +1249,11 @@ static struct clk_ops exynos4_fout_apll_ops = {
 	.get_rate = exynos4_fout_apll_get_rate,
 };
 
+static struct clk_ops exynos4_vpll_ops = {
+	.get_rate = s5p_vpll_get_rate,
+	.set_rate = s5p_vpll_set_rate,
+};
+
 void __init_or_cpufreq exynos4_setup_clocks(void)
 {
 	struct clk *xtal_clk;
@@ -1171,6 +1296,7 @@ void __init_or_cpufreq exynos4_setup_clocks(void)
 	clk_fout_apll.ops = &exynos4_fout_apll_ops;
 	clk_fout_mpll.rate = mpll;
 	clk_fout_epll.rate = epll;
+	clk_fout_vpll.ops = &exynos4_vpll_ops;
 	clk_fout_vpll.rate = vpll;
 
 	printk(KERN_INFO "EXYNOS4: PLL settings, A=%ld, M=%ld, E=%ld V=%ld",
@@ -1198,7 +1324,10 @@ void __init_or_cpufreq exynos4_setup_clocks(void)
 }
 
 static struct clk *clks[] __initdata = {
-	/* Nothing here yet */
+	&clk_sclk_hdmi27m,
+	&clk_sclk_hdmiphy,
+	&clk_sclk_usbphy0,
+	&clk_sclk_usbphy1,
 };
 
 void __init exynos4_register_clocks(void)
@@ -1210,6 +1339,9 @@ void __init exynos4_register_clocks(void)
 	for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
 		s3c_register_clksrc(sysclks[ptr], 1);
 
+	for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++)
+		s3c_register_clksrc(sclk_tv[ptr], 1);
+
 	s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
 	s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
 
arch/arm/mach-exynos4/cpu.c +4 -0
index b0370f7..33f1c24 100644
@@ -27,6 +27,7 @@
 #include <plat/devs.h>
 #include <plat/fimc-core.h>
 #include <plat/iic-core.h>
+#include <plat/tv-core.h>
 
 #include <mach/regs-irq.h>
 
@@ -153,6 +154,9 @@ void __init exynos4_map_io(void)
 	s3c_i2c0_setname("s3c2440-i2c");
 	s3c_i2c1_setname("s3c2440-i2c");
 	s3c_i2c2_setname("s3c2440-i2c");
+
+	/* setup TV devices */
+	s5p_hdmi_setname("exynos4-hdmi");
 }
 
 void __init exynos4_init_clocks(int xtal)
arch/arm/mach-exynos4/include/mach/irqs.h +3 -1
index e8eeb94..1aa12e1 100644
@@ -94,9 +94,11 @@
 #define IRQ_2D			IRQ_SPI(89)
 #define IRQ_PCIE		IRQ_SPI(90)
 
+#define IRQ_MIXER		IRQ_SPI(91)
+#define IRQ_HDMI		IRQ_SPI(92)
 #define IRQ_IIC_HDMIPHY		IRQ_SPI(93)
-
 #define IRQ_MFC			IRQ_SPI(94)
+#define IRQ_SDO			IRQ_SPI(95)
 
 #define IRQ_AUDIO_SS		IRQ_SPI(96)
 #define IRQ_I2S0		IRQ_SPI(97)
arch/arm/mach-exynos4/include/mach/map.h +8 -0
index 0b2b1dd..f2053d9 100644
@@ -110,6 +110,10 @@
 
 #define EXYNOS4_PA_UART			0x13800000
 
+#define EXYNOS4_PA_SDO			0x12C20000
+#define EXYNOS4_PA_VP			0x12C00000
+#define EXYNOS4_PA_MIXER		0x12C10000
+#define EXYNOS4_PA_HDMI			0x12D00000
 #define EXYNOS4_PA_IIC_HDMIPHY		0x138E0000
 
 #define EXYNOS4_PA_IIC(x)		(0x13860000 + ((x) * 0x10000))
@@ -160,6 +164,10 @@
 #define S5P_PA_TIMER			EXYNOS4_PA_TIMER
 #define S5P_PA_EHCI			EXYNOS4_PA_EHCI
 
+#define S5P_PA_SDO			EXYNOS4_PA_SDO
+#define S5P_PA_VP			EXYNOS4_PA_VP
+#define S5P_PA_MIXER			EXYNOS4_PA_MIXER
+#define S5P_PA_HDMI			EXYNOS4_PA_HDMI
 #define S5P_PA_IIC_HDMIPHY		EXYNOS4_PA_IIC_HDMIPHY
 
 #define SAMSUNG_PA_KEYPAD		EXYNOS4_PA_KEYPAD
arch/arm/mach-exynos4/include/mach/regs-pmu.h +6 -0
index fa49bbb..faf9b98 100644
@@ -33,9 +33,15 @@
 #define S5P_EINT_WAKEUP_MASK			S5P_PMUREG(0x0604)
 #define S5P_WAKEUP_MASK				S5P_PMUREG(0x0608)
 
+#define S5P_HDMI_PHY_CONTROL			S5P_PMUREG(0x0700)
+#define S5P_HDMI_PHY_ENABLE			(1 << 0)
+
 #define S5P_USBHOST_PHY_CONTROL			S5P_PMUREG(0x0708)
 #define S5P_USBHOST_PHY_ENABLE			(1 << 0)
 
+#define S5P_DAC_PHY_CONTROL			S5P_PMUREG(0x070C)
+#define S5P_DAC_PHY_ENABLE			(1 << 0)
+
 #define S5P_MIPI_DPHY_CONTROL(n)		S5P_PMUREG(0x0710 + (n) * 4)
 #define S5P_MIPI_DPHY_ENABLE			(1 << 0)
 #define S5P_MIPI_DPHY_SRESETN			(1 << 1)
arch/arm/mach-s5pv210/clock.c +70 -11

129 lines not on this page · raw message

arch/arm/mach-s5pv210/cpu.c +4 -0
index 79907ec..6b8cdcc 100644
@@ -41,6 +41,7 @@
 #include <plat/keypad-core.h>
 #include <plat/sdhci.h>
 #include <plat/reset.h>
+#include <plat/tv-core.h>
 
 /* Initial IO mappings */
 
@@ -143,6 +144,9 @@ void __init s5pv210_map_io(void)
 
 	/* Use s5pv210-keypad instead of samsung-keypad */
 	samsung_keypad_setname("s5pv210-keypad");
+
+	/* setup TV devices */
+	s5p_hdmi_setname("s5pv210-hdmi");
 }
 
 void __init s5pv210_init_clocks(int xtal)
arch/arm/mach-s5pv210/include/mach/irqs.h +1 -1
index c1da0a7..5e0de3a 100644
@@ -86,7 +86,7 @@
 #define IRQ_HDMI		S5P_IRQ_VIC2(12)
 #define IRQ_IIC1		S5P_IRQ_VIC2(13)
 #define IRQ_MFC			S5P_IRQ_VIC2(14)
-#define IRQ_TVENC		S5P_IRQ_VIC2(15)
+#define IRQ_SDO			S5P_IRQ_VIC2(15)
 #define IRQ_I2S0		S5P_IRQ_VIC2(16)
 #define IRQ_I2S1		S5P_IRQ_VIC2(17)
 #define IRQ_I2S2		S5P_IRQ_VIC2(18)
arch/arm/mach-s5pv210/include/mach/map.h +10 -0
index a420654..7ff609f 100644
@@ -90,6 +90,10 @@
 #define S5PV210_PA_FIMC1		0xFB300000
 #define S5PV210_PA_FIMC2		0xFB400000
 
+#define S5PV210_PA_SDO			0xF9000000
+#define S5PV210_PA_VP			0xF9100000
+#define S5PV210_PA_MIXER		0xF9200000
+#define S5PV210_PA_HDMI			0xFA100000
 #define S5PV210_PA_IIC_HDMIPHY		0xFA900000
 
 /* Compatibiltiy Defines */
@@ -113,6 +117,12 @@
 #define S5P_PA_MIPI_CSIS0		S5PV210_PA_MIPI_CSIS
 #define S5P_PA_MFC			S5PV210_PA_MFC
 #define S5P_PA_IIC_HDMIPHY		S5PV210_PA_IIC_HDMIPHY
+
+#define S5P_PA_SDO			S5PV210_PA_SDO
+#define S5P_PA_VP			S5PV210_PA_VP
+#define S5P_PA_MIXER			S5PV210_PA_MIXER
+#define S5P_PA_HDMI			S5PV210_PA_HDMI
+
 #define S5P_PA_ONENAND			S5PC110_PA_ONENAND
 #define S5P_PA_ONENAND_DMA		S5PC110_PA_ONENAND_DMA
 #define S5P_PA_SDRAM			S5PV210_PA_SDRAM
arch/arm/mach-s5pv210/include/mach/regs-clock.h +7 -2
index 78925c5..116a76b 100644
@@ -26,7 +26,9 @@
 #define S5P_MPLL_CON		S5P_CLKREG(0x108)
 #define S5P_EPLL_CON		S5P_CLKREG(0x110)
 #define S5P_EPLL_CON1		S5P_CLKREG(0x114)
-#define S5P_VPLL_CON		S5P_CLKREG(0x120)
+#define S5P_VPLL_CON0		S5P_CLKREG(0x120)
+#define S5P_VPLL_CON		S5P_VPLL_CON0
+#define S5P_VPLL_CON1		S5P_CLKREG(0x120)
 
 #define S5P_CLK_SRC0		S5P_CLKREG(0x200)
 #define S5P_CLK_SRC1		S5P_CLKREG(0x204)
@@ -118,6 +120,8 @@
 #define S5P_CLKDIV6_ONEDRAM_SHIFT       (28)
 #define S5P_CLKDIV6_ONEDRAM_MASK        (0xF << S5P_CLKDIV6_ONEDRAM_SHIFT)
 
+#define S5P_VPLLCON0_LOCKED_SHIFT	(29)
+
 #define S5P_SWRESET		S5P_CLKREG(0x2000)
 
 #define S5P_ARM_MCS_CON		S5P_CLKREG(0x6100)
@@ -144,8 +148,9 @@
 
 #define S5P_OTHERS		S5P_CLKREG(0xE000)
 #define S5P_OM_STAT		S5P_CLKREG(0xE100)
+#define S5P_HDMI_PHY_CONTROL	S5P_CLKREG(0xE804)
 #define S5P_USB_PHY_CONTROL	S5P_CLKREG(0xE80C)
-#define S5P_DAC_CONTROL		S5P_CLKREG(0xE810)
+#define S5P_DAC_PHY_CONTROL	S5P_CLKREG(0xE810)
 #define S5P_MIPI_DPHY_CONTROL(x) S5P_CLKREG(0xE814)
 #define S5P_MIPI_DPHY_ENABLE	(1 << 0)
 #define S5P_MIPI_DPHY_SRESETN	(1 << 1)
arch/arm/plat-s5p/Kconfig +5 -0
index 61bff07..fa13cd8 100644
@@ -96,6 +96,11 @@ config S5P_DEV_CSIS1
 	help
 	  Compile in platform device definitions for MIPI-CSIS channel 1
 
+config S5P_DEV_TV
+	bool
+	help
+	  Compile in platform device definition for TV interface
+
 config S5P_DEV_USB_EHCI
 	bool
 	help
arch/arm/plat-s5p/Makefile +1 -0
index 48f3261..7db3ff3 100644
@@ -34,5 +34,6 @@ obj-$(CONFIG_S5P_DEV_I2C_HDMIPHY) += dev-i2c-hdmiphy.o
 obj-$(CONFIG_S5P_DEV_ONENAND)	+= dev-onenand.o
 obj-$(CONFIG_S5P_DEV_CSIS0)	+= dev-csis0.o
 obj-$(CONFIG_S5P_DEV_CSIS1)	+= dev-csis1.o
+obj-$(CONFIG_S5P_DEV_TV)	+= dev-tv.o
 obj-$(CONFIG_S5P_DEV_USB_EHCI)	+= dev-ehci.o
 obj-$(CONFIG_S5P_SETUP_MIPIPHY)	+= setup-mipiphy.o
arch/arm/plat-s5p/clock.c +73 -0

85 lines not on this page · raw message

arch/arm/plat-s5p/dev-tv.c new file +100 -0

100 lines not on this page · raw message

arch/arm/plat-s5p/include/plat/s5p-clock.h +4 -0
index 769b5bd..7cb2ffc 100644
@@ -47,6 +47,10 @@ extern int s5p_gatectrl(void __iomem *reg, struct clk *clk, int enable);
 extern int s5p_epll_enable(struct clk *clk, int enable);
 extern unsigned long s5p_epll_get_rate(struct clk *clk);
 
+/* Common VPLL operations for S5P platform */
+extern unsigned long s5p_vpll_get_rate(struct clk *clk);
+extern int s5p_vpll_set_rate(struct clk *clk, unsigned long rate);
+
 /* SPDIF clk operations common for S5PC100/V210/C110 and Exynos4 */
 extern int s5p_spdif_set_rate(struct clk *clk, unsigned long rate);
 extern unsigned long s5p_spdif_get_rate(struct clk *clk);
arch/arm/plat-samsung/include/plat/devs.h +5 -0
index fcb53f6..037de61 100644
@@ -141,6 +141,11 @@ extern struct platform_device s5p_device_fimc3;
 extern struct platform_device s5p_device_mfc;
 extern struct platform_device s5p_device_mfc_l;
 extern struct platform_device s5p_device_mfc_r;
+
+extern struct platform_device s5p_device_hdmi;
+extern struct platform_device s5p_device_mixer;
+extern struct platform_device s5p_device_sdo;
+
 extern struct platform_device s5p_device_mipi_csis0;
 extern struct platform_device s5p_device_mipi_csis1;
 
arch/arm/plat-samsung/include/plat/tv-core.h new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
1.7.1.569.g6f426
#3 lore raw

PATCH v2 3/4 ARM: Exynos4: enable TV support on Universal_C210 board

In reply to Marek Szyprowski

From: Tomasz Stanislawski <[email protected]>

This patch adds platform devices and regulators for TV devices on Samsung Universal C210 board.

---
 arch/arm/mach-exynos4/Kconfig               |    2 +
 arch/arm/mach-exynos4/mach-universal_c210.c |   74 +++++++++++++++++++++++++++
 2 files changed, 76 insertions(+), 0 deletions(-)
arch/arm/mach-exynos4/Kconfig +2 -0
index fc38532..b7b2ea5 100644
@@ -175,9 +175,11 @@ config MACH_UNIVERSAL_C210
 	select S3C_DEV_I2C1
 	select S3C_DEV_I2C3
 	select S3C_DEV_I2C5
+	select S5P_DEV_I2C_HDMIPHY
 	select S5P_DEV_MFC
 	select S5P_DEV_ONENAND
 	select EXYNOS4_DEV_PD
+	select S5P_DEV_TV
 	select EXYNOS4_SETUP_I2C1
 	select EXYNOS4_SETUP_I2C3
 	select EXYNOS4_SETUP_I2C5
arch/arm/mach-exynos4/mach-universal_c210.c +74 -0

146 lines not on this page · raw message

Signature · 1 line
1.7.1.569.g6f426
#4 lore raw

PATCH v2 4/4 ARM: S5PV210: enable TV support on GONI board

In reply to Marek Szyprowski

From: Tomasz Stanislawski <[email protected]>

This patch adds platform devices and regulators for TV devices on Samsung Goni board.

---
 arch/arm/mach-s5pv210/Kconfig     |    1 +
 arch/arm/mach-s5pv210/mach-goni.c |    9 +++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/Kconfig +1 -0
index 69dd87c..ab6a87c 100644
@@ -94,6 +94,7 @@ config MACH_GONI
 	select S3C_DEV_USB_HSOTG
 	select S5P_DEV_ONENAND
 	select SAMSUNG_DEV_KEYPAD
+	select S5P_DEV_TV
 	select S5PV210_SETUP_FB_24BPP
 	select S5PV210_SETUP_I2C1
 	select S5PV210_SETUP_I2C2
arch/arm/mach-s5pv210/mach-goni.c +9 -0
index 85c2d51..14578f5 100644
@@ -285,6 +285,7 @@ static struct regulator_consumer_supply goni_ldo5_consumers[] = {
 
 static struct regulator_consumer_supply goni_ldo8_consumers[] = {
 	REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
+	REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
 };
 
 static struct regulator_consumer_supply goni_ldo11_consumers[] = {
@@ -475,6 +476,10 @@ static struct regulator_consumer_supply buck1_consumer =
 static struct regulator_consumer_supply buck2_consumer =
 	REGULATOR_SUPPLY("vddint", NULL);
 
+static struct regulator_consumer_supply buck3_consumer =
+	REGULATOR_SUPPLY("vdet", "s5p-sdo");
+
+
 static struct regulator_init_data goni_buck1_data = {
 	.constraints	= {
 		.name		= "VARM_1.2V",
@@ -511,6 +516,8 @@ static struct regulator_init_data goni_buck3_data = {
 			.enabled = 1,
 		},
 	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &buck3_consumer,
 };
 
 static struct regulator_init_data goni_buck4_data = {
@@ -812,6 +819,8 @@ static struct platform_device *goni_devices[] __initdata = {
 	&s5p_device_mfc,
 	&s5p_device_mfc_l,
 	&s5p_device_mfc_r,
+	&s5p_device_mixer,
+	&s5p_device_sdo,
 	&s3c_device_i2c0,
 	&s5p_device_fimc0,
 	&s5p_device_fimc1,
Signature · 1 line
1.7.1.569.g6f426
#5 lore raw
In reply to Marek Szyprowski
Quoted 3 lines · Marek Szyprowski

Hello,

Hi,

Quoted 57 lines

This patch series contains platform definitions for s5p-tv driver rebased onto latest for-next branch (including generic GIC and clockdev changes).

Changes since v1:
- renamed i2c8 to common i2c-hdmiphy
- moved common vpll code to plat-s5p/clocks.c
- added check for pll locking
- various minor coding style fixes here and there

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

Patch summary:

Tomasz Stanislawski (4):
ARM: Samsung: add i2c hdmiphy controller definitions
ARM: S5P: add support for tv device
ARM: Exynos4: enable TV support on Universal_C210 board
ARM: S5PV210: enable TV support on GONI board

 arch/arm/mach-exynos4/Kconfig                    |    2 +
 arch/arm/mach-exynos4/clock.c                    |  140
+++++++++++++++++++++-
 arch/arm/mach-exynos4/cpu.c                      |    4 +
 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h |   16 +++
 arch/arm/mach-exynos4/include/mach/irqs.h        |    4 +
 arch/arm/mach-exynos4/include/mach/map.h         |   12 ++
 arch/arm/mach-exynos4/include/mach/regs-pmu.h    |    6 +
 arch/arm/mach-exynos4/mach-universal_c210.c      |   74 ++++++++++++
 arch/arm/mach-s5pv210/Kconfig                    |    1 +
 arch/arm/mach-s5pv210/clock.c                    |   87 ++++++++++++--
 arch/arm/mach-s5pv210/cpu.c                      |    4 +
 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h |   16 +++
 arch/arm/mach-s5pv210/include/mach/irqs.h        |    4 +-
 arch/arm/mach-s5pv210/include/mach/map.h         |   13 ++
 arch/arm/mach-s5pv210/include/mach/regs-clock.h  |    9 +-
 arch/arm/mach-s5pv210/mach-goni.c                |    9 ++
 arch/arm/plat-s5p/Kconfig                        |   10 ++
 arch/arm/plat-s5p/Makefile                       |    2 +
 arch/arm/plat-s5p/clock.c                        |   73 +++++++++++
 arch/arm/plat-s5p/dev-i2c-hdmiphy.c              |   59 +++++++++
 arch/arm/plat-s5p/dev-tv.c                       |  100 +++++++++++++++
 arch/arm/plat-s5p/include/plat/s5p-clock.h       |    4 +
 arch/arm/plat-samsung/include/plat/devs.h        |    6 +
 arch/arm/plat-samsung/include/plat/iic.h         |    1 +
 arch/arm/plat-samsung/include/plat/tv-core.h     |   44 +++++++
 25 files changed, 684 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
 create mode 100644 arch/arm/plat-s5p/dev-tv.c
 create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
Quoted 2 lines

--
1.7.1.569.g6f426

Hi Marek,

Looks good but happens following build failure with s5pc100_defconfig/s5p64x0_defconfig. Because they have no VPLL :(

arch/arm/kernel/return_address.c:62: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/plat-s5p/clock.c: In function 's5p_vpll_set_rate':
arch/arm/plat-s5p/clock.c:237: error: 'S5P_VPLL_CON0' undeclared (first use in this function)
arch/arm/plat-s5p/clock.c:237: error: (Each undeclared identifier is reported only once
arch/arm/plat-s5p/clock.c:237: error: for each function it appears in.) arch/arm/plat-s5p/clock.c:243: error: 'S5P_VPLL_CON1' undeclared (first use in this function)
arch/arm/plat-s5p/clock.c:272: error: 'S5P_VPLLCON0_LOCKED_SHIFT' undeclared (first use in this function)
make[1]: *** [arch/arm/plat-s5p/clock.o] Error 1

First of all, I will send 'pull request' without this series...

I'm not sure can have a chance to send 'pull request' again for this merge window.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#6 lore raw

Hello,

Quoted 66 lines · Kukjin Kim
Quoted 57 lines

This patch series contains platform definitions for s5p-tv driver rebased onto latest for-next branch (including generic GIC and clockdev changes).

Changes since v1:
- renamed i2c8 to common i2c-hdmiphy
- moved common vpll code to plat-s5p/clocks.c
- added check for pll locking
- various minor coding style fixes here and there

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

Patch summary:

Tomasz Stanislawski (4):
ARM: Samsung: add i2c hdmiphy controller definitions
ARM: S5P: add support for tv device
ARM: Exynos4: enable TV support on Universal_C210 board
ARM: S5PV210: enable TV support on GONI board

 arch/arm/mach-exynos4/Kconfig                    |    2 +
 arch/arm/mach-exynos4/clock.c                    |  140
+++++++++++++++++++++-
 arch/arm/mach-exynos4/cpu.c                      |    4 +
 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h |   16 +++
 arch/arm/mach-exynos4/include/mach/irqs.h        |    4 +
 arch/arm/mach-exynos4/include/mach/map.h         |   12 ++
 arch/arm/mach-exynos4/include/mach/regs-pmu.h    |    6 +
 arch/arm/mach-exynos4/mach-universal_c210.c      |   74 ++++++++++++
 arch/arm/mach-s5pv210/Kconfig                    |    1 +
 arch/arm/mach-s5pv210/clock.c                    |   87 ++++++++++++--
 arch/arm/mach-s5pv210/cpu.c                      |    4 +
 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h |   16 +++
 arch/arm/mach-s5pv210/include/mach/irqs.h        |    4 +-
 arch/arm/mach-s5pv210/include/mach/map.h         |   13 ++
 arch/arm/mach-s5pv210/include/mach/regs-clock.h  |    9 +-
 arch/arm/mach-s5pv210/mach-goni.c                |    9 ++
 arch/arm/plat-s5p/Kconfig                        |   10 ++
 arch/arm/plat-s5p/Makefile                       |    2 +
 arch/arm/plat-s5p/clock.c                        |   73 +++++++++++
 arch/arm/plat-s5p/dev-i2c-hdmiphy.c              |   59 +++++++++
 arch/arm/plat-s5p/dev-tv.c                       |  100 +++++++++++++++
 arch/arm/plat-s5p/include/plat/s5p-clock.h       |    4 +
 arch/arm/plat-samsung/include/plat/devs.h        |    6 +
 arch/arm/plat-samsung/include/plat/iic.h         |    1 +
 arch/arm/plat-samsung/include/plat/tv-core.h     |   44 +++++++
 25 files changed, 684 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h
 create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
 create mode 100644 arch/arm/plat-s5p/dev-tv.c
 create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
Quoted 2 lines

--
1.7.1.569.g6f426

Hi Marek,

Looks good but happens following build failure with s5pc100_defconfig/s5p64x0_defconfig. Because they have no VPLL :(

Quoted 13 lines

arch/arm/kernel/return_address.c:62: warning: #warning "TODO: return_address should use unwind tables"
arch/arm/plat-s5p/clock.c: In function 's5p_vpll_set_rate':
arch/arm/plat-s5p/clock.c:237: error: 'S5P_VPLL_CON0' undeclared (first use in this function)
arch/arm/plat-s5p/clock.c:237: error: (Each undeclared identifier is reported only once
arch/arm/plat-s5p/clock.c:237: error: for each function it appears in.) arch/arm/plat-s5p/clock.c:243: error: 'S5P_VPLL_CON1' undeclared (first use in this function)
arch/arm/plat-s5p/clock.c:272: error: 'S5P_VPLLCON0_LOCKED_SHIFT' undeclared (first use in this function)
make[1]: *** [arch/arm/plat-s5p/clock.o] Error 1

Huh... Right, I forgot about other platforms. What do you think about making this vpll code compiled conditionally only for EXYNOS4 and S5PV210? The other solution is to move it into a separate file.

Quoted 4 lines

First of all, I will send 'pull request' without this series...

I'm not sure can have a chance to send 'pull request' again for this merge window.

Ok, I understand.

Best regards

Signature · 2 lines
Marek Szyprowski
Samsung Poland R&D Center