ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 805-display-0029-drm-imx-mhdp-Adjustment-core-rate-of-DP-TX-CTRL-for-.patch
1 From 4d5ce89b5a6faa347464221e4b674be46b951245 Mon Sep 17 00:00:00 2001
2 From: Wen He <wen.he_1@nxp.com>
3 Date: Wed, 27 Nov 2019 18:24:11 +0800
4 Subject: [PATCH] drm: imx: mhdp: Adjustment core rate of DP TX CTRL for
5  LS1028A
6
7 This Display TX CTRL clock should be ACLK/4, update it to align with
8 the specification.
9
10 Signed-off-by: Wen He <wen.he_1@nxp.com>
11 Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
12 ---
13  drivers/gpu/drm/bridge/cadence/cdns-dp-core.c | 4 ++++
14  drivers/gpu/drm/imx/cdn-mhdp-imx8qm.c         | 3 +++
15  include/drm/bridge/cdns-mhdp-common.h         | 1 +
16  3 files changed, 8 insertions(+)
17
18 --- a/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c
19 +++ b/drivers/gpu/drm/bridge/cadence/cdns-dp-core.c
20 @@ -435,6 +435,7 @@ static int __cdns_dp_probe(struct platfo
21         }
22  
23         mhdp->is_hpd = true;
24 +       mhdp->is_ls1028a = false;
25  
26         mhdp->irq[IRQ_IN] = platform_get_irq_byname(pdev, "plug_in");
27         if (mhdp->irq[IRQ_IN] < 0) {
28 @@ -450,6 +451,9 @@ static int __cdns_dp_probe(struct platfo
29  
30         cdns_dp_parse_dt(mhdp);
31  
32 +       if (of_device_is_compatible(dev->of_node, "cdn,ls1028a-dp"))
33 +               mhdp->is_ls1028a = true;
34 +
35         cdns_mhdp_plat_call(mhdp, power_on);
36  
37         cdns_mhdp_plat_call(mhdp, firmware_init);
38 --- a/drivers/gpu/drm/imx/cdn-mhdp-imx8qm.c
39 +++ b/drivers/gpu/drm/imx/cdn-mhdp-imx8qm.c
40 @@ -526,6 +526,9 @@ int cdns_mhdp_firmware_init_imx8qm(struc
41  
42         /* configure HDMI/DP core clock */
43         rate = clk_get_rate(imx_mhdp->clks.clk_core);
44 +       if (mhdp->is_ls1028a)
45 +               rate = rate / 4;
46 +
47         cdns_mhdp_set_fw_clk(&imx_mhdp->mhdp, rate);
48  
49         /* un-reset ucpu */
50 --- a/include/drm/bridge/cdns-mhdp-common.h
51 +++ b/include/drm/bridge/cdns-mhdp-common.h
52 @@ -685,6 +685,7 @@ struct cdns_mhdp_device {
53         bool power_up;
54         bool plugged;
55         bool is_hpd;
56 +       bool is_ls1028a;
57         struct mutex lock;
58         struct mutex iolock;
59