Skip to content

Commit 98b6c57

Browse files
author
ckkim
committed
HDMI_DDC I2C2 bus uses GPIO based bitbanging
1 parent 769860b commit 98b6c57

File tree

6 files changed

+27
-15
lines changed

6 files changed

+27
-15
lines changed

arch/arm/configs/odroidu2_defconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Automatically generated file; DO NOT EDIT.
3-
# Linux/arm 3.8.13.13 Kernel Configuration
3+
# Linux/arm 3.8.13.14 Kernel Configuration
44
#
55
CONFIG_ARM=y
66
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -317,7 +317,6 @@ CONFIG_S3C_DEV_HSMMC1=y
317317
CONFIG_S3C_DEV_HSMMC2=y
318318
CONFIG_S3C_DEV_HSMMC3=y
319319
CONFIG_S3C_DEV_I2C1=y
320-
CONFIG_S3C_DEV_I2C2=y
321320
CONFIG_S3C_DEV_I2C3=y
322321
CONFIG_S3C_DEV_I2C7=y
323322
CONFIG_S3C_DEV_USB_HSOTG=y
@@ -374,7 +373,6 @@ CONFIG_EXYNOS_DEV_SYSMMU=y
374373
CONFIG_EXYNOS4_DEV_DWMCI=y
375374
CONFIG_EXYNOS4_DEV_USB_OHCI=y
376375
CONFIG_EXYNOS4_SETUP_I2C1=y
377-
CONFIG_EXYNOS4_SETUP_I2C2=y
378376
CONFIG_EXYNOS4_SETUP_I2C3=y
379377
CONFIG_EXYNOS4_SETUP_I2C7=y
380378
CONFIG_EXYNOS4_SETUP_KEYPAD=y

arch/arm/configs/odroidx2_defconfig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Automatically generated file; DO NOT EDIT.
3-
# Linux/arm 3.8.13.13 Kernel Configuration
3+
# Linux/arm 3.8.13.14 Kernel Configuration
44
#
55
CONFIG_ARM=y
66
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -317,7 +317,6 @@ CONFIG_S3C_DEV_HSMMC1=y
317317
CONFIG_S3C_DEV_HSMMC2=y
318318
CONFIG_S3C_DEV_HSMMC3=y
319319
CONFIG_S3C_DEV_I2C1=y
320-
CONFIG_S3C_DEV_I2C2=y
321320
CONFIG_S3C_DEV_I2C3=y
322321
CONFIG_S3C_DEV_I2C7=y
323322
CONFIG_S3C_DEV_USB_HSOTG=y
@@ -374,7 +373,6 @@ CONFIG_EXYNOS_DEV_SYSMMU=y
374373
CONFIG_EXYNOS4_DEV_DWMCI=y
375374
CONFIG_EXYNOS4_DEV_USB_OHCI=y
376375
CONFIG_EXYNOS4_SETUP_I2C1=y
377-
CONFIG_EXYNOS4_SETUP_I2C2=y
378376
CONFIG_EXYNOS4_SETUP_I2C3=y
379377
CONFIG_EXYNOS4_SETUP_I2C7=y
380378
CONFIG_EXYNOS4_SETUP_KEYPAD=y
@@ -1774,7 +1772,7 @@ CONFIG_I2C_ALGOBIT=y
17741772
#
17751773
# CONFIG_I2C_CBUS_GPIO is not set
17761774
# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
1777-
# CONFIG_I2C_GPIO is not set
1775+
CONFIG_I2C_GPIO=y
17781776
# CONFIG_I2C_NOMADIK is not set
17791777
# CONFIG_I2C_OCORES is not set
17801778
# CONFIG_I2C_PCA_PLATFORM is not set
@@ -3101,6 +3099,7 @@ CONFIG_RTC_INTF_DEV=y
31013099
# CONFIG_RTC_DRV_DS1672 is not set
31023100
# CONFIG_RTC_DRV_DS3232 is not set
31033101
# CONFIG_RTC_DRV_MAX6900 is not set
3102+
# CONFIG_RTC_DRV_MAX77686 is not set
31043103
# CONFIG_RTC_DRV_RS5C372 is not set
31053104
# CONFIG_RTC_DRV_ISL1208 is not set
31063105
# CONFIG_RTC_DRV_ISL12022 is not set

arch/arm/configs/odroidx_defconfig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Automatically generated file; DO NOT EDIT.
3-
# Linux/arm 3.8.13.13 Kernel Configuration
3+
# Linux/arm 3.8.13.14 Kernel Configuration
44
#
55
CONFIG_ARM=y
66
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -317,7 +317,6 @@ CONFIG_S3C_DEV_HSMMC1=y
317317
CONFIG_S3C_DEV_HSMMC2=y
318318
CONFIG_S3C_DEV_HSMMC3=y
319319
CONFIG_S3C_DEV_I2C1=y
320-
CONFIG_S3C_DEV_I2C2=y
321320
CONFIG_S3C_DEV_I2C3=y
322321
CONFIG_S3C_DEV_I2C7=y
323322
CONFIG_S3C_DEV_USB_HSOTG=y
@@ -375,7 +374,6 @@ CONFIG_EXYNOS_DEV_SYSMMU=y
375374
CONFIG_EXYNOS4_DEV_DWMCI=y
376375
CONFIG_EXYNOS4_DEV_USB_OHCI=y
377376
CONFIG_EXYNOS4_SETUP_I2C1=y
378-
CONFIG_EXYNOS4_SETUP_I2C2=y
379377
CONFIG_EXYNOS4_SETUP_I2C3=y
380378
CONFIG_EXYNOS4_SETUP_I2C7=y
381379
CONFIG_EXYNOS4_SETUP_KEYPAD=y
@@ -1775,7 +1773,7 @@ CONFIG_I2C_ALGOBIT=y
17751773
#
17761774
# CONFIG_I2C_CBUS_GPIO is not set
17771775
# CONFIG_I2C_DESIGNWARE_PLATFORM is not set
1778-
# CONFIG_I2C_GPIO is not set
1776+
CONFIG_I2C_GPIO=y
17791777
# CONFIG_I2C_NOMADIK is not set
17801778
# CONFIG_I2C_OCORES is not set
17811779
# CONFIG_I2C_PCA_PLATFORM is not set
@@ -3102,6 +3100,7 @@ CONFIG_RTC_INTF_DEV=y
31023100
# CONFIG_RTC_DRV_DS1672 is not set
31033101
# CONFIG_RTC_DRV_DS3232 is not set
31043102
# CONFIG_RTC_DRV_MAX6900 is not set
3103+
# CONFIG_RTC_DRV_MAX77686 is not set
31053104
# CONFIG_RTC_DRV_RS5C372 is not set
31063105
# CONFIG_RTC_DRV_ISL1208 is not set
31073106
# CONFIG_RTC_DRV_ISL12022 is not set

arch/arm/mach-exynos/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,6 @@ config MACH_HKDK4412
436436
select EXYNOS_DEV_DMA
437437
select EXYNOS_DEV_DRM
438438
select EXYNOS_DEV_SYSMMU
439-
select EXYNOS4_SETUP_I2C2
440-
select S3C_DEV_I2C2
441439
select S3C_DEV_HSMMC
442440
select S3C_DEV_HSMMC1
443441
select S3C_DEV_USB_HSOTG

arch/arm/mach-exynos/mach-hkdk4412.c

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,24 @@ static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
154154
#endif
155155
};
156156

157+
/* I2C2 bus GPIO-Bitbanging */
158+
#define GPIO_I2C2_SDA EXYNOS4_GPA0(6)
159+
#define GPIO_I2C2_SCL EXYNOS4_GPA0(7)
160+
static struct i2c_gpio_platform_data i2c2_gpio_platdata = {
161+
.sda_pin = GPIO_I2C2_SDA,
162+
.scl_pin = GPIO_I2C2_SCL,
163+
.udelay = 5,
164+
.sda_is_open_drain = 0,
165+
.scl_is_open_drain = 0,
166+
.scl_is_output_only = 0
167+
};
168+
169+
static struct platform_device gpio_device_i2c2 = {
170+
.name = "i2c-gpio",
171+
.id = 2, // adepter number
172+
.dev.platform_data = &i2c2_gpio_platdata,
173+
};
174+
157175
/* Odroid-O2 schematics show the DDC of the remote HDMI device connected to
158176
* I2C2. HDMI specs state that DDC always sits at bus address 0x50. */
159177
static struct i2c_board_info hkdk4412_i2c_devs2[] __initdata = {
@@ -463,7 +481,7 @@ static struct platform_device *hkdk4412_devices[] __initdata = {
463481
&s3c_device_hsmmc2,
464482
&s3c_device_i2c0,
465483
&s3c_device_i2c1,
466-
&s3c_device_i2c2,
484+
&gpio_device_i2c2,
467485
&s3c_device_i2c3,
468486
#if defined(CONFIG_ODROID_U2)
469487
&gpio_device_i2c4,
@@ -600,7 +618,6 @@ static void __init hkdk4412_machine_init(void)
600618
i2c_register_board_info(1, hkdk4412_i2c_devs1,
601619
ARRAY_SIZE(hkdk4412_i2c_devs1));
602620

603-
s3c_i2c2_set_platdata(NULL);
604621
i2c_register_board_info(2, hkdk4412_i2c_devs2,
605622
ARRAY_SIZE(hkdk4412_i2c_devs2));
606623

drivers/cpufreq/exynos4x12-cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ static const unsigned int asv_voltage_4x12[CPUFREQ_LEVEL_END] = {
414414
925000,
415415
925000,
416416
925000,
417+
};
417418
#endif
418419
static void exynos4x12_set_clkdiv(unsigned int div_index)
419420
{

0 commit comments

Comments
 (0)