phy-qcom-ufs.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2013-2015, Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef PHY_QCOM_UFS_H_
  15. #define PHY_QCOM_UFS_H_
  16. #include "phy.h"
  17. /**
  18. * ufs_qcom_phy_enable_ref_clk() - Enable the phy
  19. * ref clock.
  20. * @phy: reference to a generic phy
  21. *
  22. * returns 0 for success, and non-zero for error.
  23. */
  24. int ufs_qcom_phy_enable_ref_clk(struct phy *phy);
  25. /**
  26. * ufs_qcom_phy_disable_ref_clk() - Disable the phy
  27. * ref clock.
  28. * @phy: reference to a generic phy.
  29. */
  30. void ufs_qcom_phy_disable_ref_clk(struct phy *phy);
  31. /**
  32. * ufs_qcom_phy_enable_dev_ref_clk() - Enable the device
  33. * ref clock.
  34. * @phy: reference to a generic phy.
  35. */
  36. void ufs_qcom_phy_enable_dev_ref_clk(struct phy *phy);
  37. /**
  38. * ufs_qcom_phy_disable_dev_ref_clk() - Disable the device
  39. * ref clock.
  40. * @phy: reference to a generic phy.
  41. */
  42. void ufs_qcom_phy_disable_dev_ref_clk(struct phy *phy);
  43. int ufs_qcom_phy_enable_iface_clk(struct phy *phy);
  44. void ufs_qcom_phy_disable_iface_clk(struct phy *phy);
  45. int ufs_qcom_phy_start_serdes(struct phy *phy);
  46. int ufs_qcom_phy_set_tx_lane_enable(struct phy *phy, u32 tx_lanes);
  47. int ufs_qcom_phy_calibrate_phy(struct phy *phy, bool is_rate_B);
  48. int ufs_qcom_phy_is_pcs_ready(struct phy *phy);
  49. void ufs_qcom_phy_save_controller_version(struct phy *phy,
  50. u8 major, u16 minor, u16 step);
  51. #endif /* PHY_QCOM_UFS_H_ */