This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA746: HDMI: cable detection not working when interfacing with DS90UB949

Part Number: DRA746
Other Parts Discussed in Thread: DRA744, PCF8575, TPD12S016

Tool/software: Linux

Hi,

I'm working on a custom board based on DRA744.

While the HDMI part is working fine when using an external HDMI display connected with a standard cable, we're having issues with interfacing with a DS90UB949 HDMI-to-FPDlink III serializer.

The DDC link is working fine - in fact, I can upload a custom EDID on the serializer and have it read by the HDMI driver. Still, no signal is output on TMDS lines. Debugging the problem, I found that HDMI IRQs are triggered correctly when using the cable (at startup and at every connection/disconnection) but not when the processor is directly interfaced with the DS90UB949. In this last case, only one single interrupt is triggered with both HDMI_IRQ_LINK_CONNECT and HDMI_IRQ_LINK_DISCONNECT bits set - but no more.

How the cable detection is performed internally? What is the RXDET line the driver is referring to? As a workaround, can I force this detection?

Thank you

Br,

Franecsco valla

  • Hi Franecsco,

    which SDK you use?

    Regards,
    Yordan
  • Hi,
    I'm on Processor SDK Linux Automotive 3.01.00.03

    Regrads,
    Francesco
  • Hi Francesco,

    I have forwarded your question to HDMI expert to comment.

    Regards,
    Yordan
  • Hi Franseco,

    On the EVM, we rely on the output of the HPD signal coming from tpd12s016 connected to a PCF8575 GPIO expander to provide the HDMI hotplug status. We do not rely on the connect/disconnect IRQ's.

    I will check if there are patches to force HDMI output.

    regards,
    Venkat
  • Hi Venkat,
    currently, the connect/disconnect interrupt is used internally by the driver released by TI to set the power mode for the HDMI block (OFF, LDOON or TXON).

    While we can force the HPD pin to be true, the interrupt is still required for proper transition to TXON power mode.

    Thank you for your support

    Regards,
    Francesco
  • Hi Francesco,

    I have not been able to look into this issue yet. I need a couple of more days. In the meanwhile, can you please look into the below commits where HPD was added for dra7xx-evm?

    95ed943fd25e drm/omap: displays: dra7-evm-encoder-tpd12s015: Support for hot plug detection
    85507851066d drm/omap: displays: encoder-tpd12s015: Support for hot plug detection
    bda1d36775a8 drm/omap: displays: connector-hdmi: Support for hot plug detection
    e4ce34d4485c drm/omap: Support for HDMI hot plug detection

    regards,
    Venkat
  • Hi Venkat,

    I already forced HPD pin to high. Issues rises at lower level, inside hdmi.c, when dealing with RXDET internal line (of wich I have no details).

    In the mean time, I (blindly) adopted the following hack to force the RXDET line, but I'm not sure this is the right path to follow:
    paste.ubuntu.com/.../


    Can you confirm this is acceptable?

    Thank you

    Br,
    Francesco
  • Hi, ,

    The site you gave is blocked in TI office. Can you please download it and share it as a doc file, so Venkat to be able to check it?

    Thank you!
    Regards,
    Mariya
  • Hi Mariya,
    here is the patch.

    Br,
    Francesco

    0001-drm-omap-hdmi-add-Dt-switch-for-forced-cable-detection.patch.txt
    From 66d4f8b2edb1d8cf8bc2a2d1559dcd05a99b09a9 Mon Sep 17 00:00:00 2001
    From: Francesco Valla <francesco.valla@mta.it>
    Date: Mon, 24 Jul 2017 09:51:15 +0200
    Subject: [PATCH] drm: omap: hdmi: add DT switch for forced cable detection
    
    Signed-off-by: Francesco Valla <francesco.valla@mta.it>
    ---
     drivers/gpu/drm/omapdrm/dss/hdmi.h  |  2 ++
     drivers/gpu/drm/omapdrm/dss/hdmi5.c | 10 +++++++++-
     2 files changed, 11 insertions(+), 1 deletion(-)
    
    diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi.h b/drivers/gpu/drm/omapdrm/dss/hdmi.h
    index 63e7115..0160ca4 100644
    --- a/drivers/gpu/drm/omapdrm/dss/hdmi.h
    +++ b/drivers/gpu/drm/omapdrm/dss/hdmi.h
    @@ -365,6 +365,8 @@ struct omap_hdmi {
     	spinlock_t audio_playing_lock;
     	bool audio_playing;
     	bool display_enabled;
    +
    +	bool forced_detection;
     };
     
     #endif
    diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
    index 5493022..afa28cd 100644
    --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
    +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
    @@ -107,7 +107,11 @@ static irqreturn_t hdmi_irq_handler(int irq, void *data)
     
     		hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_LDOON);
     
    -		REG_FLD_MOD(hdmi.phy.base, HDMI_TXPHY_PAD_CFG_CTRL, 0, 15, 15);
    +		/* If HDMI detection has to be forced, force the RXDET line to 1 */
    +		if (hdmi.forced_detection)
    +			REG_FLD_MOD(hdmi.phy.base, HDMI_TXPHY_PAD_CFG_CTRL, 1, 14, 7);
    +		else
    +			REG_FLD_MOD(hdmi.phy.base, HDMI_TXPHY_PAD_CFG_CTRL, 0, 15, 15);
     
     	} else if (irqstatus & HDMI_IRQ_LINK_CONNECT) {
     		hdmi_wp_set_phy_pwr(wp, HDMI_PHYPWRCMD_TXON);
    @@ -581,6 +585,10 @@ static int hdmi_probe_of(struct platform_device *pdev)
     	struct device_node *ep;
     	int r;
     
    +	hdmi.forced_detection = of_property_read_bool(node, "forced-detection");
    +	if (hdmi.forced_detection)
    +		dev_info(&pdev->dev, "force cable detection.");
    +
     	ep = omapdss_of_get_first_endpoint(node);
     	if (!ep)
     		return 0;
    -- 
    2.7.4
    

  • Francesco,

    The patch seems to be OK. I found an old patch which seems to be doing the same thing but also sets the RXDET_LINE value. I was not able to test this yet.

    + v = hdmi_read_reg(phy->base, HDMI_TXPHY_PAD_CFG_CTRL);
    + v = FLD_MOD(v, 1, 15, 15); /* FORCE_RXDET_HIGH */
    + v = FLD_MOD(v, 0xff, 14, 7); /* RXDET_LINE */
    + hdmi_write_reg(phy->base, HDMI_TXPHY_PAD_CFG_CTRL, v);

    regards,
    Venkat