1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Copyright (C) Rockchip Electronics Co., Ltd.
10 #include <drm/display/drm_dp_helper.h>
11 #include <drm/drm_panel.h>
12 #include <drm/drm_probe_helper.h>
13 #include <sound/hdmi-codec.h>
15 #include "rockchip_drm_drv.h"
26 enum audio_format format;
32 enum vic_pxl_encoding_format {
45 enum vic_pxl_encoding_format color_fmt;
48 struct cdn_firmware_header {
49 u32 size_bytes; /* size of the entire header+image(s) in bytes */
50 u32 header_size; /* size of just the header in bytes */
51 u32 iram_size; /* size of iram */
52 u32 dram_size; /* size of dram */
56 struct cdn_dp_device *dp;
57 struct notifier_block event_nb;
58 struct extcon_dev *extcon;
65 struct cdn_dp_device {
67 struct drm_device *drm_dev;
68 struct drm_connector connector;
69 struct rockchip_encoder encoder;
70 struct drm_display_mode mode;
71 struct platform_device *audio_pdev;
72 struct work_struct event_work;
73 const struct drm_edid *drm_edid;
80 const struct firmware *fw; /* cdn dp firmware */
81 unsigned int fw_version; /* cdn fw version */
88 struct clk *spdif_clk;
90 struct reset_control *spdif_rst;
91 struct reset_control *dptx_rst;
92 struct reset_control *apb_rst;
93 struct reset_control *core_rst;
94 struct audio_info audio_info;
95 struct video_info video_info;
96 struct cdn_dp_port *port[MAX_PHY];
99 unsigned int max_rate;
103 u8 dpcd[DP_RECEIVER_CAP_SIZE];
106 hdmi_codec_plugged_cb plugged_cb;
107 struct device *codec_dev;
109 #endif /* _CDN_DP_CORE_H */