1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
6 #ifndef __INTEL_DPIO_PHY_H__
7 #define __INTEL_DPIO_PHY_H__
9 #include <linux/types.h>
14 struct drm_i915_private
;
15 struct intel_crtc_state
;
18 void bxt_port_to_phy_channel(struct drm_i915_private
*dev_priv
, enum port port
,
19 enum dpio_phy
*phy
, enum dpio_channel
*ch
);
20 void bxt_ddi_phy_set_signal_level(struct drm_i915_private
*dev_priv
,
21 enum port port
, u32 margin
, u32 scale
,
22 u32 enable
, u32 deemphasis
);
23 void bxt_ddi_phy_init(struct drm_i915_private
*dev_priv
, enum dpio_phy phy
);
24 void bxt_ddi_phy_uninit(struct drm_i915_private
*dev_priv
, enum dpio_phy phy
);
25 bool bxt_ddi_phy_is_enabled(struct drm_i915_private
*dev_priv
,
27 bool bxt_ddi_phy_verify_state(struct drm_i915_private
*dev_priv
,
29 u8
bxt_ddi_phy_calc_lane_lat_optim_mask(u8 lane_count
);
30 void bxt_ddi_phy_set_lane_optim_mask(struct intel_encoder
*encoder
,
31 u8 lane_lat_optim_mask
);
32 u8
bxt_ddi_phy_get_lane_lat_optim_mask(struct intel_encoder
*encoder
);
34 void chv_set_phy_signal_level(struct intel_encoder
*encoder
,
35 const struct intel_crtc_state
*crtc_state
,
36 u32 deemph_reg_value
, u32 margin_reg_value
,
37 bool uniq_trans_scale
);
38 void chv_data_lane_soft_reset(struct intel_encoder
*encoder
,
39 const struct intel_crtc_state
*crtc_state
,
41 void chv_phy_pre_pll_enable(struct intel_encoder
*encoder
,
42 const struct intel_crtc_state
*crtc_state
);
43 void chv_phy_pre_encoder_enable(struct intel_encoder
*encoder
,
44 const struct intel_crtc_state
*crtc_state
);
45 void chv_phy_release_cl2_override(struct intel_encoder
*encoder
);
46 void chv_phy_post_pll_disable(struct intel_encoder
*encoder
,
47 const struct intel_crtc_state
*old_crtc_state
);
49 void vlv_set_phy_signal_level(struct intel_encoder
*encoder
,
50 const struct intel_crtc_state
*crtc_state
,
51 u32 demph_reg_value
, u32 preemph_reg_value
,
52 u32 uniqtranscale_reg_value
, u32 tx3_demph
);
53 void vlv_phy_pre_pll_enable(struct intel_encoder
*encoder
,
54 const struct intel_crtc_state
*crtc_state
);
55 void vlv_phy_pre_encoder_enable(struct intel_encoder
*encoder
,
56 const struct intel_crtc_state
*crtc_state
);
57 void vlv_phy_reset_lanes(struct intel_encoder
*encoder
,
58 const struct intel_crtc_state
*old_crtc_state
);
60 #endif /* __INTEL_DPIO_PHY_H__ */