HDMI without Hot Plug Detection

Hi,

with the patch from
https://www.toradex.com/community/questions/23004/hdmi-output-without-ddc-edid.html
we can use our projector. But it has some troubles with Hot plug detection. By setting the Hot Plug detection pin manual to 5V everything works fine.
Is it possible to set this Hot Plug pin to high by SW change in the device tree.
If found

    			/* Apalis HDMI1_HPD */
    			hdmi_int_pn7 {
    				nvidia,pins = "hdmi_int_pn7";
    				nvidia,function = "rsvd1";
    				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
    				nvidia,tristate = <TEGRA_PIN_ENABLE>;
    				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
    				nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
    			};

in tegra124-apalis-pinmux.dtsi. But I am not sure how to change the settings to get the expected results.
Or do you have any other idea? Thanks.

The SW should think, that the projector is connected, even when it is not - e.g. at startup.

If on your hardware the hot plug detect pin is indeed left floating I guess you could just change it from being a pull down to a pull up e.g.

nvidia,pull = <TEGRA_PIN_PULL_UP>;

I tried it, but I get following output if I boot with no HDMI connection and reconnect HDMI after startup:

tegra_dc_hdmi_irq: start
tegra_dc_hdmi_irq: end
hdmi_state_machine_worker ...

So obviously the connection of the HDMI cable results in an interrupt that triggers HDMI to work. But I would like to see HDMI working without irq.
In the final solution HDMI should work without DDC, Hot Plug, CEC Pins connected.

I guess your hardware may still pull it down more strongly than the TK1 SoC internal pull-up. This would definitely e.g. be the case on Ixora with the Nexperia IP4791CZ12 stating “Hot plug detect module with pull-down resistor”. Actually, according to data sheets both would have a nominal pull resistance of 100 kOhm so connecting them together in a pull-up/pull-down fashion is a bad idea. However, if you left that pin unconnected I would assume the weak internal pull-up should suffice.

Thanks for the info. That helps. I guess we need to implement a hardware solution.

You are welcome. Thanks for the update.

As the simple setting of the Hot Plug detection pin to “Pull up” does not work, because the HDMI level shifter on the Ixora board pulls the signal to down, I had another idea.

If we set up in the device tree another pin as Hot Plug detection pin, that is not connected to the HDMI level shifter on the Ixora board and configure the pin to “Pull up”, it should work as expected.

What do you think? Is there a free pin that we can use? Thanks.

As the simple setting of the Hot Plug detection pin to “Pull up” does not work, because the HDMI level shifter on the Ixora board pulls the signal to down, I had another idea.

If we set up in the device tree another pin as Hot Plug detection pin, that is not connected to the HDMI level shifter on the Ixora board and configure the pin to “Pull up”, it should work as expected.

What do you think?

Yes, I guess that may work.

Is there a free pin that we can use?

Yes, you could use GPIO_PV1 which is a not connect on the Apalis TK1 module. Alternatively, you could use a pin which is a not connect just on the Ixora carrier board. On Ixora V1.1A this would e.g. be SD1_CLK on the MXM3 pin 184 being SDMMC3_CLK aka GPIO3_PA.06 on Apalis TK1.

Thanks.

You are very welcome.

Unfortunately I am not so familiar with pin muxing in device tree.

I tried in tegra124-apalis-pinmux-dtsi:

    /* Apalis HDMI1_HPD */
    hdmi_int_pn7 {
    	nvidia,pins = "pv1";
    	nvidia,function = "rsvd1";
    	nvidia,pull = <TEGRA_PIN_PULL_UP>;
    	nvidia,tristate = <TEGRA_PIN_ENABLE>;
    	nvidia,enable-input = <TEGRA_PIN_ENABLE>;
    	nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
    };

But the hot plug detection works as normal. I would expect no hot plug detection comments in console (while unplug and plug the HDMI cable) or no monitor output. Something is not right, but what?

Besides the pin muxing you would also need to tell the HDMI state machine which GPIO you want to use as hot-plug detect.

I changed the accused line to

nvidia,hpd-gpio = <&gpio TEGRA_GPIO(V, 1) 1>;

and now it works as expected. Thank you. Great support.

You are very welcome.