arm: tegra: Cardhu: add support for CEC
Ankit Pashiney [Wed, 20 Jun 2012 03:08:50 +0000 (20:08 -0700)]
Added board and pinmux support for CEC

bug 894195

Change-Id: I858908bf090dae3e2043637ed22c53db4892c336
Signed-off-by: Ankit Pashiney <apashiney@nvidia.com>
Reviewed-on: http://git-master/r/105519
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/mach-tegra/board-cardhu-pinmux.c
arch/arm/mach-tegra/board-cardhu.c

index a965ff3..7b98af0 100644 (file)
@@ -136,6 +136,17 @@ static __initdata struct tegra_drive_pingroup_config cardhu_drive_pinmux[] = {
                .od             = TEGRA_PIN_OD_DEFAULT,         \
                .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
        }
+#define CEC_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \
+       {                                                       \
+               .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
+                       .func           = TEGRA_MUX_##_mux,             \
+                       .pupd           = TEGRA_PUPD_##_pupd,           \
+                       .tristate       = TEGRA_TRI_##_tri,             \
+                       .io             = TEGRA_PIN_##_io,              \
+                       .lock           = TEGRA_PIN_LOCK_##_lock,       \
+                       .od             = TEGRA_PIN_OD_##_od,           \
+                       .ioreset        = TEGRA_PIN_IO_RESET_DEFAULT,   \
+       }
 
 static __initdata struct tegra_pingroup_config cardhu_pinmux_common[] = {
        /* SDMMC1 pinmux */
@@ -189,6 +200,9 @@ static __initdata struct tegra_pingroup_config cardhu_pinmux_common[] = {
        I2C_PINMUX(PWR_I2C_SCL,         I2CPWR,         NORMAL, NORMAL, INPUT,  DISABLE,        ENABLE),
        I2C_PINMUX(PWR_I2C_SDA,         I2CPWR,         NORMAL, NORMAL, INPUT,  DISABLE,        ENABLE),
 
+       /* HDMI-CEC  pinmux */
+       CEC_PINMUX(HDMI_CEC,    CEC,    NORMAL,        NORMAL, INPUT,  DISABLE,        ENABLE),
+
        DEFAULT_PINMUX(ULPI_DATA0,      UARTA,           NORMAL,    NORMAL,     OUTPUT),
        DEFAULT_PINMUX(ULPI_DATA1,      UARTA,           NORMAL,    NORMAL,     INPUT),
        DEFAULT_PINMUX(ULPI_DATA2,      UARTA,           NORMAL,    NORMAL,     INPUT),
index 4e33be3..9d17460 100644 (file)
@@ -786,6 +786,7 @@ static struct platform_device *cardhu_devices[] __initdata = {
        &cardhu_audio_max98095_device,
        &cardhu_audio_aic326x_device,
        &tegra_hda_device,
+       &tegra_cec_device,
 #if defined(CONFIG_CRYPTO_DEV_TEGRA_AES)
        &tegra_aes_device,
 #endif