2 * Copyright (C) STMicroelectronics SA 2014
3 * Author: Vincent Abriou <vincent.abriou@st.com> for STMicroelectronics.
4 * License terms: GNU General Public License (GPL), version 2
10 #include <linux/platform_device.h>
14 #define HDMI_STA 0x0010
15 #define HDMI_STA_DLL_LCK BIT(5)
20 bool (*start
)(struct sti_hdmi
*hdmi
);
21 void (*stop
)(struct sti_hdmi
*hdmi
);
28 * @drm_dev: pointer to drm device
29 * @mode: current display mode selected
30 * @regs: hdmi register
31 * @syscfg: syscfg register for pll rejection configuration
32 * @clk_pix: hdmi pixel clock
33 * @clk_tmds: hdmi tmds clock
34 * @clk_phy: hdmi phy clock
35 * @clk_audio: hdmi audio clock
36 * @irq: hdmi interrupt number
37 * @irq_status: interrupt status register
38 * @phy_ops: phy start/stop operations
39 * @enabled: true if hdmi is enabled else false
40 * @hpd_gpio: hdmi hot plug detect gpio number
41 * @hpd: hot plug detect status
42 * @wait_event: wait event
43 * @event_received: wait event status
44 * @reset: reset control of the hdmi phy
48 struct drm_device
*drm_dev
;
49 struct drm_display_mode mode
;
55 struct clk
*clk_audio
;
58 struct hdmi_phy_ops
*phy_ops
;
62 wait_queue_head_t wait_event
;
64 struct reset_control
*reset
;
67 u32
hdmi_read(struct sti_hdmi
*hdmi
, int offset
);
68 void hdmi_write(struct sti_hdmi
*hdmi
, u32 val
, int offset
);
71 * hdmi phy config structure
73 * A pointer to an array of these structures is passed to a TMDS (HDMI) output
74 * via the control interface to provide board and SoC specific
75 * configurations of the HDMI PHY. Each entry in the array specifies a hardware
76 * specific configuration for a given TMDS clock frequency range.
78 * @min_tmds_freq: Lower bound of TMDS clock frequency this entry applies to
79 * @max_tmds_freq: Upper bound of TMDS clock frequency this entry applies to
80 * @config: SoC specific register configuration
82 struct hdmi_phy_config
{