• Tomi Valkeinen's avatar
    OMAPDSS: HDMI: clean up PHY power handling · ddb1d5ca
    Tomi Valkeinen authored
    The TRM tells to set PHY to TXON only after getting LINK_CONNECT, and to
    set PHY to OFF or LDOON after getting LINK_DISCONNECT, in order to avoid
    damage to the PHY.
    
    We don't currently do it quite like that. Instead of using the HDMI
    interrupts, we use HPD signal. This works, but is not actually quite
    correct, as HPD comes at a different time than LINK_CONNECT and
    LINK_DISCONNECT interrupts. Also, the HPD GPIO is a property of the TPD
    level shifter, not HDMI IP, so handling the GPIO in the HDMI driver is
    wrong.
    
    This patch implements the PHY power handling correctly, using the
    interrupts.
    
    There is a corner case that causes some additional difficulties: we may
    get both LINK_CONNECT and LINK_DISCONNECT interrupts at the same time.
    This is handled in the code by retrying: turning off the PHY, clearing
    the interrupt status, and re-enabling the PHY. This causes a new
    LINK_CONNECT interrupt to happen if a cable is connected.
    Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    ddb1d5ca
ti_hdmi_4xxx_ip.h 12.2 KB