clk: rockchip: support setting ddr clock via SCPI APIs
[firefly-linux-kernel-4.4.55.git] / drivers / video / rockchip / dp / rockchip_dp_core.h
1 #ifndef __ROCKCHIP_DP_CORE_H__
2 #define __ROCKCHIP_DP_CORE_H__
3
4 /* dp grf register offset */
5 #define GRF_SOC_CON9            0x6224
6 #define GRF_SOC_CON26           0x6268
7
8 #define DPTX_HPD_SEL            (3 << 12)
9 #define DPTX_HPD_DEL            (2 << 12)
10 #define DPTX_HPD_SEL_MASK       (3 << 28)
11
12 #define DP_SEL_VOP_LIT          BIT(12)
13 #define MAX_FW_WAIT_SECS        64
14 #define EDID_BLOCK_SIZE         128
15 #define CDN_DP_FIRMWARE "cdn/dptx.bin"
16
17 struct dp_disp_info {
18         struct fb_videomode *mode;
19         int color_depth;
20         int vsync_polarity;
21         int hsync_polarity;
22         int vop_sel;
23 };
24
25 struct cdn_dp_data {
26         u8 max_phy;
27 };
28
29 struct dp_dev {
30         struct dp_disp_info disp_info;
31         struct hdmi *hdmi;
32         void *dp;
33         struct notifier_block fb_notif;
34         int lanes;
35         bool early_suspended;
36 };
37
38 int cdn_dp_fb_register(struct platform_device *pdev, void *dp);
39 void hpd_change(struct device *dev, int lanes);
40
41 #endif