hdmi_phy_8x74.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (C) 2013 Red Hat
  3. * Author: Rob Clark <robdclark@gmail.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License version 2 as published by
  7. * the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include "hdmi.h"
  18. static void hdmi_phy_8x74_powerup(struct hdmi_phy *phy,
  19. unsigned long int pixclock)
  20. {
  21. hdmi_phy_write(phy, REG_HDMI_8x74_ANA_CFG0, 0x1b);
  22. hdmi_phy_write(phy, REG_HDMI_8x74_ANA_CFG1, 0xf2);
  23. hdmi_phy_write(phy, REG_HDMI_8x74_BIST_CFG0, 0x0);
  24. hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN0, 0x0);
  25. hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN1, 0x0);
  26. hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN2, 0x0);
  27. hdmi_phy_write(phy, REG_HDMI_8x74_BIST_PATN3, 0x0);
  28. hdmi_phy_write(phy, REG_HDMI_8x74_PD_CTRL1, 0x20);
  29. }
  30. static void hdmi_phy_8x74_powerdown(struct hdmi_phy *phy)
  31. {
  32. hdmi_phy_write(phy, REG_HDMI_8x74_PD_CTRL0, 0x7f);
  33. }
  34. static const char * const hdmi_phy_8x74_reg_names[] = {
  35. "core-vdda",
  36. "vddio",
  37. };
  38. static const char * const hdmi_phy_8x74_clk_names[] = {
  39. "iface_clk",
  40. "alt_iface_clk"
  41. };
  42. const struct hdmi_phy_cfg msm_hdmi_phy_8x74_cfg = {
  43. .type = MSM_HDMI_PHY_8x74,
  44. .powerup = hdmi_phy_8x74_powerup,
  45. .powerdown = hdmi_phy_8x74_powerdown,
  46. .reg_names = hdmi_phy_8x74_reg_names,
  47. .num_regs = ARRAY_SIZE(hdmi_phy_8x74_reg_names),
  48. .clk_names = hdmi_phy_8x74_clk_names,
  49. .num_clks = ARRAY_SIZE(hdmi_phy_8x74_clk_names),
  50. };