Skip to content

Commit

Permalink
HDMI_DDC I2C2 bus uses GPIO based bitbanging
Browse files Browse the repository at this point in the history
  • Loading branch information
ckkim committed Dec 20, 2013
1 parent 769860b commit 98b6c57
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
4 changes: 1 addition & 3 deletions arch/arm/configs/odroidu2_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.8.13.13 Kernel Configuration
# Linux/arm 3.8.13.14 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
Expand Down Expand Up @@ -317,7 +317,6 @@ CONFIG_S3C_DEV_HSMMC1=y
CONFIG_S3C_DEV_HSMMC2=y
CONFIG_S3C_DEV_HSMMC3=y
CONFIG_S3C_DEV_I2C1=y
CONFIG_S3C_DEV_I2C2=y
CONFIG_S3C_DEV_I2C3=y
CONFIG_S3C_DEV_I2C7=y
CONFIG_S3C_DEV_USB_HSOTG=y
Expand Down Expand Up @@ -374,7 +373,6 @@ CONFIG_EXYNOS_DEV_SYSMMU=y
CONFIG_EXYNOS4_DEV_DWMCI=y
CONFIG_EXYNOS4_DEV_USB_OHCI=y
CONFIG_EXYNOS4_SETUP_I2C1=y
CONFIG_EXYNOS4_SETUP_I2C2=y
CONFIG_EXYNOS4_SETUP_I2C3=y
CONFIG_EXYNOS4_SETUP_I2C7=y
CONFIG_EXYNOS4_SETUP_KEYPAD=y
Expand Down
7 changes: 3 additions & 4 deletions arch/arm/configs/odroidx2_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.8.13.13 Kernel Configuration
# Linux/arm 3.8.13.14 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
Expand Down Expand Up @@ -317,7 +317,6 @@ CONFIG_S3C_DEV_HSMMC1=y
CONFIG_S3C_DEV_HSMMC2=y
CONFIG_S3C_DEV_HSMMC3=y
CONFIG_S3C_DEV_I2C1=y
CONFIG_S3C_DEV_I2C2=y
CONFIG_S3C_DEV_I2C3=y
CONFIG_S3C_DEV_I2C7=y
CONFIG_S3C_DEV_USB_HSOTG=y
Expand Down Expand Up @@ -374,7 +373,6 @@ CONFIG_EXYNOS_DEV_SYSMMU=y
CONFIG_EXYNOS4_DEV_DWMCI=y
CONFIG_EXYNOS4_DEV_USB_OHCI=y
CONFIG_EXYNOS4_SETUP_I2C1=y
CONFIG_EXYNOS4_SETUP_I2C2=y
CONFIG_EXYNOS4_SETUP_I2C3=y
CONFIG_EXYNOS4_SETUP_I2C7=y
CONFIG_EXYNOS4_SETUP_KEYPAD=y
Expand Down Expand Up @@ -1774,7 +1772,7 @@ CONFIG_I2C_ALGOBIT=y
#
# CONFIG_I2C_CBUS_GPIO is not set
# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
# CONFIG_I2C_GPIO is not set
CONFIG_I2C_GPIO=y
# CONFIG_I2C_NOMADIK is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
Expand Down Expand Up @@ -3101,6 +3099,7 @@ CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_MAX77686 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
Expand Down
7 changes: 3 additions & 4 deletions arch/arm/configs/odroidx_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.8.13.13 Kernel Configuration
# Linux/arm 3.8.13.14 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
Expand Down Expand Up @@ -317,7 +317,6 @@ CONFIG_S3C_DEV_HSMMC1=y
CONFIG_S3C_DEV_HSMMC2=y
CONFIG_S3C_DEV_HSMMC3=y
CONFIG_S3C_DEV_I2C1=y
CONFIG_S3C_DEV_I2C2=y
CONFIG_S3C_DEV_I2C3=y
CONFIG_S3C_DEV_I2C7=y
CONFIG_S3C_DEV_USB_HSOTG=y
Expand Down Expand Up @@ -375,7 +374,6 @@ CONFIG_EXYNOS_DEV_SYSMMU=y
CONFIG_EXYNOS4_DEV_DWMCI=y
CONFIG_EXYNOS4_DEV_USB_OHCI=y
CONFIG_EXYNOS4_SETUP_I2C1=y
CONFIG_EXYNOS4_SETUP_I2C2=y
CONFIG_EXYNOS4_SETUP_I2C3=y
CONFIG_EXYNOS4_SETUP_I2C7=y
CONFIG_EXYNOS4_SETUP_KEYPAD=y
Expand Down Expand Up @@ -1775,7 +1773,7 @@ CONFIG_I2C_ALGOBIT=y
#
# CONFIG_I2C_CBUS_GPIO is not set
# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
# CONFIG_I2C_GPIO is not set
CONFIG_I2C_GPIO=y
# CONFIG_I2C_NOMADIK is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
Expand Down Expand Up @@ -3102,6 +3100,7 @@ CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_MAX77686 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-exynos/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,6 @@ config MACH_HKDK4412
select EXYNOS_DEV_DMA
select EXYNOS_DEV_DRM
select EXYNOS_DEV_SYSMMU
select EXYNOS4_SETUP_I2C2
select S3C_DEV_I2C2
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C_DEV_USB_HSOTG
Expand Down
21 changes: 19 additions & 2 deletions arch/arm/mach-exynos/mach-hkdk4412.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,24 @@ static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
#endif
};

/* I2C2 bus GPIO-Bitbanging */
#define GPIO_I2C2_SDA EXYNOS4_GPA0(6)
#define GPIO_I2C2_SCL EXYNOS4_GPA0(7)
static struct i2c_gpio_platform_data i2c2_gpio_platdata = {
.sda_pin = GPIO_I2C2_SDA,
.scl_pin = GPIO_I2C2_SCL,
.udelay = 5,
.sda_is_open_drain = 0,
.scl_is_open_drain = 0,
.scl_is_output_only = 0
};

static struct platform_device gpio_device_i2c2 = {
.name = "i2c-gpio",
.id = 2, // adepter number
.dev.platform_data = &i2c2_gpio_platdata,
};

/* Odroid-O2 schematics show the DDC of the remote HDMI device connected to
* I2C2. HDMI specs state that DDC always sits at bus address 0x50. */
static struct i2c_board_info hkdk4412_i2c_devs2[] __initdata = {
Expand Down Expand Up @@ -463,7 +481,7 @@ static struct platform_device *hkdk4412_devices[] __initdata = {
&s3c_device_hsmmc2,
&s3c_device_i2c0,
&s3c_device_i2c1,
&s3c_device_i2c2,
&gpio_device_i2c2,
&s3c_device_i2c3,
#if defined(CONFIG_ODROID_U2)
&gpio_device_i2c4,
Expand Down Expand Up @@ -600,7 +618,6 @@ static void __init hkdk4412_machine_init(void)
i2c_register_board_info(1, hkdk4412_i2c_devs1,
ARRAY_SIZE(hkdk4412_i2c_devs1));

s3c_i2c2_set_platdata(NULL);
i2c_register_board_info(2, hkdk4412_i2c_devs2,
ARRAY_SIZE(hkdk4412_i2c_devs2));

Expand Down
1 change: 1 addition & 0 deletions drivers/cpufreq/exynos4x12-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ static const unsigned int asv_voltage_4x12[CPUFREQ_LEVEL_END] = {
925000,
925000,
925000,
};
#endif
static void exynos4x12_set_clkdiv(unsigned int div_index)
{
Expand Down

0 comments on commit 98b6c57

Please sign in to comment.