All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] S5P-TV support for Exynos Nuri and Universal boards
@ 2012-01-26 17:13 Tomasz Stanislawski
  2012-01-26 17:13 ` [PATCH 1/2] ARM: Exynos4: enable TV support on Nuri board Tomasz Stanislawski
  2012-01-26 17:13 ` [PATCH 2/2] ARM: Exynos4: fix TV support on Universal_C210 board Tomasz Stanislawski
  0 siblings, 2 replies; 3+ messages in thread
From: Tomasz Stanislawski @ 2012-01-26 17:13 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, m.szyprowski, t.stanislaws, kyungmin.park

Hello,

This patch series contains platform definitions for s5p-tv driver. It includes
fixes to HDMI support on Exynos Universal.  It adds S5P-TV support on Nuri
board.

Please refer to patchset 'Updates to S5P-TV drivers' on linux-media where
definitions of platform data for SII0234 were introduced.

Regards
Tomasz Stanislawski

Tomasz Stanislawski (2):
  ARM: Exynos4: enable TV support on Nuri board
  ARM: Exynos4: fix TV support on Universal_C210 board

 arch/arm/mach-exynos/Kconfig               |    2 +
 arch/arm/mach-exynos/mach-nuri.c           |   99 ++++++++++++++++++++++++++++
 arch/arm/mach-exynos/mach-universal_c210.c |   14 ++++
 3 files changed, 115 insertions(+), 0 deletions(-)

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] ARM: Exynos4: enable TV support on Nuri board
  2012-01-26 17:13 [PATCH 0/2] S5P-TV support for Exynos Nuri and Universal boards Tomasz Stanislawski
@ 2012-01-26 17:13 ` Tomasz Stanislawski
  2012-01-26 17:13 ` [PATCH 2/2] ARM: Exynos4: fix TV support on Universal_C210 board Tomasz Stanislawski
  1 sibling, 0 replies; 3+ messages in thread
From: Tomasz Stanislawski @ 2012-01-26 17:13 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, m.szyprowski, t.stanislaws, kyungmin.park

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

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/mach-exynos/Kconfig     |    2 +
 arch/arm/mach-exynos/mach-nuri.c |   99 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 5d602f6..4cb5225 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -268,12 +268,14 @@ config MACH_NURI
 	select S3C_DEV_I2C1
 	select S3C_DEV_I2C3
 	select S3C_DEV_I2C5
+	select S5P_DEV_I2C_HDMIPHY
 	select S5P_DEV_CSIS0
 	select S5P_DEV_FIMC0
 	select S5P_DEV_FIMC1
 	select S5P_DEV_FIMC2
 	select S5P_DEV_FIMC3
 	select S5P_DEV_MFC
+	select S5P_DEV_TV
 	select S5P_DEV_USB_EHCI
 	select S5P_SETUP_MIPIPHY
 	select EXYNOS4_DEV_DMA
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index b895ec0..7d04844 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -8,6 +8,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/input.h>
@@ -29,6 +30,8 @@
 #include <video/platform_lcd.h>
 #include <media/m5mols.h>
 #include <media/s5p_fimc.h>
+#include <media/s5p_hdmi.h>
+#include <media/sii9234.h>
 #include <media/v4l2-mediabus.h>
 
 #include <asm/mach/arch.h>
@@ -75,6 +78,7 @@ enum fixed_regulator_id {
 	FIXED_REG_ID_MAX8903,
 	FIXED_REG_ID_CAM_A28V,
 	FIXED_REG_ID_CAM_12V,
+	FIXED_REG_ID_HDMI_EN,
 };
 
 static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = {
@@ -389,9 +393,12 @@ static void __init nuri_tsp_init(void)
 
 static struct regulator_consumer_supply __initdata max8997_ldo1_[] = {
 	REGULATOR_SUPPLY("vdd", "s5p-adc"), /* Used by CPU's ADC drv */
+	REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"), /* HDMI */
 };
 static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
 	REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+	REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */
+	REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */
 };
 static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
 	REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
@@ -563,6 +570,51 @@ static struct regulator_init_data __initdata max8997_ldo7_data = {
 	.consumer_supplies	= max8997_ldo7_,
 };
 
+static struct regulator_consumer_supply hdmi_fixed_consumer[] = {
+	REGULATOR_SUPPLY("hdmi-en", "exynos4-hdmi"),
+	REGULATOR_SUPPLY("hdmi-en", "15-0039"), /* sii9234 */
+};
+
+static struct regulator_init_data hdmi_fixed_voltage_init_data = {
+	.constraints		= {
+		.name		= "HDMI_5V",
+		.valid_ops_mask	= REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(hdmi_fixed_consumer),
+	.consumer_supplies	= hdmi_fixed_consumer,
+};
+
+static struct fixed_voltage_config hdmi_fixed_voltage_config = {
+	.supply_name		= "HDMI_EN1",
+	.microvolts		= 5000000,
+	.gpio			= EXYNOS4_GPX2(4),
+	.enable_high		= true,
+	.init_data		= &hdmi_fixed_voltage_init_data,
+};
+
+static struct platform_device hdmi_fixed_voltage = {
+	.name			= "reg-fixed-voltage",
+	.id			= FIXED_REG_ID_HDMI_EN,
+	.dev			= {
+		.platform_data	= &hdmi_fixed_voltage_config,
+	},
+};
+
+/* I2C-GPIO15: MHL */
+static struct i2c_gpio_platform_data i2c15_gpio_data = {
+	.sda_pin		= EXYNOS4_GPY3(0),	/* XM0ADDR_0 */
+	.scl_pin		= EXYNOS4_GPY3(2),	/* XM0ADDR_2 */
+	.udelay			= 2,
+};
+
+static struct platform_device i2c15_gpio = {
+	.name			= "i2c-gpio",
+	.id			= 15,
+	.dev			= {
+		.platform_data	= &i2c15_gpio_data,
+	},
+};
+
 static struct regulator_init_data __initdata max8997_ldo8_data = {
 	.constraints	= {
 		.name		= "VUSB/VDAC_3.3V_C210",
@@ -1267,6 +1319,11 @@ static struct platform_device *nuri_devices[] __initdata = {
 	&exynos4_device_pd[PD_LCD0],
 	&exynos4_device_pd[PD_CAM],
 	&s5p_device_fimc_md,
+	&exynos4_device_pd[PD_TV],
+	&hdmi_fixed_voltage,
+	&s5p_device_i2c_hdmiphy,
+	&s5p_device_hdmi,
+	&s5p_device_mixer,
 
 	/* NURI Devices */
 	&nuri_gpio_keys,
@@ -1276,6 +1333,7 @@ static struct platform_device *nuri_devices[] __initdata = {
 	&nuri_max8903_device,
 	&cam_vdda_fixed_rdev,
 	&cam_8m_12v_fixed_rdev,
+	&i2c15_gpio,
 };
 
 static void __init nuri_map_io(void)
@@ -1290,6 +1348,46 @@ static void __init nuri_reserve(void)
 	s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
 }
 
+static struct i2c_board_info s5p_hdmiphy_info = {
+	I2C_BOARD_INFO("hdmiphy", 0x70 >> 1),
+};
+
+static struct sii9234_platform_data s5p_sii9234_pdata = {
+	.gpio_n_reset = EXYNOS4_GPF3(4),
+};
+
+static struct i2c_board_info s5p_sii9234_info = {
+	I2C_BOARD_INFO("SII9234", 0x72 >> 1),
+	.platform_data = &s5p_sii9234_pdata,
+};
+
+static struct s5p_hdmi_platform_data s5p_hdmi_pdata = {
+	.hdmiphy_info = &s5p_hdmiphy_info,
+	.hdmiphy_bus = 8,
+	.mhl_info = &s5p_sii9234_info,
+	.mhl_bus = 15,
+};
+
+static void s5p_tv_init(void)
+{
+	/* setting up HDMIPHY device */
+	s5p_i2c_hdmiphy_set_platdata(NULL);
+
+	/* direct HPD to HDMI chip */
+	gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
+
+	gpio_direction_input(EXYNOS4_GPX3(7));
+	s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
+	s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
+
+	/* setting platform data */
+	s5p_device_hdmi.dev.platform_data = &s5p_hdmi_pdata;
+
+	/* setup dependencies between TV devices */
+	s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
+	s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
+}
+
 static void __init nuri_machine_init(void)
 {
 	nuri_sdhci_init();
@@ -1318,6 +1416,7 @@ static void __init nuri_machine_init(void)
 	s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
 	s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
 
+	s5p_tv_init();
 	s5p_device_fimc0.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 	s5p_device_fimc1.dev.parent = &exynos4_device_pd[PD_CAM].dev;
 	s5p_device_fimc2.dev.parent = &exynos4_device_pd[PD_CAM].dev;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ARM: Exynos4: fix TV support on Universal_C210 board
  2012-01-26 17:13 [PATCH 0/2] S5P-TV support for Exynos Nuri and Universal boards Tomasz Stanislawski
  2012-01-26 17:13 ` [PATCH 1/2] ARM: Exynos4: enable TV support on Nuri board Tomasz Stanislawski
@ 2012-01-26 17:13 ` Tomasz Stanislawski
  1 sibling, 0 replies; 3+ messages in thread
From: Tomasz Stanislawski @ 2012-01-26 17:13 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: kgene.kim, m.szyprowski, t.stanislaws, kyungmin.park

This patch adds support for HDMI platform data.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/mach-exynos/mach-universal_c210.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 37ac93e..bec57c0 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -45,6 +45,8 @@
 
 #include <media/v4l2-mediabus.h>
 #include <media/s5p_fimc.h>
+#include <media/s5p_hdmi.h>
+
 #include <media/m5mols.h>
 
 #include "common.h"
@@ -997,6 +999,15 @@ static void __init universal_map_io(void)
 	s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
 }
 
+static struct i2c_board_info s5p_hdmiphy_info = {
+	I2C_BOARD_INFO("hdmiphy", 0x70 >> 1),
+};
+
+static struct s5p_hdmi_platform_data s5p_hdmi_pdata = {
+	.hdmiphy_info = &s5p_hdmiphy_info,
+	.hdmiphy_bus = 8,
+};
+
 void s5p_tv_setup(void)
 {
 	/* direct HPD to HDMI chip */
@@ -1004,6 +1015,9 @@ void s5p_tv_setup(void)
 	s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3));
 	s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE);
 
+	/* setting platform data */
+	s5p_device_hdmi.dev.platform_data = &s5p_hdmi_pdata;
+
 	/* setup dependencies between TV devices */
 	s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
 	s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-26 17:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 17:13 [PATCH 0/2] S5P-TV support for Exynos Nuri and Universal boards Tomasz Stanislawski
2012-01-26 17:13 ` [PATCH 1/2] ARM: Exynos4: enable TV support on Nuri board Tomasz Stanislawski
2012-01-26 17:13 ` [PATCH 2/2] ARM: Exynos4: fix TV support on Universal_C210 board Tomasz Stanislawski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.