2 * Copyright (C) 2011 Freescale Semiconductor, Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
24 enum dw_hdmi_devtype
{
30 enum dw_hdmi_phy_type
{
31 DW_HDMI_PHY_DWC_HDMI_TX_PHY
= 0x00,
32 DW_HDMI_PHY_DWC_MHL_PHY_HEAC
= 0xb2,
33 DW_HDMI_PHY_DWC_MHL_PHY
= 0xc2,
34 DW_HDMI_PHY_DWC_HDMI_3D_TX_PHY_HEAC
= 0xe2,
35 DW_HDMI_PHY_DWC_HDMI_3D_TX_PHY
= 0xf2,
36 DW_HDMI_PHY_DWC_HDMI20_TX_PHY
= 0xf3,
37 DW_HDMI_PHY_VENDOR_PHY
= 0xfe,
40 struct dw_hdmi_mpll_config
{
41 unsigned long mpixelclock
;
45 } res
[DW_HDMI_RES_MAX
];
48 struct dw_hdmi_curr_ctrl
{
49 unsigned long mpixelclock
;
50 u16 curr
[DW_HDMI_RES_MAX
];
53 struct dw_hdmi_phy_config
{
54 unsigned long mpixelclock
;
55 u16 sym_ctr
; /*clock symbol and transmitter control*/
56 u16 term
; /*transmission termination value*/
57 u16 vlev_ctr
; /* voltage level control */
60 struct dw_hdmi_plat_data
{
61 enum dw_hdmi_devtype dev_type
;
62 const struct dw_hdmi_mpll_config
*mpll_cfg
;
63 const struct dw_hdmi_curr_ctrl
*cur_ctr
;
64 const struct dw_hdmi_phy_config
*phy_config
;
65 enum drm_mode_status (*mode_valid
)(struct drm_connector
*connector
,
66 struct drm_display_mode
*mode
);
69 int dw_hdmi_probe(struct platform_device
*pdev
,
70 const struct dw_hdmi_plat_data
*plat_data
);
71 void dw_hdmi_remove(struct platform_device
*pdev
);
72 void dw_hdmi_unbind(struct device
*dev
);
73 int dw_hdmi_bind(struct platform_device
*pdev
, struct drm_encoder
*encoder
,
74 const struct dw_hdmi_plat_data
*plat_data
);
76 void dw_hdmi_set_sample_rate(struct dw_hdmi
*hdmi
, unsigned int rate
);
77 void dw_hdmi_audio_enable(struct dw_hdmi
*hdmi
);
78 void dw_hdmi_audio_disable(struct dw_hdmi
*hdmi
);
80 #endif /* __IMX_HDMI_H__ */