1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-14 11:13:53 +02:00
openwrt/target/linux/layerscape/patches-5.4/805-display-0029-drm-imx-mhdp-Adjustment-core-rate-of-DP-TX-CTRL-for-.patch
Yangbo Lu cddd459140 layerscape: add patches-5.4
Add patches for linux-5.4. The patches are from NXP LSDK-20.04 release
which was tagged LSDK-20.04-V5.4.
https://source.codeaurora.org/external/qoriq/qoriq-components/linux/

For boards LS1021A-IOT, and Traverse-LS1043 which are not involved in
LSDK, port the dts patches from 4.14.

The patches are sorted into the following categories:
  301-arch-xxxx
  302-dts-xxxx
  303-core-xxxx
  701-net-xxxx
  801-audio-xxxx
  802-can-xxxx
  803-clock-xxxx
  804-crypto-xxxx
  805-display-xxxx
  806-dma-xxxx
  807-gpio-xxxx
  808-i2c-xxxx
  809-jailhouse-xxxx
  810-keys-xxxx
  811-kvm-xxxx
  812-pcie-xxxx
  813-pm-xxxx
  814-qe-xxxx
  815-sata-xxxx
  816-sdhc-xxxx
  817-spi-xxxx
  818-thermal-xxxx
  819-uart-xxxx
  820-usb-xxxx
  821-vfio-xxxx

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2020-05-07 12:53:06 +02:00

60 lines
1.7 KiB
Diff

From 4d5ce89b5a6faa347464221e4b674be46b951245 Mon Sep 17 00:00:00 2001
From: Wen He <wen.he_1@nxp.com>
Date: Wed, 27 Nov 2019 18:24:11 +0800
Subject: [PATCH] drm: imx: mhdp: Adjustment core rate of DP TX CTRL for
LS1028A
This Display TX CTRL clock should be ACLK/4, update it to align with
the specification.
Signed-off-by: Wen He <wen.he_1@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
---
drivers/gpu/drm/bridge/cadence/cdns-dp-core.c | 4 ++++
drivers/gpu/drm/imx/cdn-mhdp-imx8qm.c | 3 +++
include/drm/bridge/cdns-mhdp-common.h | 1 +
3 files changed, 8 insertions(+)
--- a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c
@@ -435,6 +435,7 @@ static int __cdns_dp_probe(struct platfo
}
mhdp->is_hpd = true;
+ mhdp->is_ls1028a = false;
mhdp->irq[IRQ_IN] = platform_get_irq_byname(pdev, "plug_in");
if (mhdp->irq[IRQ_IN] < 0) {
@@ -450,6 +451,9 @@ static int __cdns_dp_probe(struct platfo
cdns_dp_parse_dt(mhdp);
+ if (of_device_is_compatible(dev->of_node, "cdn,ls1028a-dp"))
+ mhdp->is_ls1028a = true;
+
cdns_mhdp_plat_call(mhdp, power_on);
cdns_mhdp_plat_call(mhdp, firmware_init);
--- a/drivers/gpu/drm/imx/cdn-mhdp-imx8qm.c
+++ b/drivers/gpu/drm/imx/cdn-mhdp-imx8qm.c
@@ -526,6 +526,9 @@ int cdns_mhdp_firmware_init_imx8qm(struc
/* configure HDMI/DP core clock */
rate = clk_get_rate(imx_mhdp->clks.clk_core);
+ if (mhdp->is_ls1028a)
+ rate = rate / 4;
+
cdns_mhdp_set_fw_clk(&imx_mhdp->mhdp, rate);
/* un-reset ucpu */
--- a/include/drm/bridge/cdns-mhdp-common.h
+++ b/include/drm/bridge/cdns-mhdp-common.h
@@ -685,6 +685,7 @@ struct cdns_mhdp_device {
bool power_up;
bool plugged;
bool is_hpd;
+ bool is_ls1028a;
struct mutex lock;
struct mutex iolock;