diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2020-07-17 18:56:15 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2020-07-17 22:32:58 +0300 |
commit | 98a3bf97c92b18aef86301a0c2e815321137135b (patch) | |
tree | e5095d3dd05a208e4cd49ab37f7ff2c487a0385b | |
parent | 562af74246048e617194f4cf3019abc23e6cc8e7 (diff) |
qcom: hack to disable DPU interfaces before switching display clocks
Disable DPU interfaces before switching display clocks to allow the
board to boot. Disabling interfaces later (at mdp/mdss probing time)
does not allow the board to boot.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-rw-r--r-- | arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 4 | ||||
-rw-r--r-- | drivers/clk/qcom/dispcc-sm8250.c | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 48b536e73c78..7cb9fcc44026 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -505,6 +505,10 @@ }; }; +&dispcc { + dpu-disable-interfaces; +}; + &dsi0 { status = "okay"; vdda-supply = <&vreg_l5a_0p875>; diff --git a/drivers/clk/qcom/dispcc-sm8250.c b/drivers/clk/qcom/dispcc-sm8250.c index 6ababa0fed57..dd0887f26711 100644 --- a/drivers/clk/qcom/dispcc-sm8250.c +++ b/drivers/clk/qcom/dispcc-sm8250.c @@ -1352,6 +1352,34 @@ static int disp_cc_sm8250_probe(struct platform_device *pdev) { struct regmap *regmap; + if (of_property_read_bool(pdev->dev.of_node, "dpu-disable-interfaces")) { +#define INTF_TIMING_ENGINE_EN 0x000 +#define INTF_MUX 0x25C + void *ptr; + u32 d; + int j, i; + phys_addr_t base[] = { + 0x6b000, + 0x6b800, + 0x6c000, + 0x6c800, + }; + for (j = 0; j < ARRAY_SIZE(base); j++) { + pr_info("base %x\n", base[j]); + ptr = ioremap(0xae00000 + base[j], 0x800); + for (i = 0; i < 4; i++) { + pr_info("%d\n", i); + writel(0, ptr + INTF_TIMING_ENGINE_EN); + d = readl(ptr + INTF_MUX); + pr_info("%d: %x\n", i, d); + //writel(d | 0xf, ptr + INTF_MUX); + writel(0xf000f, ptr + INTF_MUX); + } + iounmap(ptr); + } + pr_err("DISABLED INTF!!!\n"); + } + regmap = qcom_cc_map(pdev, &disp_cc_sm8250_desc); if (IS_ERR(regmap)) { pr_err("Failed to map the disp_cc registers\n"); |