1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright: 2017 Cadence Design Systems, Inc.
11 #include <drm/drm_bridge.h>
12 #include <drm/drm_mipi_dsi.h>
13 #include <drm/drm_panel.h>
15 #include <linux/bits.h>
16 #include <linux/completion.h>
17 #include <linux/phy/phy.h>
22 struct cdns_dsi_output {
23 struct mipi_dsi_device *dev;
24 struct drm_panel *panel;
25 struct drm_bridge *bridge;
26 union phy_configure_opts phy_opts;
29 enum cdns_dsi_input_id {
43 struct cdns_dsi_input {
44 enum cdns_dsi_input_id id;
45 struct drm_bridge bridge;
51 * struct cdns_dsi_platform_ops - CDNS DSI Platform operations
52 * @init: Called in the CDNS DSI probe
53 * @deinit: Called in the CDNS DSI remove
54 * @enable: Called at the beginning of CDNS DSI bridge enable
55 * @disable: Called at the end of CDNS DSI bridge disable
57 struct cdns_dsi_platform_ops {
58 int (*init)(struct cdns_dsi *dsi);
59 void (*deinit)(struct cdns_dsi *dsi);
60 void (*enable)(struct cdns_dsi *dsi);
61 void (*disable)(struct cdns_dsi *dsi);
65 struct mipi_dsi_host base;
67 #ifdef CONFIG_DRM_CDNS_DSI_J721E
68 void __iomem *j721e_regs;
70 const struct cdns_dsi_platform_ops *platform_ops;
71 struct cdns_dsi_input input;
72 struct cdns_dsi_output output;
73 unsigned int direct_cmd_fifo_depth;
74 unsigned int rx_fifo_depth;
75 struct completion direct_cmd_comp;
76 struct clk *dsi_p_clk;
77 struct reset_control *dsi_p_rst;
78 struct clk *dsi_sys_clk;
79 bool link_initialized;
84 #endif /* !__CDNS_DSI_H__ */