The HDMI PHY depends on the HVCC supply being enabled. So far we have
relied on it being enabled by an earlier firmware stage (SPL or TF-A).
Attempt to enable the regulator here, so we can remove that dependency.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
#include <asm/arch/lcdc.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <power/regulator.h>
struct sunxi_dw_hdmi_priv {
struct dw_hdmi hdmi;
struct reset_ctl_bulk resets;
struct clk_bulk clocks;
+ struct udevice *hvcc;
};
struct sunxi_hdmi_phy {
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
int ret;
+ if (priv->hvcc)
+ regulator_set_enable(priv->hvcc, true);
+
/* Set pll3 to 297 MHz */
clock_set_pll3(297000000);
if (ret)
return ret;
+ ret = device_get_supply_regulator(dev, "hvcc-supply", &priv->hvcc);
+ if (ret)
+ priv->hvcc = NULL;
+
return 0;
}