From patchwork Tue Jul 28 11:17:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11688941 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D62B714DD for ; Tue, 28 Jul 2020 11:19:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADB812065E for ; Tue, 28 Jul 2020 11:19:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LPGrLRNC"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="PqTJVT5/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADB812065E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=public-files.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ThBAURvtz6DNt1mk73HWhQlluFvubOBG/+RMl6NVstE=; b=LPGrLRNCgYK8sIOqP89yQm2qB 9sl4hfkIU2lQo3byC25mQiZkATgxjk8RXqiZ5wCtY72U6HsHX2kJoZYHRGa/9n7FYi1VF4OPWmY0/ IBOeVzCgbjrunCyYYWCt3F5Mhn9UmQ4A8rds/+w8egkR4FoE2VhYEw8OYQ/WGhUDWZjqN2bx1Uuc9 7xPP/MI6GmlIPhxCZevdcRk6cD2JnebWygKO7akKdp5WR51jzSi/x8gYKuFs42oe2q2eCMBgfHGZJ 5+sb5YlhH0Q+v3jxwHAuwQdrlutsPDqiELC18ekOvW2k294/5bRujsmaYJlPWwF2/20XY7c+tMhCO 2Dxj27qhg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0NdM-0008Qt-HC; Tue, 28 Jul 2020 11:19:00 +0000 Received: from mout.gmx.net ([212.227.17.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Nd8-0008MG-7F; Tue, 28 Jul 2020 11:18:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595935101; bh=RjztiQu8bvOyUz2B8+6Y6utG8fBygRMWzsrfRLxaT28=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=PqTJVT5/1DKAUPspO4Fwvu8KXxLwmZT9gxvwKOC/sayrFfCYOGUrAt1kKuLyuV+/2 rmV1oZj9libk8OmI/vr47fgm+vwLQ9bE5YsWg4W6ypd68ap6fz8Ixo+NsECqvMjLde DmhoS6b7PQ36PJy1dHsMVQb+2gyklriznJ4flhAk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mr9Bu-1kX1XH0BMs-00oDrD; Tue, 28 Jul 2020 13:18:21 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 1/5] drm/mediatek: config component output by device node port Date: Tue, 28 Jul 2020 13:17:56 +0200 Message-Id: <20200728111800.77641-2-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200728111800.77641-1-frank-w@public-files.de> References: <20200728111800.77641-1-frank-w@public-files.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:YvbDIbRpFNRzU9CUvTdpvNUkk08xUKy8rbwWD1rLNM8UXAoQuK4 eICt8UcylHTRfOGkjEX9jjTApIMznChQZ6JLB0JrsjiMAAUXmWoZWVa1uKNNAGYRlIyVrTC IKSqIDP+H57GVEHxo0RDq9SNxAHZIaXwDCy1xq9aaTm2FrJdcG2UEvxzlv5POKDx0mQCuV4 VCgz/4H4bnhMAao7exzPA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:5JI92cNImiA=:IU9/AVKV/YriZTpTu1OE0e O8SnTBpFQJaIKnhNf0ENVS71qiHFJW6fi77esT8+iPhPmyguNpqEi200P15DE396vcSD6HaRy jkK+um62hHmvGVD413t3Td/MBamGeZ0K/OHMaCWx9ZlhRNV3p5ddO85KGWDGbKGl3mIQy1ZDO gYTMhu1k/shkkXPexV8oBEFwrK1sjylI3UcDJhmVj0v7MvmpjrGSfLohzyhggLMiQrWtSXj1s F5lH69pJPnG6XDc6RTp9zCPFR+88z8jqreyd0iU6HGsgSLtteanA1+aosO8ehasnE2LmJs3cq XCQhAot6d9BA5lrJCOx3xPDXpsXRDODPrBq51F3FjzrYm0r+R+673O9haC0BJ3bgICsF0xtcB r68CTlvnknBcp8o/Xlu4r4mQwOP/IXmr3LOV1iBVAy3JR9UVdyiaAwDpLH0ZjmHhNBSf+kYec dil9AXhKdCT17ayWhX6puhITR3fzJONhT9CXwjhzytz+YkWf0A1sLUmXZMriF5HnHqmKo2pBz aXWk5rIooPqsAiK4rTMuZ09SbaOSfOUswgDpAdQw/UCtzfRf5HPXFDOoXiNqi988wHVgPH39d reopSpTbdHOZL5aeLq4WRU2g35bhX4O8jNUsrcK3R8N/USycjc62YiM/EFptwkec+4eMjw9h1 nbFEDDoYSLOsPoTl9rzfWc1aiIRq0+Bx+rrfaf23uQPdhRmi8/YF0ZAnar8dhSEhz5Jmct+0I lzyhaHfFgFGPBm2i2iEsyUqzSTPEy2q1nYqtCAFMSB60D6oBkWAbWgtVo0n8KvX9Q7fRmKWo4 9rFBYULsOB0q4GS4C1aZNkk64O39OnVdqHUOOoSVcM7LQU9XVlE35S4gDtIZdqe1EZ8z+smv5 /+v2VHEZ4IpAf8jQzlxuEyPHyG2CtXV3AMEoA4e+/Xxxq5IL9Ve3rWkrmwxkPm8+/76Zh67e+ +1ZrOvHoyORJHbaEJSnK3KI6l4bQuCAaMDeqcIp/GX2d8au/zlPDwHGAXlrwwhBBTZIiQ1fht 6Hu95C5tCaeveDCNyggV4YE4oP2zSdyO+ItSIBCDFQgWj+QA3SvJGu47HvP2JOIHMXjfwmXXR L4G2ac3jJFcKw0n5l7Gfty4KURDLrGVL0M9vLkoIH87wz83fAxHjWg2jzQjo3foq1YKgx+XB7 bV2ZZh1PhCqVaiMTzK6lP4oD/Okofix7b7Ru49cLd353NNBLHoYRY/S8u6Ae6RmYx+SKuRWv6 8/3j9uIxIhbIUCnAws/QvGWYwSOpixhywPWcY6Q== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_071846_812752_B6B1B303 X-CRM114-Status: GOOD ( 16.93 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.22 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , Philipp Zabel , Frank Wunderlich , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Matthias Brugger , Bibby Hsieh , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org From: Bibby Hsieh We can select output component by decive node port. Main path default output component is DSI. External path default output component is DPI. without this Patch i get this warning: WARNING: CPU: 3 PID: 70 at drivers/gpu/drm/drm_mode_config.c:621 drm_mode_config_validate+0x1d8/0x258 Signed-off-by: Bibby Hsieh added small fixes for warnings Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 46 ++++++++++++++++++++++---- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 4 +-- 2 files changed, 42 insertions(+), 8 deletions(-) -- 2.25.1 diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 6bd369434d9d..ce7abf2743d9 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -24,6 +24,13 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include #include "mtk_drm_crtc.h" #include "mtk_drm_ddp.h" @@ -61,7 +68,7 @@ static const struct drm_mode_config_funcs mtk_drm_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static const enum mtk_ddp_comp_id mt2701_mtk_ddp_main[] = { +static enum mtk_ddp_comp_id mt2701_mtk_ddp_main[] = { DDP_COMPONENT_OVL0, DDP_COMPONENT_RDMA0, DDP_COMPONENT_COLOR0, @@ -69,12 +76,12 @@ static const enum mtk_ddp_comp_id mt2701_mtk_ddp_main[] = { DDP_COMPONENT_DSI0, }; -static const enum mtk_ddp_comp_id mt2701_mtk_ddp_ext[] = { +static enum mtk_ddp_comp_id mt2701_mtk_ddp_ext[] = { DDP_COMPONENT_RDMA1, DDP_COMPONENT_DPI0, }; -static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = { +static enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = { DDP_COMPONENT_OVL0, DDP_COMPONENT_COLOR0, DDP_COMPONENT_AAL0, @@ -84,7 +91,7 @@ static const enum mtk_ddp_comp_id mt2712_mtk_ddp_main[] = { DDP_COMPONENT_PWM0, }; -static const enum mtk_ddp_comp_id mt2712_mtk_ddp_ext[] = { +static enum mtk_ddp_comp_id mt2712_mtk_ddp_ext[] = { DDP_COMPONENT_OVL1, DDP_COMPONENT_COLOR1, DDP_COMPONENT_AAL1, @@ -100,7 +107,7 @@ static const enum mtk_ddp_comp_id mt2712_mtk_ddp_third[] = { DDP_COMPONENT_PWM2, }; -static const enum mtk_ddp_comp_id mt8173_mtk_ddp_main[] = { +static enum mtk_ddp_comp_id mt8173_mtk_ddp_main[] = { DDP_COMPONENT_OVL0, DDP_COMPONENT_COLOR0, DDP_COMPONENT_AAL0, @@ -111,7 +118,7 @@ static const enum mtk_ddp_comp_id mt8173_mtk_ddp_main[] = { DDP_COMPONENT_PWM0, }; -static const enum mtk_ddp_comp_id mt8173_mtk_ddp_ext[] = { +static enum mtk_ddp_comp_id mt8173_mtk_ddp_ext[] = { DDP_COMPONENT_OVL1, DDP_COMPONENT_COLOR1, DDP_COMPONENT_GAMMA, @@ -459,6 +466,7 @@ static int mtk_drm_probe(struct platform_device *pdev) /* Iterate over sibling DISP function blocks */ for_each_child_of_node(phandle->parent, node) { + struct device_node *port, *ep, *remote; const struct of_device_id *of_id; enum mtk_ddp_comp_type comp_type; int comp_id; @@ -522,6 +530,32 @@ static int mtk_drm_probe(struct platform_device *pdev) private->ddp_comp[comp_id] = comp; } + + if (comp_type != MTK_DSI && comp_type != MTK_DPI) { + port = of_graph_get_port_by_id(node, 0); + if (!port) + continue; + ep = of_get_child_by_name(port, "endpoint"); + of_node_put(port); + if (!ep) + continue; + remote = of_graph_get_remote_port_parent(ep); + of_node_put(ep); + if (!remote) + continue; + of_id = of_match_node(mtk_ddp_comp_dt_ids, remote); + if (!of_id) + continue; + comp_type = (enum mtk_ddp_comp_type)of_id->data; + for (i = 0; i < private->data->main_len - 1; i++) + if (private->data->main_path[i] == comp_id) + private->data->main_path[i + 1] = + mtk_ddp_comp_get_id(node, comp_type); + for (i = 0; i < private->data->ext_len - 1; i++) + if (private->data->ext_path[i] == comp_id) + private->data->ext_path[i + 1] = + mtk_ddp_comp_get_id(node, comp_type); + } } if (!private->mutex_node) { diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.h b/drivers/gpu/drm/mediatek/mtk_drm_drv.h index b5be63e53176..7fcaab648bf1 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h @@ -21,9 +21,9 @@ struct drm_property; struct regmap; struct mtk_mmsys_driver_data { - const enum mtk_ddp_comp_id *main_path; + enum mtk_ddp_comp_id *main_path; unsigned int main_len; - const enum mtk_ddp_comp_id *ext_path; + enum mtk_ddp_comp_id *ext_path; unsigned int ext_len; const enum mtk_ddp_comp_id *third_path; unsigned int third_len; From patchwork Tue Jul 28 11:17:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11688945 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E0C014DD for ; Tue, 28 Jul 2020 11:19:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 373DB2070A for ; Tue, 28 Jul 2020 11:19:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NlqIt3ep"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="D8wok7Vx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 373DB2070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=public-files.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RAQA2p8rI1knVNPYeinhL0A0i/3TRDw69SVuz99FRts=; b=NlqIt3epozONaoqc7X9QDj25c UAgPXB2xvEzM369qptXtY01HmkXMGtlGG2K7mxztX77/ECJCg17JCCwpkMcbLaIRWaiCb0zwKV3DK Uns3IXuYJMhFSx5gPmosrm4s/zFc+LhnHEShHScBKBAwf8dNJAqOEw1bi38YUrUupmMs9vnypYOxJ A3kQkHDSymCguCZUOAIFi8WCjwlge+6BSn+lKxD+YwsD9wOkvpY3Scyqj3K+Eajrf3lw8B4VvYvyA El3B016VJPHIU7UfEvS/fogj2TWNf40jsa505jak5QPBpf/iYonT84ZH3z9EARsK2+C6THl2yGj0i Ck4jKfKRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Ne3-0000I5-Eu; Tue, 28 Jul 2020 11:19:43 +0000 Received: from mout.gmx.net ([212.227.17.21]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Ndn-0000A8-Id for linux-mediatek@lists.infradead.org; Tue, 28 Jul 2020 11:19:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595935103; bh=+AN/A7LaJ8QE7aEa8re6PrqGoq/kSyCmQ9u1D7Iy5LI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=D8wok7VxB0mIvkh48xKtrEvGEbuIEDbNRu2dKCl4Hgek+N85Rue7sHVaXCxm4mVTl MN8dP5oBINRQZLdZpNVChq0a48UnOuDhey02LN/mVAaHVKG61QLc3PfaylK5xsekef DhZJeAxZaq/GxOXTGfB/jWknlu+A4ro/v2EOUftw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MgNh1-1kiFof40mV-00hsD8; Tue, 28 Jul 2020 13:18:23 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 2/5] drm/mediatek: fix boot up for 720 and 480 but 1080 Date: Tue, 28 Jul 2020 13:17:57 +0200 Message-Id: <20200728111800.77641-3-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200728111800.77641-1-frank-w@public-files.de> References: <20200728111800.77641-1-frank-w@public-files.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ak6ylIwTkGEi+mVAT3DUFYeBflxF5UYrm21Ep/FvtMOgSVvosry re5T5r+z1mGqxMwD61JmDn8kXvfaEsk8E5o6GNX/A4yzkKQh5AmNhTlp8O1kK8euvhrXFWp NhVShiqVk49RchrRqkTBVvSn/O/dsTnEra+yI4Ykv0nQELNnk7mjirt/GkINhIpGwhrgcNx 8Jnt6M95h7lBxQSpTgtWQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:dqUcR0KBXak=:aRyR9GOnlN77WX8Zjvk0JI YepXy56eg10gErublaOanE/Bmqqf2Baw8del2gqrNPIwfPQ7n+DOiqTR6n6G8yVLuk9IQU5j8 i76C1QN0Cukxg3eowP4JKteczmd/mfBaqFkGzbegQSZ1AvW/p7+wSx4iQSANEFBwoxEL+6HQU kSAhV52L9qNFPJQnreTu0t+PQo14ZzBgt/zzb3hBY4juiWVycCBp2233Zt5rhxcGIaJQ5mehn 9GSgv0KeuDWcnZsBWA4x2g4ZOHJVwoppHI11t+qJ0eKkig4wszqDwysr2NaWdljTx339t8LdP o2Bbn3eVIJjs4+YVhrTA75XN2ROOPkFRA29cqtSuGBDI4H+QLZHs409UT8nxiDQZaCvI7SyVb lt2d/t+XI/fiS4y9loLGGStZU5AnDC+AaEpEESRgIvw6XguLeaOIBgN1qimpZnD8K4+MXnIFV tMduf1Q+1ex3VJP05EqAPy0LMY7YX7gRQVGc1wliRDmLLDIPimvlC99teletDY16eJLaFUwG7 vPmLu7A7mge5kIYBRg3JJb8BFUsKn6dR4Ntf3ytoSYTgJxeg208A6M0bhaVejvTxnk47KMaRh HXCf9cRzmw5dFFxk9FYqecrtVWtPHQUUGp/4GH+x4pFdLdkP7QL7R9QoBXLOKnmvvbqeWjhOz NM0ZOeLO31h9KE7kwvfs9Oh0PqgehAKps8M7VX3kvRXMxrspyjfqO1pqAksFUiJ6jWk/SShb3 zw5UPivbUVJ+7V8nXKzRIqJvST8+3Yu4fbaH6I4MGxxoab+SaBY+JzpSxEtMufZA6082YqWN0 h+lV0rkLojAfHXiCwyEjKxbtvaFuyssixVB+KlIATdhyKSzTiZRMx2hTftW8KYuDU5tQLGFLm B/c6wBVT9jP8HUp28skc/8dwf5PoR3y2gFrBh2uSWMna9zNNtpsvMuefi5ZFLFWz2KSCQnjWW VGYldNp72+0lLzPx9NJvPMXtSnnx8X8/Kf1jUNOloNw2l1qmD5pnWXLrjkzpZysztBwtyzXsl jgAviTDjbGIqbmoC9BfvDQ2igXRdqNbSHAHHAkpx/yH9xZZvgY5RCnNIglWSHVMJaR0Kqbg+i SFVn7WIjCSSvW9A7RAW4FZkwEUHEZ/SQJdxZWDGeFaL6dESAL0ggoqMSPbVuSiJFgZqGNT0R7 kr2Wm9ISh4cnpbqlC8vTyR8x/PV6ZU6OW7OCvie6VtD+kapKXwQbxAgmYcK5mZAuaNUDYpStT IiWzYNz6Ir8g5gfRfsq+oEVovZmuInfiANpQfiQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_071927_910017_057F0631 X-CRM114-Status: GOOD ( 12.87 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.21 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.21 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , Philipp Zabel , Frank Wunderlich , David Airlie , chunhui dai , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org From: chunhui dai - disable tmds on phy on mt2701 - support other resolutions like 1280x1024 without this Patch i see flickering on my TFT (1280x1024), so i guess clock is wrong. Signed-off-by: chunhui dai Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich --- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 3 +++ drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 + drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 + 3 files changed, 5 insertions(+) -- 2.25.1 diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c index 5223498502c4..edadb7a700f1 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c @@ -184,6 +184,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) return PTR_ERR(phy_provider); } + if (hdmi_phy->conf->pll_default_off) + hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); + return of_clk_add_provider(dev->of_node, of_clk_src_simple_get, hdmi_phy->pll); } diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h index 2d8b3182470d..f472fdeb63dc 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h @@ -22,6 +22,7 @@ struct mtk_hdmi_phy; struct mtk_hdmi_phy_conf { bool tz_disabled; unsigned long flags; + bool pll_default_off; const struct clk_ops *hdmi_phy_clk_ops; void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy); diff --git a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c index d3cc4022e988..6fbedacfc1e8 100644 --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c @@ -239,6 +239,7 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { .tz_disabled = true, .flags = CLK_SET_RATE_GATE, + .pll_default_off = true, .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, .hdmi_phy_disable_tmds = mtk_hdmi_phy_disable_tmds, From patchwork Tue Jul 28 11:17:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11688937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D45A714DD for ; Tue, 28 Jul 2020 11:18:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ABC732070A for ; Tue, 28 Jul 2020 11:18:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="paqIaoTR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="f1ifvbL4"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="XFVxZUvs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABC732070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=public-files.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CW94U5S7ZWwxzyVTcF4PBY1qz+iSI013SiaMF3vrCT4=; b=paqIaoTRwrmOzBZpYYAZ8WoIJ +zXF20pqSCaKp86UPj7g13fLpN9M/tc4AD6BLcrg/6+Hb7VT/y3VnclV+1gVwzrEV9jn3QAez06ab Ni0zJ/nwsBmqurfWM/qnoeOt+71YLWrNcG98BuROalWYr/FFKNve4NWYkb5ZNdzPCXpSIFyBLHkW6 ABvfn3t6p3/IAq0nqa32bUS0RleVk5r+ElbkF83pTmxvk8WJyDVw01xhz/h2P/4DkGD7cC9E2DnyP 7im7c2AZjeno0BuVVz7P6xsydN/UH0qraV8m8lXHfhYN4UKxJKSK0/IP77Wr9qRZ1ogmFNLDwoSDI xetuesTHA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Nd8-0008Md-B2; Tue, 28 Jul 2020 11:18:46 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Nd6-0008MM-B0; Tue, 28 Jul 2020 11:18:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=LY9s1nnQKckO3h37XV1S0MJqqf6r6yFpGbgjuCHrjxQ=; b=f1ifvbL42hOEzv5SS56uPFfNFY xDlutwE/j8EJCyroWKXPZoGfk2T2TpBHdrJB7Aif1Lywpu4X7imwqDBKzL16LABHYtLQeW2L2GGSz jCSmuG4FddifuChAAUvZ67ZttkNH/HKjuyuwXBnQdDpnHs94lHMPttCaxvnbRz7XnIgDV7jG4TcgU t/7Wl1VEt6yJfrXsNd4Un09uMOzgodFCGiThwAmPhgIGuA6uh2wVW2PT3Qq8nmmB3pTA2ij3hbnVB 3ZWAmdKPaJDpyc/2/qHtbwCXA1nu58xLQZeBtu04slQduVqztfT2Lml+6yh5Jt1b+8h9m1a3d6UqQ aytHJ6hQ==; Received: from mout.gmx.net ([212.227.17.20]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Nd2-0006Y8-DJ; Tue, 28 Jul 2020 11:18:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595935104; bh=pm4hEMlP1SzMjKQ+uHyoY76koqrhvWkeRDQON2vGLX0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=XFVxZUvse2zObR6M+0xBOiKlRSLE0+v2VIYCl0YJ3kC2tf49GCXNPhqSmqusKTBYF 5/nJhprONs3KnUNv0mp0IJFP8DUXWTRH3BuUm0w4Fp9WhaC1+7kj0kpyfJyhjdPOgA KWyDgQ0DJxON7KsfDPirj6/F3kd+B3ImB9v3f89A= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWRVb-1kGiTE44Mt-00Xw1i; Tue, 28 Jul 2020 13:18:24 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 3/5] drm: Add get_possible_crtc API for dpi, dsi Date: Tue, 28 Jul 2020 13:17:58 +0200 Message-Id: <20200728111800.77641-4-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200728111800.77641-1-frank-w@public-files.de> References: <20200728111800.77641-1-frank-w@public-files.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:hmgR7ODYKvx8oPlcDw8Lc1GdvQDfiX/JgJnDv87nXPtte2migzq ZD98y+zmB/ZdT2oYW7Y7j8ofZCmyvZqa5eJRoXNRmZdV4lhEsqqiCqPF33I3WAZ5nzXzcip 5b5gV7A/c4AzsF40MizKtDOUfJhcDZss5KO+Y5HIkLY1uKWgvNw03Vd+wONHCMSGrAmN1Ya g9M6z+lByXTke2b9AhiEw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Cj6kSjaFYw8=:ibEsBPbF6stniMnVYTZhpV zDkTCWx13nsNCZy0D5Scrx7JkmlXPW9zL7/aTnkpDis106jtkcOYgFza12v6q47vNqG2godoh gLhY6SVqb6ELX75sq7sW9ju1u74/7nZLjimkkHxejvjvC68ctmMo/7sCG8m2LGloyFKovYFGN c084KbHFzK9BOtz9pW99diRqvqZk9muoO8ZF4eUUMP/5Ua+mXClWA35s+POS6yTJrsFPwrJz+ cM7pYI9fulZGb1LVAnxq27bJR3AaLdbEsE4P5haSQNgi0V0Mh28cY/wEacu2MRiG7NvnFxc+x 8TIXF4DBnyNnv8jOmtkGTfOKlCcvQnR4J+oh8Vtp459QvDO3rGcWc1AGR1IPwjyT50XSS3VR2 B7/HNGfrnBFeiqEfvmz+e1TwHznJDsTFNa2PTfjh0e3z0wqLAreht+MlcFoISSgKETCNcdJhY 378QtY91hzcKzat+4kHeGsq/dGy8uzjqJTepaKJFyoBkM9ZvLW/bCowAvUYZdl3Hy/VJHONB1 5gZfV8lE5CDynHFSpDYKzbPuQHCc3dZ/Aju0A/Mmuss+HJygnabm37a1Y5joD+/zch5YeehTf k0+7i8ELA8ASlNL9e58PPPos4+lgPi78XRBZbHZ0uwLMS9MJl12Bwq6cJ799NDSoBNXJapmfz 9KPRYgR1OFKg9LSLIz6wLpETayxOFcD0CxlNKVKvaoN6NpjICpTImFwRBsf4COXV8UPWM4R+E SJP6QfiPkjP0JGyFQzVCqiCagV8pdNlwahDp7tODe1KbJFS0goSZBVWs8r0uYnW0DVXaBAGh3 EICMUtSprDwHaR+AloPUW8Ra6ngCNhCyu+VcBhBbjjQGxs5CDQksdQUdEYgGdK+wa+7FXxFKk VdOQlWAxgq6NFRas28wxZmZKiJu7cNeqyAzWoufPrLetgvQ3l+zAdxOBumVKoJGEs2wrsTfAx iFZDjKY5bQUk1iAAiVZHYWr0SLM8SlY8u7J18msdM6iRv8Xg+bG5t4a//wlAYrMzs1MS0ALVs Tj3qoYk/KWnHFUVVg3h2U10q76AkiMaBO3OeakA8+WJJpSer5YuLJm5PtUwQkknRxx7XZe99Z x66jqTHfYLKBRUnifsBLBcv8rdDLDDHf2vofJmzUTKUhupHuUuOeWTM8wbq7jw6805Cz9USj+ /942CydVIXV2AafeVEPUm1hHx3wbdK2S8htiYNjoRmsJoOFPWZEdsPBD91x8OTDWG7iu9sAm8 C2JokM1mtSHkutkn75y22/U+jB5+nK2NzE4tkNg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_121840_903897_53121946 X-CRM114-Status: GOOD ( 13.41 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.20 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , Philipp Zabel , Frank Wunderlich , David Airlie , Stu Hsieh , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org From: Stu Hsieh Test: build pass and run ok Signed-off-by: Stu Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 42 +++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 2 + 2 files changed, 44 insertions(+) -- 2.25.1 diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c index 57c88de9a329..a5f2ff6bea93 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c @@ -13,6 +13,8 @@ #include #include #include +#include + #include "mtk_drm_drv.h" #include "mtk_drm_plane.h" #include "mtk_drm_ddp_comp.h" @@ -412,6 +414,22 @@ static const struct mtk_ddp_comp_match mtk_ddp_matches[DDP_COMPONENT_ID_MAX] = { [DDP_COMPONENT_WDMA1] = { MTK_DISP_WDMA, 1, NULL }, }; +static bool mtk_drm_find_comp_in_ddp(struct mtk_ddp_comp ddp_comp, + const enum mtk_ddp_comp_id *path, + unsigned int path_len) +{ + unsigned int i; + + if (path == NULL) + return false; + + for (i = 0U; i < path_len; i++) + if (ddp_comp.id == path[i]) + return true; + + return false; +} + int mtk_ddp_comp_get_id(struct device_node *node, enum mtk_ddp_comp_type comp_type) { @@ -427,6 +445,30 @@ int mtk_ddp_comp_get_id(struct device_node *node, return -EINVAL; } +unsigned int mtk_drm_find_possible_crtc_by_comp(struct drm_device *drm, + struct mtk_ddp_comp ddp_comp) +{ + struct mtk_drm_private *private = drm->dev_private; + unsigned int ret; + + if (mtk_drm_find_comp_in_ddp(ddp_comp, private->data->main_path, + private->data->main_len) == true) { + ret = BIT(0); + } else if (mtk_drm_find_comp_in_ddp(ddp_comp, + private->data->ext_path, + private->data->ext_len) == true) { + ret = BIT(1); + } else if (mtk_drm_find_comp_in_ddp(ddp_comp, + private->data->third_path, + private->data->third_len) == true) { + ret = BIT(2); + } else { + DRM_INFO("Failed to find comp in ddp table\n"); + ret = 0; + } + return ret; +} + int mtk_ddp_comp_init(struct device *dev, struct device_node *node, struct mtk_ddp_comp *comp, enum mtk_ddp_comp_id comp_id, const struct mtk_ddp_comp_funcs *funcs) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h index debe36395fe7..1d9e00b69462 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h @@ -202,6 +202,8 @@ static inline void mtk_ddp_ctm_set(struct mtk_ddp_comp *comp, int mtk_ddp_comp_get_id(struct device_node *node, enum mtk_ddp_comp_type comp_type); +unsigned int mtk_drm_find_possible_crtc_by_comp(struct drm_device *drm, + struct mtk_ddp_comp ddp_comp); int mtk_ddp_comp_init(struct device *dev, struct device_node *comp_node, struct mtk_ddp_comp *comp, enum mtk_ddp_comp_id comp_id, const struct mtk_ddp_comp_funcs *funcs); From patchwork Tue Jul 28 11:17:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11688939 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B8246C1 for ; Tue, 28 Jul 2020 11:18:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 744EF2074F for ; Tue, 28 Jul 2020 11:18:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1qDDHYEE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="suTlrd3X"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Y4T5TGaB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 744EF2074F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=public-files.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uBi3Uyg4LKVGsSQSp7RcWrXHYdJKgLwwsqqXOQFyeNU=; b=1qDDHYEE8o2aGrCxzVXaVzpcM sCkmkg8i8GwHbKPhPMwtEWbdn7gaB9dJg9gRICfDEpg8JJliCgy8iGVro0lYAIC7fRnN5cNk6kDxu k5UAaiQZHgBQHmFYaqBzU52kOFeDes2XQ9CpTb+KYDj4KO2B9KfAspdH6qNUWS5bTQszZtBhd5JOs 8ioHYZawr9V221QRYcL1XxHePZcIw+V69uUkC4VLGgIYAyqG/pclYtAuZosQLXG+svAaQtN9Aecdt lnPRdindbgnn+yyhrHL8e6HIcWcaEnJ8riKru5ykCAqrFU1APIdJSLA8D2jPlpPVrDug+ycQ6jJzy BcqyI15mw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0NdC-0008Nx-7M; Tue, 28 Jul 2020 11:18:50 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Nd9-0008Mw-EN; Tue, 28 Jul 2020 11:18:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=JjwWFddAdWynk3ZYwPqAbvNXk1S91CACAkdFq8ZgUhU=; b=suTlrd3XIXUbofTSutxdnaxmDJ t4Ou/cH429U6l01CGY7s4EoG+g+dB8aRNm0rNsL+5jVupKCZrFjCLYoRuqiioSA7NVNzpCH3nfpUA rTB7QDwCf1jyBhlt2VMgRqzeIcWJ/+osVcbx4ILihNe3AaNT+xHhHFLRSKJcJch6XZ1LHZzCtdaQO qHhHCBoKab8gYfwreULYA4+4aWBk18H4c6+cXjKBnVzBOGvkasQZlt1JVV8JMZKmEw4oTgQBnr6nk iVx8DLU6kfmmt6Xom/XXBoGP0jaWx6hfsZfqFMhKNObInvBjL6acKQPddn6uO4rcEPLkIinZjsJM7 WEzjGpSg==; Received: from mout.gmx.net ([212.227.17.22]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Nd5-0006YX-LY; Tue, 28 Jul 2020 11:18:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595935105; bh=nn4BkbW0oeEmcmd3H6QHuJO7LEA/snDXKRVANzx14BY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Y4T5TGaBuRt3b8kV1LyAkiduwg0Pe2qyX/uDh1A70EFNHcoeRo3AbL84Ed0E5L4Ci 9fy+P7/8/XbZytNcRLfs+Qbbe4Ek/IWc2C/s8d2pS0lPw2nRyjbKLn4LWt/DJmpdnH AxxaiKJ+plcgGAPLFxsWaaQRXl+ctR610QqCPuXE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBDj4-1jvSko3s5u-00CiFj; Tue, 28 Jul 2020 13:18:25 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 4/5] drm/mediatek: dpi/dsi: change the getting possible_crtc way Date: Tue, 28 Jul 2020 13:17:59 +0200 Message-Id: <20200728111800.77641-5-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200728111800.77641-1-frank-w@public-files.de> References: <20200728111800.77641-1-frank-w@public-files.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:rTF2GSs7JL/heYwGA7znoUaELcob0GxZ4gZI2tIFt+A0aSnsby8 0XUoXibUcKWysOwTn/CZlW9rpuGJK1GojEZyc2C44706GSiy8/tpQFVhRWP45HlMen+R/4e 1n7CdNSfTDuS/oJ9dYALJKe0JKchcLjuEAMsxGJNZA1wxc1ce6AFpbtSXwwPzaHP1HtCNqi 1X/DLBRAf1lZTLoCXaovQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:RV7oFfUX3MU=:M/4aNAEJjpZZJa0cjUuRDy L+eM2xGQG0RnqgxzoVd6drELeZaZId4oJe/xJyShs0HwkT2wheosTwwuILnf2RQBc0brb0ZAN 3kgK0FgC2+33+gDvC7Sn1sdVkvxbaTnc2WsBgkTgbmpxUHcRcwk7pdZZkxImMFVL6PnNmfoHl S3r9AuBOJ+GDA1ZOXLXiAq7+BnBnUPM3YY6kjC/yqaZMlh6sDb9CFbMfCPB/1QP4Mus62JlAp nKHOFpKDIBtP+s5Zq+ZGgU3oXXli7enF7H84NmYnY48rO3qsGMx8eMfAH3L3rz3T5iRo9mVug lb8/+GNqLADqus314zDsvpnrWth/ekQCZnIMvIrnGGPwgwrDim3fAV+5heOQZSGUaAhR5sU5/ JhqIKmwtXo7gfcwUOtfZ7p/DrnyhnNnqZNe5QihNZ4eiQ+2yEuMEDwEHiU60iPxGgsexMbZzb vxwQdKql69+vWsXTOviDAH4/doIRjTEW85lnK1r7RcOZn2pef9whEKUZeJKb1jZFCfxtCCx26 CDEts7whrkI/HtKYEtOjJlJzR5/1IoBFeadIfLTHgT/cKNXTojUTFvyupHB9YkJmopSy8KPm5 mh2e+6jtsM4QvtPJ+bmcZ+AbEv8dwoRSyrT+55cloJ2v/FJO9Q6M3Ct4x+wyKck5Ti/ucMs2t bPUx5ta0y1FrgNwyQwmVKdpBQ7GBlTQx2hgZw+f5+9TXJ8FYZf0Jbg0CiipPtro44NoO/x3E/ AaTCTHXe9dtBtGy2lFrrzzdPmh9WXV0rvuE7etvFmC6u/8yC4ttnlbugQurapc1LRmEX+a9VC PxI/44Td8EioDsFiTAoiBti7oIjDjCqxD5qZWB4SitqNWqol4DAIcV3EHP5n51NGW+5DBu1fM J+CxAO64WqNWXgdIxPlYcC4M8G30BF5gT//HcCT60n2cxjBdkdRavGkTlM+FONv+JtcmTbbLJ n2eHWFSImvm8Y16waIlN5SKMtNy5qxFvHXmgyqPHcxdeOtBp5gio36/sEyj7DBcNESumMTJxV SCLCqDCpLP9svdXOuP7l/ZiKhmVDPQJ42wns7bMUOrLTMFvwGDSCqsynNn9EtFuPzlpCO2G8f zOkTKcy1my8y5mGqZ6Nu2aiu9tcWYwnM7i9puNmR4xD1sY0wJK6FnhSrcfPOr/3Hxae7A5UDj h0xsgMZfaQU2xntgM2jl8C16RynN94gnVY7H4+zufLpj2xmMMaZrYngQ8HBqDoMUiS3ISCaIJ M/N+H2nqLFdhZSlVZL1y1Hr//wNT03awmNwDpKw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_121844_060673_5C598736 X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.22 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , Jitao Shi , Philipp Zabel , Frank Wunderlich , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org From: Jitao Shi [Detail] dpi/dsi get the possible_crtc by mtk_drm_find_possible_crtc_by_comp(*drm_dev, ddp_comp) Test: build pass and boot to logo Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 3 ++- drivers/gpu/drm/mediatek/mtk_dsi.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index d4f0fb7ad312..e43977015843 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -608,7 +608,8 @@ static int mtk_dpi_bind(struct device *dev, struct device *master, void *data) drm_encoder_helper_add(&dpi->encoder, &mtk_dpi_encoder_helper_funcs); /* Currently DPI0 is fixed to be driven by OVL1 */ - dpi->encoder.possible_crtcs = BIT(1); + dpi->encoder.possible_crtcs = + mtk_drm_find_possible_crtc_by_comp(drm_dev, dpi->ddp_comp); ret = drm_bridge_attach(&dpi->encoder, dpi->bridge, NULL, 0); if (ret) { diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 270bf22c98fe..c31d9c12d4a9 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -892,7 +892,8 @@ static int mtk_dsi_create_conn_enc(struct drm_device *drm, struct mtk_dsi *dsi) * Currently display data paths are statically assigned to a crtc each. * crtc 0 is OVL0 -> COLOR0 -> AAL -> OD -> RDMA0 -> UFOE -> DSI0 */ - dsi->encoder.possible_crtcs = 1; + dsi->encoder.possible_crtcs = + mtk_drm_find_possible_crtc_by_comp(drm, dsi->ddp_comp); /* If there's a bridge, attach to it and let it create the connector */ if (dsi->bridge) { From patchwork Tue Jul 28 11:18:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11688943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 472F26C1 for ; Tue, 28 Jul 2020 11:19:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12A9B206D7 for ; Tue, 28 Jul 2020 11:19:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mqpf2WP8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Q52Y0Aru" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12A9B206D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=public-files.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3nST4AP7LCmtRqedaqVsVRiiqywmPOTSE7oWn2dUKV4=; b=mqpf2WP8umBufnckzsaDlXM3W jgQPL4ULGTjgk3RDd7Vsml4Iglit+k3b7qxQ+z7mGIjOWi6uYnRCJ5ZIzeLCaQ3iyRmJO1ytDFbGt Sq7slzi50XFsi6u78dW5CYJKvistt1AblOw5QGZkosmHiIIJgpAlsb1mGB9Ne5H8VdzlB5d2pt5ka 2G+416UrwCQEIQEr0vNVlqHDTtU1NUl+6U8oKOR+BSWb2MzE5ffqCzRVcyMl7UB4YreNvGkBtK/IF X4v652DzBTLKgp5bjaeindm8/T7W9T1BvI70nbMNSXAxZUOOU7mD5w66QdYcLWiAACyOcRiTaHVve iOo2uo+Qg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Ndk-00008Z-8Y; Tue, 28 Jul 2020 11:19:24 +0000 Received: from mout.gmx.net ([212.227.17.20]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Ndh-00006W-VZ; Tue, 28 Jul 2020 11:19:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595935106; bh=V7oRKHspT8bz+DCILEYZfiQBm7br8j1f9O+VvLDkf7E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Q52Y0ArufaHdGsvzQc6TVQd17WvUyhEJVwOgPL1IEMRxhdjZ37kcUnVq0NPMBygSG 2rVHnJ6uvioXiAthij60xJMezf0kjbiuvCm0SyzQC0KNqU29V7inFkEBX8qYpqqra/ 6XXno87WG0G9S72b4XENCLSAFXY7pAyNBI2W+qoU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M6DWi-1k6zKz3r9k-006bqj; Tue, 28 Jul 2020 13:18:26 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 5/5] arm: dts: mt7623: add display subsystem related device nodes Date: Tue, 28 Jul 2020 13:18:00 +0200 Message-Id: <20200728111800.77641-6-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200728111800.77641-1-frank-w@public-files.de> References: <20200728111800.77641-1-frank-w@public-files.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:BrlD/lpiH2E3b3b7Becre33Vm8cjszLu/2SD+JYKvyLrs5fZW/h kxbCfpXSSlfEGZq5VpCGShfMXv+iVQQrIS+V1wEWHld/I4s8vtt4eOH50aDDgHcCvvIaARD zs/xJX53X4i7mv4Z/kKkAHbUeuiuw+y9ghx5nAB+bWxcAhobOFAyeCnYuKlqj9b3XHZz+zR /TEOY+Q/bnB/CIVfl1BSA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:BVkf93G43zQ=:KlzLPO/jav59S0ROnmbWdv qZWHge+631AY1hLkzCEDpyVRaslLskbkWkOFFyJ6JJtit8q28u7snKMzvL03kONKuBWw7Ldpw CPbxKc3jNNRDqa0du4cEmhQ+Bhqs9iOx/dx5JZtqqaZZq4zURIEn10wMu1SYExKjHxoNFiVnv ARW6WjjuLTLOpMCn/vspTIP/iS8dTFB2HS8fouc9qpaWg/myGF1YmZbTSf1sOqqJ4vYNWSYCW 0gKgSrWmRE/MdoAKi9Evix27o4MrlBoYuktf9axtfhY9XGBkpToJKEugrmKMolpZEp4fTy67h zTBCaknBukuJsMB8qEbx0pQ8Ev7tAuaTu3GyaniPnKgHVK7mUwi5SkTtRkcemRW6XRKeWhtaV QDGOpm3vpYO/z+TNBTdndhnMzt4CpXBvQnYyjkiHnpmxLAalsdPLYkyZj35jZebBOgZmCDtBg F8KcXCLa5PFcJ/AXuF0vilcgW5VuIdGHZHNFdz8N9NduHtko28asnIAVlTZ7n5OyiJylQ198T +xVfsz+1A01pgsChCnEk7EMcIahM+tIf+kshw5bL67FqWGcZh6367Gu880ZmMC/32OhDB0Ect CSs4csPuDua8YARxIgQ08hNPlSbL9x5Gz2ACNGXJJD/iclqEno8jZOCNZJWqc35heCG8w2Gns hw5ULkmT/rcDX+yDVCjfyREOMbK1/V+KEnE9JxdByx0i5tth3Trq5r0+Hy6PpVz/o7TFl0USz ei6uGXXWfICmt1sUT/sigRuKdHtZaqPQIEp51kcq2KgAaIAk1jiZ/cqCh0ZjfvOLV0jt5d5Nf 9pT9SiRuAbjXewY3sC2kMTaz5oxCo67Wb7AW14OskS8hlFiyRiZn6XhzpBOBRzkeVM4sOPblZ xlTMTfJUT8xkTVyFUrNT+jZNCoMrcM5b3FNkw5rY6+aMNxuy6QlxqY8gtNLuR/HPqGIqdQmLY Goj011R+v4liOhPjjMnIRV7Ba+69qR+WhCbs0FB9vUfbuBPZKkBbXv1o75Ix+mZXVtLHPLVWf s4d9C3c8Y1E2G2d+8w1oHdeP+yA57jpSJH2nn2M6Avi3v6vZLnmLp6WdFrSbDD9w4b7jgp4xI nsXu9RMTgbxLqA0Scf1FGriQZCkoygGZ33cYK1yHWgR7JPMff/sorpBIag679U760a8zDj8tY mLAwBKb3de1DrDbwOucFRTiUmvOyCsepmAjrkpZkOoNplLJd5WV3AcC1oPzvSaJzR0DYqPYJs wxgIc/9ZWTEYqoQYD9g9qJRxQygJovuh94LVDYQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_071922_339756_DD709865 X-CRM114-Status: GOOD ( 12.27 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.20 listed in wl.mailspike.net] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , Ryder Lee , Philipp Zabel , Frank Wunderlich , David Airlie , chunhui dai , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, CK Hu , Daniel Vetter , Matthias Brugger , Bibby Hsieh , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org From: Ryder Lee Add display subsystem related device nodes for MT7623. Cc: CK Hu Signed-off-by: chunhui dai Signed-off-by: Bibby Hsieh Signed-off-by: Ryder Lee Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich --- arch/arm/boot/dts/mt7623.dtsi | 177 ++++++++++++++++++ arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 85 +++++++++ arch/arm/boot/dts/mt7623n-rfb-emmc.dts | 85 +++++++++ 3 files changed, 347 insertions(+) -- 2.25.1 diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index a106c0d90a52..d584a3d678ba 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -24,6 +24,11 @@ / { #address-cells = <2>; #size-cells = <2>; + aliases { + rdma0 = &rdma0; + rdma1 = &rdma1; + }; + cpu_opp_table: opp-table { compatible = "operating-points-v2"; opp-shared; @@ -321,6 +326,25 @@ pwrap: pwrap@1000d000 { clock-names = "spi", "wrap"; }; + mipi_tx0: mipi-dphy@10010000 { + compatible = "mediatek,mt7623-mipi-tx", + "mediatek,mt2701-mipi-tx"; + reg = <0 0x10010000 0 0x90>; + clocks = <&clk26m>; + clock-output-names = "mipi_tx0_pll"; + #clock-cells = <0>; + #phy-cells = <0>; + }; + + cec: cec@10012000 { + compatible = "mediatek,mt7623-cec", + "mediatek,mt8173-cec"; + reg = <0 0x10012000 0 0xbc>; + interrupts = ; + clocks = <&infracfg CLK_INFRA_CEC>; + status = "disabled"; + }; + cir: cir@10013000 { compatible = "mediatek,mt7623-cir"; reg = <0 0x10013000 0 0x1000>; @@ -369,6 +393,18 @@ apmixedsys: syscon@10209000 { #clock-cells = <1>; }; + hdmi_phy: phy@10209100 { + compatible = "mediatek,mt7623-hdmi-phy", + "mediatek,mt2701-hdmi-phy"; + reg = <0 0x10209100 0 0x24>; + clocks = <&apmixedsys CLK_APMIXED_HDMI_REF>; + clock-names = "pll_ref"; + clock-output-names = "hdmitx_dig_cts"; + #clock-cells = <0>; + #phy-cells = <0>; + status = "disabled"; + }; + rng: rng@1020f000 { compatible = "mediatek,mt7623-rng"; reg = <0 0x1020f000 0 0x1000>; @@ -568,6 +604,16 @@ bch: ecc@1100e000 { status = "disabled"; }; + hdmiddc0: i2c@11013000 { + compatible = "mediatek,mt7623-hdmi-ddc", + "mediatek,mt8173-hdmi-ddc"; + interrupts = ; + reg = <0 0x11013000 0 0x1C>; + clocks = <&pericfg CLK_PERI_I2C3>; + clock-names = "ddc-i2c"; + status = "disabled"; + }; + nor_flash: spi@11014000 { compatible = "mediatek,mt7623-nor", "mediatek,mt8173-nor"; @@ -766,6 +812,84 @@ mmsys: syscon@14000000 { #clock-cells = <1>; }; + display_components: dispsys@14000000 { + compatible = "mediatek,mt7623-mmsys", + "mediatek,mt2701-mmsys"; + reg = <0 0x14000000 0 0x1000>; + power-domains = <&scpsys MT2701_POWER_DOMAIN_DISP>; + }; + + ovl@14007000 { + compatible = "mediatek,mt7623-disp-ovl", + "mediatek,mt2701-disp-ovl"; + reg = <0 0x14007000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_OVL>; + iommus = <&iommu MT2701_M4U_PORT_DISP_OVL_0>; + mediatek,larb = <&larb0>; + }; + + rdma0: rdma@14008000 { + compatible = "mediatek,mt7623-disp-rdma", + "mediatek,mt2701-disp-rdma"; + reg = <0 0x14008000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_RDMA>; + iommus = <&iommu MT2701_M4U_PORT_DISP_RDMA>; + mediatek,larb = <&larb0>; + }; + + wdma@14009000 { + compatible = "mediatek,mt7623-disp-wdma", + "mediatek,mt2701-disp-wdma"; + reg = <0 0x14009000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_WDMA>; + iommus = <&iommu MT2701_M4U_PORT_DISP_WDMA>; + mediatek,larb = <&larb0>; + }; + + bls: pwm@1400a000 { + compatible = "mediatek,mt7623-disp-pwm", + "mediatek,mt2701-disp-pwm"; + reg = <0 0x1400a000 0 0x1000>; + #pwm-cells = <2>; + clocks = <&mmsys CLK_MM_MDP_BLS_26M>, + <&mmsys CLK_MM_DISP_BLS>; + clock-names = "main", "mm"; + status = "disabled"; + }; + + color@1400b000 { + compatible = "mediatek,mt7623-disp-color", + "mediatek,mt2701-disp-color"; + reg = <0 0x1400b000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_COLOR>; + }; + + dsi: dsi@1400c000 { + compatible = "mediatek,mt7623-dsi", + "mediatek,mt2701-dsi"; + reg = <0 0x1400c000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DSI_ENGINE>, + <&mmsys CLK_MM_DSI_DIG>, + <&mipi_tx0>; + clock-names = "engine", "digital", "hs"; + phys = <&mipi_tx0>; + phy-names = "dphy"; + status = "disabled"; + }; + + mutex: mutex@1400e000 { + compatible = "mediatek,mt7623-disp-mutex", + "mediatek,mt2701-disp-mutex"; + reg = <0 0x1400e000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_MUTEX_32K>; + }; + larb0: larb@14010000 { compatible = "mediatek,mt7623-smi-larb", "mediatek,mt2701-smi-larb"; @@ -778,6 +902,44 @@ larb0: larb@14010000 { power-domains = <&scpsys MT2701_POWER_DOMAIN_DISP>; }; + rdma1: rdma@14012000 { + compatible = "mediatek,mt7623-disp-rdma", + "mediatek,mt2701-disp-rdma"; + reg = <0 0x14012000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DISP_RDMA1>; + iommus = <&iommu MT2701_M4U_PORT_DISP_RDMA1>; + mediatek,larb = <&larb0>; + }; + + dpi0: dpi@14014000 { + compatible = "mediatek,mt7623-dpi", + "mediatek,mt2701-dpi"; + reg = <0 0x14014000 0 0x1000>; + interrupts = ; + clocks = <&mmsys CLK_MM_DPI1_DIGL>, + <&mmsys CLK_MM_DPI1_ENGINE>, + <&apmixedsys CLK_APMIXED_TVDPLL>; + clock-names = "pixel", "engine", "pll"; + status = "disabled"; + }; + + hdmi0: hdmi@14015000 { + compatible = "mediatek,mt7623-hdmi", + "mediatek,mt8173-hdmi"; + reg = <0 0x14015000 0 0x400>; + clocks = <&mmsys CLK_MM_HDMI_PIXEL>, + <&mmsys CLK_MM_HDMI_PLL>, + <&mmsys CLK_MM_HDMI_AUDIO>, + <&mmsys CLK_MM_HDMI_SPDIF>; + clock-names = "pixel", "pll", "bclk", "spdif"; + phys = <&hdmi_phy>; + phy-names = "hdmi"; + mediatek,syscon-hdmi = <&mmsys 0x900>; + cec = <&cec>; + status = "disabled"; + }; + imgsys: syscon@15000000 { compatible = "mediatek,mt7623-imgsys", "mediatek,mt2701-imgsys", @@ -1102,6 +1264,21 @@ pins-cir { }; }; + hdmi_pins_a: hdmi-default { + pins-hdmi { + pinmux = ; + input-enable; + bias-pull-down; + }; + }; + + hdmi_ddc_pins_a: hdmi_ddc-default { + pins-hdmi-ddc { + pinmux = , + ; + }; + }; + i2c0_pins_a: i2c0-default { pins-i2c0 { pinmux = , diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts index 2b760f90f38c..7a1763472018 100644 --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts @@ -21,6 +21,19 @@ chosen { stdout-path = "serial2:115200n8"; }; + connector { + compatible = "hdmi-connector"; + label = "hdmi"; + type = "d"; + ddc-i2c-bus = <&hdmiddc0>; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi0_out>; + }; + }; + }; + cpus { cpu@0 { proc-supply = <&mt6323_vproc_reg>; @@ -114,10 +127,24 @@ memory@80000000 { }; }; +&bls { + status = "okay"; + + port { + bls_out: endpoint { + remote-endpoint = <&dpi0_in>; + }; + }; +}; + &btif { status = "okay"; }; +&cec { + status = "okay"; +}; + &cir { pinctrl-names = "default"; pinctrl-0 = <&cir_pins_a>; @@ -128,6 +155,28 @@ &crypto { status = "okay"; }; +&dpi0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + dpi0_out: endpoint { + remote-endpoint = <&hdmi0_in>; + }; + }; + + port@1 { + reg = <1>; + dpi0_in: endpoint { + remote-endpoint = <&bls_out>; + }; + }; + }; +}; + ð { status = "okay"; @@ -199,6 +248,42 @@ fixed-link { }; }; +&hdmi0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_pins_a>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + hdmi0_in: endpoint { + remote-endpoint = <&dpi0_out>; + }; + }; + + port@1 { + reg = <1>; + hdmi0_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; +}; + +&hdmiddc0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_ddc_pins_a>; + status = "okay"; +}; + +&hdmi_phy { + mediatek,ibias = <0xa>; + mediatek,ibias_up = <0x1c>; + status = "okay"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; diff --git a/arch/arm/boot/dts/mt7623n-rfb-emmc.dts b/arch/arm/boot/dts/mt7623n-rfb-emmc.dts index 0447748f9fa0..c86807a676fc 100644 --- a/arch/arm/boot/dts/mt7623n-rfb-emmc.dts +++ b/arch/arm/boot/dts/mt7623n-rfb-emmc.dts @@ -24,6 +24,19 @@ chosen { stdout-path = "serial2:115200n8"; }; + connector { + compatible = "hdmi-connector"; + label = "hdmi"; + type = "d"; + ddc-i2c-bus = <&hdmiddc0>; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi0_out>; + }; + }; + }; + cpus { cpu@0 { proc-supply = <&mt6323_vproc_reg>; @@ -106,10 +119,24 @@ sound { }; }; +&bls { + status = "okay"; + + port { + bls_out: endpoint { + remote-endpoint = <&dpi0_in>; + }; + }; +}; + &btif { status = "okay"; }; +&cec { + status = "okay"; +}; + &cir { pinctrl-names = "default"; pinctrl-0 = <&cir_pins_a>; @@ -120,6 +147,28 @@ &crypto { status = "okay"; }; +&dpi0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + dpi0_out: endpoint { + remote-endpoint = <&hdmi0_in>; + }; + }; + + port@1 { + reg = <1>; + dpi0_in: endpoint { + remote-endpoint = <&bls_out>; + }; + }; + }; +}; + ð { status = "okay"; @@ -203,6 +252,42 @@ fixed-link { }; }; +&hdmi0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_pins_a>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + hdmi0_in: endpoint { + remote-endpoint = <&dpi0_out>; + }; + }; + + port@1 { + reg = <1>; + hdmi0_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; +}; + +&hdmiddc0 { + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_ddc_pins_a>; + status = "okay"; +}; + +&hdmi_phy { + mediatek,ibias = <0xa>; + mediatek,ibias_up = <0x1c>; + status = "okay"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>;