dsi.h (9d32c4989c858af12b333ae9a3c160a91ff43934) | dsi.h (ec31abf6684ebe1134eb3320c96fb92e566eff74) |
---|---|
1/* 2 * Copyright (c) 2015, The Linux Foundation. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 and 6 * only version 2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 */ 13 14#ifndef __DSI_CONNECTOR_H__ 15#define __DSI_CONNECTOR_H__ 16 | 1/* 2 * Copyright (c) 2015, The Linux Foundation. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 and 6 * only version 2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 */ 13 14#ifndef __DSI_CONNECTOR_H__ 15#define __DSI_CONNECTOR_H__ 16 |
17#include <linux/of_platform.h> |
|
17#include <linux/platform_device.h> 18 19#include "drm_crtc.h" 20#include "drm_mipi_dsi.h" 21#include "drm_panel.h" 22 23#include "msm_drv.h" 24 --- 9 unchanged lines hidden (view full) --- 34 35/* According to the current drm framework sequence, take the encoder of 36 * DSI_1 as master encoder 37 */ 38#define DSI_ENCODER_MASTER DSI_1 39#define DSI_ENCODER_SLAVE DSI_0 40 41enum msm_dsi_phy_type { | 18#include <linux/platform_device.h> 19 20#include "drm_crtc.h" 21#include "drm_mipi_dsi.h" 22#include "drm_panel.h" 23 24#include "msm_drv.h" 25 --- 9 unchanged lines hidden (view full) --- 35 36/* According to the current drm framework sequence, take the encoder of 37 * DSI_1 as master encoder 38 */ 39#define DSI_ENCODER_MASTER DSI_1 40#define DSI_ENCODER_SLAVE DSI_0 41 42enum msm_dsi_phy_type { |
42 MSM_DSI_PHY_UNKNOWN, | |
43 MSM_DSI_PHY_28NM_HPM, 44 MSM_DSI_PHY_28NM_LP, 45 MSM_DSI_PHY_MAX 46}; 47 | 43 MSM_DSI_PHY_28NM_HPM, 44 MSM_DSI_PHY_28NM_LP, 45 MSM_DSI_PHY_MAX 46}; 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 { 49 struct drm_device *dev; 50 struct platform_device *pdev; 51 52 struct drm_connector *connector; 53 struct drm_bridge *bridge; 54 55 struct mipi_dsi_host *host; 56 struct msm_dsi_phy *phy; 57 struct drm_panel *panel; 58 unsigned long panel_flags; 59 | 64struct msm_dsi { 65 struct drm_device *dev; 66 struct platform_device *pdev; 67 68 struct drm_connector *connector; 69 struct drm_bridge *bridge; 70 71 struct mipi_dsi_host *host; 72 struct msm_dsi_phy *phy; 73 struct drm_panel *panel; 74 unsigned long panel_flags; 75 |
60 enum msm_dsi_phy_type phy_type; | 76 struct device *phy_dev; |
61 bool phy_enabled; 62 63 /* the encoders we are hooked to (outside of dsi block) */ 64 struct drm_encoder *encoders[MSM_DSI_ENCODER_NUM]; 65 66 int id; 67}; 68 --- 61 unchanged lines hidden (view full) --- 130 struct msm_dsi_pll *src_pll); 131void msm_dsi_host_destroy(struct mipi_dsi_host *host); 132int msm_dsi_host_modeset_init(struct mipi_dsi_host *host, 133 struct drm_device *dev); 134int msm_dsi_host_init(struct msm_dsi *msm_dsi); 135 136/* dsi phy */ 137struct msm_dsi_phy; | 77 bool phy_enabled; 78 79 /* the encoders we are hooked to (outside of dsi block) */ 80 struct drm_encoder *encoders[MSM_DSI_ENCODER_NUM]; 81 82 int id; 83}; 84 --- 61 unchanged lines hidden (view full) --- 146 struct msm_dsi_pll *src_pll); 147void msm_dsi_host_destroy(struct mipi_dsi_host *host); 148int msm_dsi_host_modeset_init(struct mipi_dsi_host *host, 149 struct drm_device *dev); 150int msm_dsi_host_init(struct msm_dsi *msm_dsi); 151 152/* dsi phy */ 153struct msm_dsi_phy; |
138struct msm_dsi_phy *msm_dsi_phy_init(struct platform_device *pdev, 139 enum msm_dsi_phy_type type, int id); 140void msm_dsi_phy_destroy(struct msm_dsi_phy *phy); | 154void msm_dsi_phy_driver_register(void); 155void msm_dsi_phy_driver_unregister(void); |
141int msm_dsi_phy_enable(struct msm_dsi_phy *phy, bool is_dual_panel, 142 const unsigned long bit_rate, const unsigned long esc_rate); 143int msm_dsi_phy_disable(struct msm_dsi_phy *phy); 144void msm_dsi_phy_get_clk_pre_post(struct msm_dsi_phy *phy, 145 u32 *clk_pre, u32 *clk_post); 146struct msm_dsi_pll *msm_dsi_phy_get_pll(struct msm_dsi_phy *phy); 147 148#endif /* __DSI_CONNECTOR_H__ */ 149 | 156int msm_dsi_phy_enable(struct msm_dsi_phy *phy, bool is_dual_panel, 157 const unsigned long bit_rate, const unsigned long esc_rate); 158int msm_dsi_phy_disable(struct msm_dsi_phy *phy); 159void msm_dsi_phy_get_clk_pre_post(struct msm_dsi_phy *phy, 160 u32 *clk_pre, u32 *clk_post); 161struct msm_dsi_pll *msm_dsi_phy_get_pll(struct msm_dsi_phy *phy); 162 163#endif /* __DSI_CONNECTOR_H__ */ 164 |