drm/sun4i: Fix H6 HDMI PHY configuration
authorJernej Skrabec <jernej.skrabec@siol.net>
Tue, 9 Feb 2021 17:58:59 +0000 (18:58 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 10 Feb 2021 10:20:13 +0000 (11:20 +0100)
commit6a155216c48f2f65c8dcb02c4c27549c170d24a9
treeef4522891f2bf21d851436266254ca538a3c7004
parent36b53581fe0dc2e25b67de4e58920307f22d195a
drm/sun4i: Fix H6 HDMI PHY configuration

As it turns out, vendor HDMI PHY driver for H6 has a pretty big table
of predefined values for various pixel clocks. However, most of them are
not useful/tested because they come from reference driver code. Vendor
PHY driver is concerned with only few of those, namely 27 MHz, 74.25
MHz, 148.5 MHz, 297 MHz and 594 MHz. These are all frequencies for
standard CEA modes.

Fix sun50i_h6_cur_ctr and sun50i_h6_phy_config with the values only for
aforementioned frequencies.

Table sun50i_h6_mpll_cfg doesn't need to be changed because values are
actually frequency dependent and not so much SoC dependent. See i.MX6
documentation for explanation of those values for similar PHY.

Fixes: c71c9b2fee17 ("drm/sun4i: Add support for Synopsys HDMI PHY")
Tested-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209175900.7092-5-jernej.skrabec@siol.net
drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c