video: rockchip: rk322x: keep vop standby before enable iommu
[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 UPHY_SEL_BIT            3
9 #define UPHY_SEL_MASK           BIT(19)
10
11 #define DPTX_HPD_SEL            (3 << 12)
12 #define DPTX_HPD_DEL            (2 << 12)
13 #define DPTX_HPD_SEL_MASK       (3 << 28)
14
15 #define DP_SEL_VOP_LIT          BIT(12)
16 #define MAX_FW_WAIT_SECS        64
17 #define EDID_BLOCK_SIZE         128
18 #define CDN_DP_FIRMWARE "cdn/dptx.bin"
19
20 struct dp_disp_info {
21         struct fb_videomode *mode;
22         int color_depth;
23         int vsync_polarity;
24         int hsync_polarity;
25         int vop_sel;
26 };
27
28 struct cdn_dp_data {
29         u8 max_phy;
30 };
31
32 struct dp_dev {
33         struct dp_disp_info disp_info;
34         struct hdmi *hdmi;
35         void *dp;
36         struct notifier_block fb_notif;
37         int lanes;
38         bool early_suspended;
39 };
40
41 int cdn_dp_fb_register(struct platform_device *pdev, void *dp);
42 void hpd_change(struct device *dev, int lanes);
43
44 #endif