From a5c5ae1cfe2d2eb465944c2e2432a5d0c1fbeed6 Mon Sep 17 00:00:00 2001 From: Sandor Yu Date: Tue, 26 Jun 2012 17:42:55 +0800 Subject: [PATCH] ENGR00213014-2 MX6x Sabreauto: IOMUX setting for HDMI HDCP function Added enable_pins/disable_pins functions for Mx6q/dl sabreauto HDMI. Added HDMI DDC IOMUX setting. Signed-off-by: Sandor Yu --- arch/arm/mach-mx6/board-mx6q_sabreauto.c | 26 +++++++++++++++++++++ arch/arm/mach-mx6/board-mx6q_sabreauto.h | 10 ++++++++ arch/arm/mach-mx6/board-mx6solo_sabreauto.h | 10 ++++++++ 3 files changed, 46 insertions(+) diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.c b/arch/arm/mach-mx6/board-mx6q_sabreauto.c index 85ee8ac963b0..f49e99a17c5b 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabreauto.c +++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.c @@ -912,8 +912,34 @@ static void hdmi_init(int ipu_id, int disp_id) mxc_iomux_set_gpr_register(3, 2, 2, hdmi_mux_setting); } +/* On mx6x sabreauto board i2c2 iomux with hdmi ddc, + * the pins default work at i2c2 function, + when hdcp enable, the pins should work at ddc function */ + +static void hdmi_enable_ddc_pin(void) +{ + if (cpu_is_mx6dl()) + mxc_iomux_v3_setup_multiple_pads(mx6dl_sabreauto_hdmi_ddc_pads, + ARRAY_SIZE(mx6dl_sabreauto_hdmi_ddc_pads)); + else + mxc_iomux_v3_setup_multiple_pads(mx6q_sabreauto_hdmi_ddc_pads, + ARRAY_SIZE(mx6q_sabreauto_hdmi_ddc_pads)); +} + +static void hdmi_disable_ddc_pin(void) +{ + if (cpu_is_mx6dl()) + mxc_iomux_v3_setup_multiple_pads(mx6dl_sabreauto_i2c2_pads, + ARRAY_SIZE(mx6dl_sabreauto_i2c2_pads)); + else + mxc_iomux_v3_setup_multiple_pads(mx6q_sabreauto_i2c2_pads, + ARRAY_SIZE(mx6q_sabreauto_i2c2_pads)); +} + static struct fsl_mxc_hdmi_platform_data hdmi_data = { .init = hdmi_init, + .enable_pins = hdmi_enable_ddc_pin, + .disable_pins = hdmi_disable_ddc_pin, }; static struct fsl_mxc_hdmi_core_platform_data hdmi_core_data = { diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.h b/arch/arm/mach-mx6/board-mx6q_sabreauto.h index f3763a0bf38b..e7f66e16516a 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabreauto.h +++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.h @@ -359,3 +359,13 @@ static iomux_v3_cfg_t mx6q_weimnor_pads[] __initdata = { MX6Q_PAD_EIM_DA1__WEIM_WEIM_DA_A_1, MX6Q_PAD_EIM_DA0__WEIM_WEIM_DA_A_0, }; + +static iomux_v3_cfg_t mx6q_sabreauto_hdmi_ddc_pads[] = { + MX6Q_PAD_KEY_COL3__HDMI_TX_DDC_SCL, /* HDMI DDC SCL */ + MX6Q_PAD_KEY_ROW3__HDMI_TX_DDC_SDA, /* HDMI DDC SDA */ +}; + +static iomux_v3_cfg_t mx6q_sabreauto_i2c2_pads[] = { + MX6Q_PAD_KEY_COL3__I2C2_SCL, /* I2C2 SCL */ + MX6Q_PAD_KEY_ROW3__I2C2_SDA, /* I2C2 SDA */ +}; diff --git a/arch/arm/mach-mx6/board-mx6solo_sabreauto.h b/arch/arm/mach-mx6/board-mx6solo_sabreauto.h index 3b2e247b3735..f51925bee9fa 100644 --- a/arch/arm/mach-mx6/board-mx6solo_sabreauto.h +++ b/arch/arm/mach-mx6/board-mx6solo_sabreauto.h @@ -359,3 +359,13 @@ static iomux_v3_cfg_t mx6dl_weimnor_pads[] __initdata = { MX6DL_PAD_EIM_DA1__WEIM_WEIM_DA_A_1, MX6DL_PAD_EIM_DA0__WEIM_WEIM_DA_A_0, }; + +static iomux_v3_cfg_t mx6dl_sabreauto_hdmi_ddc_pads[] = { + MX6DL_PAD_KEY_COL3__HDMI_TX_DDC_SCL, /* HDMI DDC SCL */ + MX6DL_PAD_KEY_ROW3__HDMI_TX_DDC_SDA, /* HDMI DDC SDA */ +}; + +static iomux_v3_cfg_t mx6dl_sabreauto_i2c2_pads[] = { + MX6DL_PAD_KEY_COL3__I2C2_SCL, /* I2C2 SCL */ + MX6DL_PAD_KEY_ROW3__I2C2_SDA, /* I2C2 SDA */ +}; -- 2.39.5