disp: msm: dsi: add new compatible strings for DSI PHY and controller

Change adds the new compatible version strings for DSI PHY and DSI CTRL
for waipio.

Change-Id: I1073034e608cace9d41cc04a9854f15f56828dfe
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This commit is contained in:
Satya Rama Aditya Pinapala
2021-01-15 17:55:27 -08:00
parent c3c683472d
commit b78db36c48
8 changed files with 37 additions and 9 deletions

View File

@@ -107,6 +107,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
case DSI_CTRL_VERSION_2_3: case DSI_CTRL_VERSION_2_3:
case DSI_CTRL_VERSION_2_4: case DSI_CTRL_VERSION_2_4:
case DSI_CTRL_VERSION_2_5: case DSI_CTRL_VERSION_2_5:
case DSI_CTRL_VERSION_2_6:
ctrl->ops.phy_reset_config = dsi_ctrl_hw_22_phy_reset_config; ctrl->ops.phy_reset_config = dsi_ctrl_hw_22_phy_reset_config;
ctrl->ops.config_clk_gating = dsi_ctrl_hw_22_config_clk_gating; ctrl->ops.config_clk_gating = dsi_ctrl_hw_22_config_clk_gating;
ctrl->ops.setup_lane_map = dsi_ctrl_hw_22_setup_lane_map; ctrl->ops.setup_lane_map = dsi_ctrl_hw_22_setup_lane_map;
@@ -179,6 +180,7 @@ int dsi_catalog_ctrl_setup(struct dsi_ctrl_hw *ctrl,
dsi_catalog_cmn_init(ctrl, version); dsi_catalog_cmn_init(ctrl, version);
break; break;
case DSI_CTRL_VERSION_2_5: case DSI_CTRL_VERSION_2_5:
case DSI_CTRL_VERSION_2_6:
ctrl->widebus_support = true; ctrl->widebus_support = true;
ctrl->phy_isolation_enabled = phy_isolation_enabled; ctrl->phy_isolation_enabled = phy_isolation_enabled;
dsi_catalog_cmn_init(ctrl, version); dsi_catalog_cmn_init(ctrl, version);
@@ -332,6 +334,7 @@ int dsi_catalog_phy_setup(struct dsi_phy_hw *phy,
case DSI_PHY_VERSION_4_0: case DSI_PHY_VERSION_4_0:
case DSI_PHY_VERSION_4_1: case DSI_PHY_VERSION_4_1:
case DSI_PHY_VERSION_4_2: case DSI_PHY_VERSION_4_2:
case DSI_PHY_VERSION_4_3:
dsi_catalog_phy_4_0_init(phy); dsi_catalog_phy_4_0_init(phy);
break; break;
case DSI_PHY_VERSION_0_0_HPM: case DSI_PHY_VERSION_0_0_HPM:

View File

@@ -55,6 +55,7 @@ static const enum dsi_ctrl_version dsi_ctrl_v2_2 = DSI_CTRL_VERSION_2_2;
static const enum dsi_ctrl_version dsi_ctrl_v2_3 = DSI_CTRL_VERSION_2_3; static const enum dsi_ctrl_version dsi_ctrl_v2_3 = DSI_CTRL_VERSION_2_3;
static const enum dsi_ctrl_version dsi_ctrl_v2_4 = DSI_CTRL_VERSION_2_4; static const enum dsi_ctrl_version dsi_ctrl_v2_4 = DSI_CTRL_VERSION_2_4;
static const enum dsi_ctrl_version dsi_ctrl_v2_5 = DSI_CTRL_VERSION_2_5; static const enum dsi_ctrl_version dsi_ctrl_v2_5 = DSI_CTRL_VERSION_2_5;
static const enum dsi_ctrl_version dsi_ctrl_v2_6 = DSI_CTRL_VERSION_2_6;
static const struct of_device_id msm_dsi_of_match[] = { static const struct of_device_id msm_dsi_of_match[] = {
{ {
@@ -81,6 +82,10 @@ static const struct of_device_id msm_dsi_of_match[] = {
.compatible = "qcom,dsi-ctrl-hw-v2.5", .compatible = "qcom,dsi-ctrl-hw-v2.5",
.data = &dsi_ctrl_v2_5, .data = &dsi_ctrl_v2_5,
}, },
{
.compatible = "qcom,dsi-ctrl-hw-v2.6",
.data = &dsi_ctrl_v2_6,
},
{} {}
}; };
@@ -643,6 +648,7 @@ static int dsi_ctrl_init_regmap(struct platform_device *pdev,
case DSI_CTRL_VERSION_2_3: case DSI_CTRL_VERSION_2_3:
case DSI_CTRL_VERSION_2_4: case DSI_CTRL_VERSION_2_4:
case DSI_CTRL_VERSION_2_5: case DSI_CTRL_VERSION_2_5:
case DSI_CTRL_VERSION_2_6:
ptr = msm_ioremap(pdev, "disp_cc_base", ctrl->name); ptr = msm_ioremap(pdev, "disp_cc_base", ctrl->name);
if (IS_ERR(ptr)) { if (IS_ERR(ptr)) {
DSI_CTRL_ERR(ctrl, "disp_cc base address not found for\n"); DSI_CTRL_ERR(ctrl, "disp_cc base address not found for\n");

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
*/ */
#ifndef _DSI_CTRL_HW_H_ #ifndef _DSI_CTRL_HW_H_
@@ -38,6 +38,7 @@
* @DSI_CTRL_VERSION_2_3: DSI host v2.3 controller * @DSI_CTRL_VERSION_2_3: DSI host v2.3 controller
* @DSI_CTRL_VERSION_2_4: DSI host v2.4 controller * @DSI_CTRL_VERSION_2_4: DSI host v2.4 controller
* @DSI_CTRL_VERSION_2_5: DSI host v2.5 controller * @DSI_CTRL_VERSION_2_5: DSI host v2.5 controller
* @DSI_CTRL_VERSION_2_6: DSI host v2.6 controller
* @DSI_CTRL_VERSION_MAX: max version * @DSI_CTRL_VERSION_MAX: max version
*/ */
enum dsi_ctrl_version { enum dsi_ctrl_version {
@@ -49,6 +50,7 @@ enum dsi_ctrl_version {
DSI_CTRL_VERSION_2_3, DSI_CTRL_VERSION_2_3,
DSI_CTRL_VERSION_2_4, DSI_CTRL_VERSION_2_4,
DSI_CTRL_VERSION_2_5, DSI_CTRL_VERSION_2_5,
DSI_CTRL_VERSION_2_6,
DSI_CTRL_VERSION_MAX DSI_CTRL_VERSION_MAX
}; };

View File

@@ -91,6 +91,14 @@ static const struct dsi_ver_spec_info dsi_phy_v4_2 = {
.timing_cfg_count = 14, .timing_cfg_count = 14,
}; };
static const struct dsi_ver_spec_info dsi_phy_v4_3 = {
.version = DSI_PHY_VERSION_4_3,
.lane_cfg_count = 4,
.strength_cfg_count = 2,
.regulator_cfg_count = 0,
.timing_cfg_count = 14,
};
static const struct of_device_id msm_dsi_phy_of_match[] = { static const struct of_device_id msm_dsi_phy_of_match[] = {
{ .compatible = "qcom,dsi-phy-v0.0-hpm", { .compatible = "qcom,dsi-phy-v0.0-hpm",
.data = &dsi_phy_v0_0_hpm,}, .data = &dsi_phy_v0_0_hpm,},
@@ -108,6 +116,8 @@ static const struct of_device_id msm_dsi_phy_of_match[] = {
.data = &dsi_phy_v4_1,}, .data = &dsi_phy_v4_1,},
{ .compatible = "qcom,dsi-phy-v4.2", { .compatible = "qcom,dsi-phy-v4.2",
.data = &dsi_phy_v4_2,}, .data = &dsi_phy_v4_2,},
{ .compatible = "qcom,dsi-phy-v4.3",
.data = &dsi_phy_v4_3,},
{} {}
}; };

View File

@@ -32,6 +32,7 @@
* @DSI_PHY_VERSION_4_0: 7nm * @DSI_PHY_VERSION_4_0: 7nm
* @DSI_PHY_VERSION_4_1: 7nm * @DSI_PHY_VERSION_4_1: 7nm
* @DSI_PHY_VERSION_4_2: 5nm * @DSI_PHY_VERSION_4_2: 5nm
* @DSI_PHY_VERSION_4_3: 5nm
* @DSI_PHY_VERSION_MAX: * @DSI_PHY_VERSION_MAX:
*/ */
enum dsi_phy_version { enum dsi_phy_version {
@@ -44,6 +45,7 @@ enum dsi_phy_version {
DSI_PHY_VERSION_4_0, /* 7nm */ DSI_PHY_VERSION_4_0, /* 7nm */
DSI_PHY_VERSION_4_1, /* 7nm */ DSI_PHY_VERSION_4_1, /* 7nm */
DSI_PHY_VERSION_4_2, /* 5nm */ DSI_PHY_VERSION_4_2, /* 5nm */
DSI_PHY_VERSION_4_3, /* 5nm */
DSI_PHY_VERSION_MAX DSI_PHY_VERSION_MAX
}; };

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*/ */
#include <linux/math64.h> #include <linux/math64.h>
@@ -60,6 +60,7 @@
#define DSIPHY_CMN_PHY_STATUS 0x140 #define DSIPHY_CMN_PHY_STATUS 0x140
#define DSIPHY_CMN_LANE_STATUS0 0x148 #define DSIPHY_CMN_LANE_STATUS0 0x148
#define DSIPHY_CMN_LANE_STATUS1 0x14C #define DSIPHY_CMN_LANE_STATUS1 0x14C
#define DSIPHY_CMN_GLBL_DIGTOP_SPARE10 0x1AC
/* n = 0..3 for data lanes and n = 4 for clock lane */ /* n = 0..3 for data lanes and n = 4 for clock lane */
#define DSIPHY_LNX_CFG0(n) (0x200 + (0x80 * (n))) #define DSIPHY_LNX_CFG0(n) (0x200 + (0x80 * (n)))
@@ -156,8 +157,7 @@ static void dsi_phy_hw_v4_0_lane_settings(struct dsi_phy_hw *phy,
u8 tx_dctrl_v4_1[] = {0x40, 0x40, 0x40, 0x46, 0x41}; u8 tx_dctrl_v4_1[] = {0x40, 0x40, 0x40, 0x46, 0x41};
u8 *tx_dctrl; u8 *tx_dctrl;
if ((phy->version == DSI_PHY_VERSION_4_1) || if (phy->version >= DSI_PHY_VERSION_4_1)
(phy->version == DSI_PHY_VERSION_4_2))
tx_dctrl = &tx_dctrl_v4_1[0]; tx_dctrl = &tx_dctrl_v4_1[0];
else else
tx_dctrl = &tx_dctrl_v4[0]; tx_dctrl = &tx_dctrl_v4[0];
@@ -436,6 +436,12 @@ void dsi_phy_hw_v4_0_enable(struct dsi_phy_hw *phy,
if (dsi_phy_hw_v4_0_is_pll_on(phy)) if (dsi_phy_hw_v4_0_is_pll_on(phy))
pr_warn("PLL turned on before configuring PHY\n"); pr_warn("PLL turned on before configuring PHY\n");
/* Request for REFGEN ready */
if (phy->version == DSI_PHY_VERSION_4_3) {
DSI_W32(phy, DSIPHY_CMN_GLBL_DIGTOP_SPARE10, 0x1);
udelay(500);
}
/* wait for REFGEN READY */ /* wait for REFGEN READY */
rc = readl_poll_timeout_atomic(phy->base + DSIPHY_CMN_PHY_STATUS, rc = readl_poll_timeout_atomic(phy->base + DSIPHY_CMN_PHY_STATUS,
status, (status & BIT(0)), delay_us, timeout_us); status, (status & BIT(0)), delay_us, timeout_us);

View File

@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/* /*
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*/ */
#include "dsi_phy_timing_calc.h" #include "dsi_phy_timing_calc.h"
@@ -1009,6 +1009,7 @@ int dsi_phy_timing_calc_init(struct dsi_phy_hw *phy,
case DSI_PHY_VERSION_4_0: case DSI_PHY_VERSION_4_0:
case DSI_PHY_VERSION_4_1: case DSI_PHY_VERSION_4_1:
case DSI_PHY_VERSION_4_2: case DSI_PHY_VERSION_4_2:
case DSI_PHY_VERSION_4_3:
ops->get_default_phy_params = ops->get_default_phy_params =
dsi_phy_hw_v4_0_get_default_phy_params; dsi_phy_hw_v4_0_get_default_phy_params;
ops->calc_clk_zero = ops->calc_clk_zero =

View File

@@ -197,10 +197,8 @@ int dsi_pll_init(struct platform_device *pdev, struct dsi_pll_resource **pll)
return -ENOMEM; return -ENOMEM;
} }
if (dsi_pll_get_ioresources(pdev, &pll_res->gdsc_base, "gdsc_base")) { if (dsi_pll_get_ioresources(pdev, &pll_res->gdsc_base, "gdsc_base"))
DSI_PLL_ERR(pll_res, "Unable to remap gdsc base resources\n"); DSI_PLL_DBG(pll_res, "Unable to remap gdsc base resources\n");
return -ENOMEM;
}
in_trusted_vm = of_property_read_bool(pdev->dev.of_node, in_trusted_vm = of_property_read_bool(pdev->dev.of_node,
"qcom,dsi-pll-in-trusted-vm"); "qcom,dsi-pll-in-trusted-vm");