msm: Add MIPI DSI novatek panel for 8960 target.
Add code to support DSI novatek panel for 8960 target. Add
support to provide DSI PHY settings from the board file.
Add code to provide FPGA access interface information from
the booard file.
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index b5aa72a..863f1ff 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -1597,6 +1597,33 @@
.gpio_num = dsi2lvds_gpio,
};
+static struct mipi_dsi_phy_ctrl dsi_novatek_cmd_mode_phy_db = {
+
+/* DSI_BIT_CLK at 500MHz, 2 lane, RGB888 */
+ {0x0F, 0x0a, 0x04, 0x00, 0x20}, /* regulator */
+ /* timing */
+ {0xab, 0x8a, 0x18, 0x00, 0x92, 0x97, 0x1b, 0x8c,
+ 0x0c, 0x03, 0x04, 0xa0},
+ {0x5f, 0x00, 0x00, 0x10}, /* phy ctrl */
+ {0xff, 0x00, 0x06, 0x00}, /* strength */
+ /* pll control */
+ {0x40, 0xf9, 0x30, 0xda, 0x00, 0x40, 0x03, 0x62,
+ 0x40, 0x07, 0x03,
+ 0x00, 0x1a, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x01},
+};
+
+static struct mipi_dsi_panel_platform_data novatek_pdata = {
+ .phy_ctrl_settings = &dsi_novatek_cmd_mode_phy_db,
+};
+
+static struct platform_device mipi_dsi_novatek_panel_device = {
+ .name = "mipi_novatek",
+ .id = 0,
+ .dev = {
+ .platform_data = &novatek_pdata,
+ }
+};
+
static struct platform_device mipi_dsi2lvds_bridge_device = {
.name = "mipi_tc358764",
.id = 0,
@@ -3280,6 +3307,7 @@
&msm_kgsl_2d0,
&msm_kgsl_2d1,
#endif
+ &mipi_dsi_novatek_panel_device,
#ifdef CONFIG_MSM_GEMINI
&msm8960_gemini_device,
#endif
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 2923b99..29c6ceb 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -3001,6 +3001,7 @@
static struct mipi_dsi_panel_platform_data novatek_pdata = {
.fpga_3d_config_addr = FPGA_3D_GPIO_CONFIG_ADDR,
+ .fpga_ctrl_mode = FPGA_EBI2_INTF,
};
static struct platform_device mipi_dsi_novatek_panel_device = {
diff --git a/arch/arm/mach-msm/include/mach/board.h b/arch/arm/mach-msm/include/mach/board.h
index 6063a41..3f6afa5 100644
--- a/arch/arm/mach-msm/include/mach/board.h
+++ b/arch/arm/mach-msm/include/mach/board.h
@@ -341,9 +341,25 @@
int target_type;
};
+enum mipi_dsi_3d_ctrl {
+ FPGA_EBI2_INTF,
+ FPGA_SPI_INTF,
+};
+
+/* DSI PHY configuration */
+struct mipi_dsi_phy_ctrl {
+ uint32_t regulator[5];
+ uint32_t timing[12];
+ uint32_t ctrl[4];
+ uint32_t strength[4];
+ uint32_t pll[21];
+};
+
struct mipi_dsi_panel_platform_data {
+ int fpga_ctrl_mode;
int fpga_3d_config_addr;
int *gpio;
+ struct mipi_dsi_phy_ctrl *phy_ctrl_settings;
};
struct msm_fb_platform_data {