hdmi_phy_8960.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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_8960_powerup(struct hdmi_phy *phy,
  19. unsigned long int pixclock)
  20. {
  21. DBG("pixclock: %lu", pixclock);
  22. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG2, 0x00);
  23. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG0, 0x1b);
  24. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG1, 0xf2);
  25. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG4, 0x00);
  26. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG5, 0x00);
  27. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG6, 0x00);
  28. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG7, 0x00);
  29. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG8, 0x00);
  30. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG9, 0x00);
  31. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG10, 0x00);
  32. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG11, 0x00);
  33. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG3, 0x20);
  34. }
  35. static void hdmi_phy_8960_powerdown(struct hdmi_phy *phy)
  36. {
  37. DBG("");
  38. hdmi_phy_write(phy, REG_HDMI_8960_PHY_REG2, 0x7f);
  39. }
  40. static const char * const hdmi_phy_8960_reg_names[] = {
  41. "core-vdda",
  42. };
  43. static const char * const hdmi_phy_8960_clk_names[] = {
  44. "slave_iface",
  45. };
  46. const struct hdmi_phy_cfg msm_hdmi_phy_8960_cfg = {
  47. .type = MSM_HDMI_PHY_8960,
  48. .powerup = hdmi_phy_8960_powerup,
  49. .powerdown = hdmi_phy_8960_powerdown,
  50. .reg_names = hdmi_phy_8960_reg_names,
  51. .num_regs = ARRAY_SIZE(hdmi_phy_8960_reg_names),
  52. .clk_names = hdmi_phy_8960_clk_names,
  53. .num_clks = ARRAY_SIZE(hdmi_phy_8960_clk_names),
  54. };