Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3838d7d5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: skip clamp programming for spyro"

parents 853a2b87 40e055ed
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -67,6 +67,7 @@ Optional properties:
- qcom,mmss-ulp-clamp-ctrl-offset:	Specifies the offset for dsi ulps clamp control register.
- qcom,mmss-ulp-clamp-ctrl-offset:	Specifies the offset for dsi ulps clamp control register.
- qcom,mmss-phyreset-ctrl-offset:	Specifies the offset for dsi phy reset control register.
- qcom,mmss-phyreset-ctrl-offset:	Specifies the offset for dsi phy reset control register.
- qcom,dsi-clk-ln-recovery:		Boolean which enables the clk lane recovery
- qcom,dsi-clk-ln-recovery:		Boolean which enables the clk lane recovery
- qcom,mdss-skip-clamp:			Boolean which skip clamp for lanes.


mdss-dsi-ctrl is a dsi controller device which is treated as a subnode of the mdss-dsi device.
mdss-dsi-ctrl is a dsi controller device which is treated as a subnode of the mdss-dsi device.


+5 −0
Original line number Original line Diff line number Diff line
@@ -64,6 +64,11 @@
	};
	};
};
};


&mdss_dsi {
	/* Add for 429w platform */
	qcom,mdss-skip-clamp;
};

&mdss_dsi0 {
&mdss_dsi0 {
	qcom,dsi-pref-prim-pan = <&dsi_edo_rm67162_qvga_cmd>;
	qcom,dsi-pref-prim-pan = <&dsi_edo_rm67162_qvga_cmd>;
	pinctrl-names = "mdss_default", "mdss_sleep";
	pinctrl-names = "mdss_default", "mdss_sleep";
+4 −0
Original line number Original line Diff line number Diff line
@@ -3520,6 +3520,10 @@ static int mdss_dsi_parse_dt_params(struct platform_device *pdev,
		of_property_read_bool(pdev->dev.of_node,
		of_property_read_bool(pdev->dev.of_node,
		"qcom,dsi-clk-ln-recovery");
		"qcom,dsi-clk-ln-recovery");


	sdata->skip_clamp =
		of_property_read_bool(pdev->dev.of_node,
		"qcom,mdss-skip-clamp");

	return 0;
	return 0;
}
}


+4 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -249,6 +249,9 @@ struct dsi_shared_data {
	u32 ulps_clamp_ctrl_off;
	u32 ulps_clamp_ctrl_off;
	u32 ulps_phyrst_ctrl_off;
	u32 ulps_phyrst_ctrl_off;


	/* DSI phy skip clamp */
	bool skip_clamp;

	bool cmd_clk_ln_recovery_en;
	bool cmd_clk_ln_recovery_en;
	bool dsi0_active;
	bool dsi0_active;
	bool dsi1_active;
	bool dsi1_active;
+19 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -1925,6 +1925,7 @@ static int mdss_dsi_ulps_config(struct mdss_dsi_ctrl_pdata *ctrl,
static int mdss_dsi_clamp_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, int enable)
static int mdss_dsi_clamp_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, int enable)
{
{
	struct mipi_panel_info *mipi = NULL;
	struct mipi_panel_info *mipi = NULL;
	struct mdss_panel_data *pdata = NULL;
	u32 clamp_reg, regval = 0;
	u32 clamp_reg, regval = 0;
	u32 clamp_reg_off, phyrst_reg_off;
	u32 clamp_reg_off, phyrst_reg_off;


@@ -1941,6 +1942,7 @@ static int mdss_dsi_clamp_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, int enable)
	clamp_reg_off = ctrl->shared_data->ulps_clamp_ctrl_off;
	clamp_reg_off = ctrl->shared_data->ulps_clamp_ctrl_off;
	phyrst_reg_off = ctrl->shared_data->ulps_phyrst_ctrl_off;
	phyrst_reg_off = ctrl->shared_data->ulps_phyrst_ctrl_off;
	mipi = &ctrl->panel_data.panel_info.mipi;
	mipi = &ctrl->panel_data.panel_info.mipi;
	pdata = &ctrl->panel_data;


	/* clock lane will always be clamped */
	/* clock lane will always be clamped */
	clamp_reg = BIT(9);
	clamp_reg = BIT(9);
@@ -1970,6 +1972,14 @@ static int mdss_dsi_clamp_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, int enable)
	pr_debug("%s: called for ctrl%d, enable=%d, clamp_reg=0x%08x\n",
	pr_debug("%s: called for ctrl%d, enable=%d, clamp_reg=0x%08x\n",
		__func__, ctrl->ndx, enable, clamp_reg);
		__func__, ctrl->ndx, enable, clamp_reg);
	if (enable && !ctrl->mmss_clamp) {
	if (enable && !ctrl->mmss_clamp) {
		if (!mdss_dsi_ulps_feature_enabled(pdata) &&
			!pdata->panel_info.ulps_suspend_enabled &&
			ctrl->shared_data->skip_clamp) {

			ctrl->mmss_clamp = true;
			return 0;
		}

		regval = MIPI_INP(ctrl->mmss_misc_io.base + clamp_reg_off);
		regval = MIPI_INP(ctrl->mmss_misc_io.base + clamp_reg_off);
		/* Enable MMSS DSI Clamps */
		/* Enable MMSS DSI Clamps */
		if (ctrl->ndx == DSI_CTRL_0) {
		if (ctrl->ndx == DSI_CTRL_0) {
@@ -2008,6 +2018,14 @@ static int mdss_dsi_clamp_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, int enable)
		wmb();
		wmb();
		ctrl->mmss_clamp = true;
		ctrl->mmss_clamp = true;
	} else if (!enable && ctrl->mmss_clamp) {
	} else if (!enable && ctrl->mmss_clamp) {
		if (!mdss_dsi_ulps_feature_enabled(pdata) &&
			!pdata->panel_info.ulps_suspend_enabled &&
			ctrl->shared_data->skip_clamp) {

			ctrl->mmss_clamp = false;
			return 0;
		}

		if (IS_MDSS_MAJOR_MINOR_SAME(ctrl->shared_data->hw_rev,
		if (IS_MDSS_MAJOR_MINOR_SAME(ctrl->shared_data->hw_rev,
			MDSS_DSI_HW_REV_104) &&
			MDSS_DSI_HW_REV_104) &&
			(MDSS_GET_STEP(ctrl->shared_data->hw_rev) !=
			(MDSS_GET_STEP(ctrl->shared_data->hw_rev) !=