aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dsi/dsi.h
diff options
context:
space:
mode:
authorHai Li <hali@codeaurora.org>2015-05-15 13:04:06 -0400
committerRob Clark <robdclark@gmail.com>2015-06-11 13:11:05 -0400
commitec31abf6684ebe1134eb3320c96fb92e566eff74 (patch)
tree14d254e9bab8f098451bb2b2a92aa8fffa196e5d /drivers/gpu/drm/msm/dsi/dsi.h
parent9d32c4989c858af12b333ae9a3c160a91ff43934 (diff)
drm/msm/dsi: Separate PHY to another platform device
There are different types of PHY from one chipset to another, while the DSI host controller is relatively consistent across platforms. Also, the PLL inside PHY is providing the source of DSI byte and pixel clocks, which are used by DSI host controller. Separated devices for clock provider and clock consumer make DSI driver better fit into common clock framework. Signed-off-by: Hai Li <hali@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi.h')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/msm/dsi/dsi.h
index 8022814f7914..92d697de4858 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.h
+++ b/drivers/gpu/drm/msm/dsi/dsi.h
@@ -14,6 +14,7 @@
14#ifndef __DSI_CONNECTOR_H__ 14#ifndef __DSI_CONNECTOR_H__
15#define __DSI_CONNECTOR_H__ 15#define __DSI_CONNECTOR_H__
16 16
17#include <linux/of_platform.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
18 19
19#include "drm_crtc.h" 20#include "drm_crtc.h"
@@ -39,12 +40,27 @@
39#define DSI_ENCODER_SLAVE DSI_0 40#define DSI_ENCODER_SLAVE DSI_0
40 41
41enum msm_dsi_phy_type { 42enum msm_dsi_phy_type {
42 MSM_DSI_PHY_UNKNOWN,
43 MSM_DSI_PHY_28NM_HPM, 43 MSM_DSI_PHY_28NM_HPM,
44 MSM_DSI_PHY_28NM_LP, 44 MSM_DSI_PHY_28NM_LP,
45 MSM_DSI_PHY_MAX 45 MSM_DSI_PHY_MAX
46}; 46};
47 47
48#define DSI_DEV_REGULATOR_MAX 8
49
50/* Regulators for DSI devices */
51struct dsi_reg_entry {
52 char name[32];
53 int min_voltage;
54 int max_voltage;
55 int enable_load;
56 int disable_load;
57};
58
59struct dsi_reg_config {
60 int num;
61 struct dsi_reg_entry regs[DSI_DEV_REGULATOR_MAX];
62};
63
48struct msm_dsi { 64struct msm_dsi {
49 struct drm_device *dev; 65 struct drm_device *dev;
50 struct platform_device *pdev; 66 struct platform_device *pdev;
@@ -57,7 +73,7 @@ struct msm_dsi {
57 struct drm_panel *panel; 73 struct drm_panel *panel;
58 unsigned long panel_flags; 74 unsigned long panel_flags;
59 75
60 enum msm_dsi_phy_type phy_type; 76 struct device *phy_dev;
61 bool phy_enabled; 77 bool phy_enabled;
62 78
63 /* the encoders we are hooked to (outside of dsi block) */ 79 /* the encoders we are hooked to (outside of dsi block) */
@@ -135,9 +151,8 @@ int msm_dsi_host_init(struct msm_dsi *msm_dsi);
135 151
136/* dsi phy */ 152/* dsi phy */
137struct msm_dsi_phy; 153struct msm_dsi_phy;
138struct msm_dsi_phy *msm_dsi_phy_init(struct platform_device *pdev, 154void msm_dsi_phy_driver_register(void);
139 enum msm_dsi_phy_type type, int id); 155void msm_dsi_phy_driver_unregister(void);
140void msm_dsi_phy_destroy(struct msm_dsi_phy *phy);
141int msm_dsi_phy_enable(struct msm_dsi_phy *phy, bool is_dual_panel, 156int msm_dsi_phy_enable(struct msm_dsi_phy *phy, bool is_dual_panel,
142 const unsigned long bit_rate, const unsigned long esc_rate); 157 const unsigned long bit_rate, const unsigned long esc_rate);
143int msm_dsi_phy_disable(struct msm_dsi_phy *phy); 158int msm_dsi_phy_disable(struct msm_dsi_phy *phy);