From patchwork Tue Apr 16 14:58:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10903311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B33217E0 for ; Tue, 16 Apr 2019 15:06:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E25692871C for ; Tue, 16 Apr 2019 15:06:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D659B28989; Tue, 16 Apr 2019 15:06:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D359A2871C for ; Tue, 16 Apr 2019 15:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a+vSJxQAEZiUZo4rYpBGXaoOnGBazaoNOSHwMaoPRsM=; b=APj9C/69qUkFZI C5UI0XhhJVwFgHU848hV9hlFwr55E99HZMAqpvRU66GvOanzsTPQBebluymFEjP6avtWIlXWt1n76 SwsqbmuhpQUz/VoX5BH2ZeSVIIn7+jtv8XE+PnT+ecahoC10M4xAEP9DNeoYaEiv0sDQ+GrZ3rXEf VZrhpUcP1Ss7qVXZkMhWylVqPE63TdiVwWCSt+5o3VmxZjSD44T2cPmBxrtIDxa+qcWZdvPn02ymp qzi5vP5b7RmCUG+CJYsj0RCICqaC0DNMRW3bMQEbnWwPooBVXmVI85tE512a53usg6HX0sgkuQJLQ 8tur1jTOcw6lW0FpK19w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPfF-0004Ce-EH; Tue, 16 Apr 2019 15:06:25 +0000 Received: from mout.gmx.net ([212.227.17.22]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPei-0003Uj-K7; Tue, 16 Apr 2019 15:05:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555427150; bh=vb89RwI58hI4Muw6KGF7jp8e4/iof1jiOcMOYSRKE5s=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=Ovr+q6rIOepBuBVfZBkyydM6SzbNOfkXMIDbI3BDlfYNWMK3VRSH9bg5n56LW79dE mT6qtqTgzdr3h21GOiXhZsITL/6h4Ph2Zso+8Hln3zb2Rqcf1SgGk3/q/2RTaxwvZc P3vLhb5KoRUUoIdD0O7r8v9k2/K2RaZeaH8AI7O0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MQdAP-1hPv0g3zR7-00U6nL; Tue, 16 Apr 2019 16:59:08 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 1/4] drm/mediatek: config component output by device node port Date: Tue, 16 Apr 2019 16:58:45 +0200 Message-Id: <20190416145848.11932-2-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:kF6Fe8nmXqHsGRsCBMzwIHxJsQ4jrJQeH0U7ChtBG+ENZtnMU4P mzP3fZ6LmMQ9wzkXLEtxyhTug7mVNnZ5aRzOFtDq+bXEq6StIN1HuPxF+cEbqgUyw0rBmgQ Grs0BXCKVhhEvUQ8wh8nQ0gJs1jDIDs0wbAfatxsea8E+iWDx3z9vtBnYDPza0MyYsJ+W/X muRpCNbF5TU+fI8/fFP2w== X-UI-Out-Filterresults: notjunk:1;V03:K0:u7ngln1HOEk=:C61x0Riqdh+033hf/ve/gl bfjdwJXpq0WBDVqrDYDHy+c9WTf7vMS7YgKQzZ1a52FZ8SizwMlNR2LyliRNBugSTUmfhT+/q MfceLHrNP0NLk6b/ogQrzVFk/x4obpvUvtMEGvjgcskpaPu5avl1aV6YDlFLrsnW8AFU03rKv 2xCE0zurC+IIetM/IqtYukW3hADGV3dVtOGViIWcTI5hLMGR/aaGvqSy+8wI8H7UNBTmxSA9R tlGSI/RynYUdX25jyaB53QHOnuSff6S3RpooNopQF4EOxgSSK95VenJmJTFyZTwLbJ6VYQMlV z3ciKPK2wB4+oH8rITOSkkRDs22TtGDOYX9vTHjJO5SJd5Ux6Q01f/a9EPiTZqqnGoEufePQ2 9ifpGZAQD05L0cSfCXcRSyFHPiwFXiryuYQfJ/VKAJk9PZ+tQwC6058x2jJuAYUwcUPaU6PiG kSY1t9ujZNfKdlvvNcapqEygLToNdxbCztDA8XXSwBtPo+PwYKopmHl6K+Jtbfp6FXeqNWjoi 0fOcyBN6lt3gI7oQHEl/ILLIa2U6gQ6B+WmGMUKdRVn60UjcaQsgbRqqhgbDiKhnPMcZlToNM DbFiGL1cG1kdUx95Ua0fTjD0/YGbvC5x11oZojWH1qr7A2kPuXRMThAAlYfrQ5TqHrhIxp3Tl 245pPWg7p/YH1b35wEeDyOtK14lSmORHTJnXPnOQLsj1RDEK0J9nKrg56MjSkwEGT/JGFXrv8 5V25zP0in+LEW/G5oZJQEOgjrAFUEPpD+YMtHTFcuNvB88LtBZPVFxH6icD1ZrU+I9nECVLLo zO+HP4CL/+b8lYyFCP9Ei/EdEiQnvrR3ML6UeIWK5va/WnsGriOWRU8HE3J/7Ihm67K/MyYrs aMJFFzvN1CXcHhNsdEqTJKEtNDJHgi/ieFF1OK6ekpul3D5W10nedvURZc836h X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_080552_956491_AD7A9134 X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Bibby Hsieh --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 41 ++++++++++++++++++++++---- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 4 +-- 2 files changed, 37 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 57ce4708ef1b..d3e86426dc65 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -22,7 +22,9 @@ #include #include #include +#include #include +#include #include #include @@ -134,7 +136,7 @@ static const struct drm_mode_config_funcs mtk_drm_mode_config_funcs = { .atomic_commit = mtk_atomic_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, @@ -142,12 +144,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, @@ -157,7 +159,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, @@ -173,7 +175,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, @@ -184,7 +186,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, @@ -479,6 +481,7 @@ static int mtk_drm_probe(struct platform_device *pdev) /* Iterate over sibling DISP function blocks */ for_each_child_of_node(dev->of_node->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; @@ -538,6 +541,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 ecc00ca3221d..256a3ff2e66e 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.h +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.h @@ -29,9 +29,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 Apr 16 14:58:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10903293 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7A549922 for ; Tue, 16 Apr 2019 15:01:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A57E27BA5 for ; Tue, 16 Apr 2019 15:01:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CB8A287CC; Tue, 16 Apr 2019 15:01:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 05EAF27BA5 for ; Tue, 16 Apr 2019 15:01:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=CgTOb1dYxLqtDKzy85lzKq+K6VBSBOoLcH0TCqRuC2c=; b=PYgUghImsHVlakgVbBKwThN0bc 17NCl7aXDu9K3VpTPtqFQtjNiqeLRguiz3ZTbMvOZQ3JW0Swww7mjhyfpos9yO0TgQtOar5ERydcE Cgjz14YtesZOXgzKJ0U1nS9Lap9tNzKFk+wT4Mhfr0+8/iHV8iS9TNW9CIPLM7PFgcSSbWXXp6vNv cayTBEK30jiaGszFBwcWTo9BJg331SzQyPbln7Y7fMa/mqA6gKl8wYQQYyJTQdclMYMZfRR8ofAvT 2RwvJ86sAg0vi1pmrkJcp58TRr8EcsLvS6JEfAfTGn8nEy9i4iw7C4FgcCLuMGEir/t82e8jsk6jl 56x62aKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPaU-00015Y-M3; Tue, 16 Apr 2019 15:01:30 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPZG-0007or-8S; Tue, 16 Apr 2019 15:00:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555426749; bh=cmq3uTCvNem4hMhZFbGqISt7XCnjnlr87tqFEthDUxc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MouFGr/c4CTHWqfu4yfrraeajvLikZEZwMBnpVz9p052qM7L7JAGkG/5Ffnai5wwh XdXvSM+Be2rbduNr546iIWvqYSI9Cgyj+Co8GjDCICWErjVkG0MzYMdf5czTrPou5a XLYXT5ieeMnqT6JMB2qUZNJgo5cEyYYbs6HP+iQA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Mg0IT-1hSB8S09sT-00NRtT; Tue, 16 Apr 2019 16:59:09 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 2/4] arm: dts: mt7623: add display subsystem related device nodes Date: Tue, 16 Apr 2019 16:58:46 +0200 Message-Id: <20190416145848.11932-3-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:xeru4vEJ5OWBm6t9PohoLIQO9YX/PIsODiQ2AJirGabJJ+r5ntM mTQPLEmIrmT4fohcsGVQeIm03nx+mlF5JXmI7ZgLrXVnwQj81NwDtCjjFXguQicPmEWX3Q9 DYU+EVkdOd7go/bdMbHlsBix6sd8FemfReFMo6PoCxgXSqjrYdLJyYLERplM4ELc2JuhfSV ifbpQvxltyYdUMzIJz1BQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:/FyxCRLIKfs=:KRERBqrBKFgNPtbtHAdCIR djcqnLFI0KtjIfCgKs93O3zUggavtjNS/m2xYtCAi0Ta2yXWqzE3JqfWy38ftXw/ON8eYPnXp JnRay9gDmBqPp2QxFL3r8WfFGoEcnMoFsvoP18dllPSV1JW96Q1Y11x8jvhtMuW53zIWTppAo pbk283hHhzvw5nz9+G1BhQWBg5Qab5rpIE8ahanQqenEbK41JQWsL/mF5zvNdPP0abrb4ycoi HhViTARGBKoo9qUHNTbXQH9a7etfbN1SdLXpwZ9EuV4Z/sqQN2U6+dS16WK7jMirmHVwetnZf BKS8dmyfwhoaP6nFA5TJMRZUKnkobLxgyl7mEo39ZVxa9k5UZspqpisFONjH4cx3L6EOFJc+Z wFXl7OMR3PcQpzU6W8Sw92fEpACMA6L6wTTv9fnGDh0vfLNs+72Y3lXmEYbL61kbgdJwDN6+p +03WbwaMxmYjPv/5kh64B2kJpAHPtCbetmagX8e6Ga7HQEdw9UmHfqClfDlX39726C4AM3GBm KsSQObaCcswPA5xOTK2Q3rHgCiQ6kCT6a9kFcI6xK93Z9DQtqmOpJ9kc18TtPEJe8nh6dk0Iz KrkMaYTSB+HwwsLTdReTLFduuon2lc0xlvzWvWW5vjry9wiYlr+KuOd+IfpPy6Tp2yuKVa+im Rafly169Q4IznLdGICPEgH7PuEsL+l10ynqLNu4bg+Jq3kCpvG7yAqWkObIgEn8Lss2C7h/3S iE/enmUWtnf85RiVB0kcrWWFushCLsfUeQr6TDs1qYRaRqCD1vTYApVrUrIwma3DF3XcP1nyo v6HX2jmc7H35ae/WRyJhKdOKbFea+Z0MbwMZn75hnskBEHp1nsGhRt9D5ef7NSXZY6ExC4BW/ sEv2zHU6C73I0+6K2YpQj/y4IjD7qpGHzUtJYglSLpPp7kASqvcLf3Xfn/FVoG X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_080015_102218_6DEE345F X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 additional fixes: [hdmi,dts] fixed dts-warnings author: Bibby Hsieh [dtsi] fix dpi0-node author: 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.17.1 diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index 59e69f3dffa2..f1880ff04193 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -23,6 +23,11 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + rdma0 = &rdma0; + rdma1 = &rdma1; + }; + cpu_opp_table: opp-table { compatible = "operating-points-v2"; opp-shared; @@ -320,6 +325,25 @@ 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>; @@ -368,6 +392,18 @@ #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>; @@ -567,6 +603,16 @@ 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"; @@ -741,6 +787,84 @@ #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"; @@ -753,6 +877,44 @@ 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", @@ -1077,6 +1239,21 @@ }; }; + 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 @@ 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 @@ }; }; +&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 @@ 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 @@ }; }; +&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 b7606130ade9..3e5911d8d6bc 100644 --- a/arch/arm/boot/dts/mt7623n-rfb-emmc.dts +++ b/arch/arm/boot/dts/mt7623n-rfb-emmc.dts @@ -24,6 +24,19 @@ 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 @@ }; }; +&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 @@ 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"; @@ -202,6 +251,42 @@ }; }; +&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>; From patchwork Tue Apr 16 14:58:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10903301 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC27113B5 for ; Tue, 16 Apr 2019 15:05:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D6FA28587 for ; Tue, 16 Apr 2019 15:05:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 910D828986; Tue, 16 Apr 2019 15:05:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 39A5928587 for ; Tue, 16 Apr 2019 15:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=oQ3+v1HU+QStvLsFiaf+sL+vwJFUICoTiyO9j8SGtV8=; b=H8XPZOJaJFwOwZVDow3AYZuKnT sqbAE+8kracoTiyznPiprRK9w6J50iOQC95U3WUbFxcWfRbqUPoP6pbHhKFBeLm64K8Q2P8vpIwUR TqJQXMNVTEVhZHm6BaRzaN0bocstRlHRYT/v4bB5hRkmlfxl/lp5WNBmjmMOZ1/J2tiKYrkI+RjEe PnwkuF6EoQ4vTXWCYQn8qeKn+o9LOmxue6Z6MJoOMHGgUxtD9osvzw89Fg7A6pQqUGf0KEzLLaAJt avp3xuKONQad8Tzwnpf2rSJVL7r1X0nylEZg64YMVjEUI4xynW1pmVwA8wyTTkX2rXlzFX8kdMluX 7rfgReqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPej-0003VS-Go; Tue, 16 Apr 2019 15:05:53 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPeg-0003UD-CX; Tue, 16 Apr 2019 15:05:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555427149; bh=V+zaO1oNND4YPt599ysKBo3HAApCHzDDfia1P8jPJ5Y=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OvBi+gRm5IbrXV4qI6TZWOWZCGZ0eiU8Zl169euiYmj88nAqOg6w/7xt48Kr90iSL AHnaSC4GfMgPZygpcgL8fTkwnYUNTbFhCPh4RzRPgZh3SBVT/kOKS2VBqFf0+9ktZP fgWA9pVAOIHOStvLB3zDeQSZE/7JqK2wYDUqJBI4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MCwbX-1h7qxh0exv-009fzp; Tue, 16 Apr 2019 16:59:10 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 3/4] drm/mediatek: fix boot up for 720 and 480 but 1080 Date: Tue, 16 Apr 2019 16:58:47 +0200 Message-Id: <20190416145848.11932-4-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:PiJgWiG+Mo0uMUDwX8rwuLcYg4MxdatLBtp4pICKQlJHr2Nhy2T T75TERfqyQkmhcL4Wz6tnIJ5JYuJgNoc+hpit4D33Rh6xcvtyODJUfViYejgx3O1xSGcJXs xSIRqq67asWYV61vY+hp+pW1S0LtdVOr9xX9e1c8UrNcMh7lTjoQI9R/jkiIDGRHJ1psbY/ dE0Pc/BS2OxQt7q8WFNmg== X-UI-Out-Filterresults: notjunk:1;V03:K0:8nqKLC66Sds=:uVMJbrfHa6X+713ju45EEU EIa3QOUZAavkEQ8CKf5COQwhzoPPSdvr13JC/eo107c3RgmaWPfYOaMysJjrFXTDJIaQ1zn85 acLqQL0vxzkOzMtH1KxaOGnrcNP/VIZO3+tJI7x5hgf66sRLSMqqOJgTI+P84393fLIdtEiM2 8q5MczjPYwr9WYtIAt5wLzLkw0q1qCkik4WxUU5VgtEaNpiyxwdXz5pnDO/7Kw8oyEveFrSTB wHjl6qqNfrYNrbUzcRWR/P+Kv1blfee0NzI+GgzHOJAcDFh3/HSLse+jZFWGZsus4IXH7B8L+ eD209VzUqangmokcSmfogvqIdthkUFgPF67sXgu815D3gwFPBkJjBd5M/kKWW1wFgO7MW56PD 44vyZPHhzA9OR/+y0mYDzyRqPREcshMVyrPpLW3osSmp1lN5OxZBNgVl+5FTMtyGX3ECqIOcb MtogjFXJLu0Rt69Ge9XGxGDEfmzDlQA2oBLHyDolyuhRzuowN10aixqbY8/yZVIdpEG3qOxSa wdHVcjrnOD6hSukHxRRh7nFwd2c6c0T4K3CtMdM43ZvQ+OyMuNzPufuanrN6LplT4az08GO3I iLOuG9d5NnoQaBeChOM57BH25hfKkViUQCvPRfyOsCrP86DGMN1W3c5ui+Q0D3FhIQiKb5gJ9 gvhmJCYlG1pjNG+vnu38nnpGF30W5UMEa00twMS8YFafmtD0MxH93MNdpwOWqz8kGtXf6Bqr1 9t8FCz3asBl0/qTtcO5woJXd23ogNrcHsRD3t2IGIf83X0eZS7CedSYya5CRiD5KQh+vEyJ9H UMO2AqiDMeYX9FvblEj4zsTGIYxdhOVcDYbmE00bC8dpkx1EONjeBxeluOz6Fq2oEpuYWrs0Z 3zERpmX1LVtRWri1uSa3HK0+J3nApklE67r3ZHIbyYo2P3e6x7viTxLpFn5TQm X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_080550_762393_4A2495BE X-CRM114-Status: GOOD ( 10.20 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: chunhui dai - 1080 plg in/out with ng/ok - support other resolutions like 1280x1024 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.17.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 Apr 16 14:58:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10903307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC4C113B5 for ; Tue, 16 Apr 2019 15:06:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ED0828988 for ; Tue, 16 Apr 2019 15:06:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82A6E2898B; Tue, 16 Apr 2019 15:06:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2C44828988 for ; Tue, 16 Apr 2019 15:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=r3Tq30bzTmouxACDKkdfC5CpjXZZBdVfx+i0Z+2NBU0=; b=dOFWfCITTnuBTB Ww+aeyio122/fzwCXAYEmOiylZ+/+xsJazDNBYpHht6NjlJuIEChgszAK6EWUuqncNQIYFUW7Ac8g k8IjChQuCti45kjKmlbiVgt+XKLK9WAL29nL93QkFMmztfhgPMlGerS5rNGgiCsbVXSdjVKwLOVSu jdnATUmUnww8OgkPHMwWncz54DKzAefQAk1nQ1YRFa3+tbAMUbu7qZ1f8+SuSllPAblnq4IfyMPCX ek1mOG+/r/pvhFv0qodyi6TAw9ZRbvzqabXx2U/9dTJ3V2q0hPoeenXeawc2KriDfAgp+6LDhlpNY cjUU3HRqAMVi97hLoPhQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPf1-0003sN-Pj; Tue, 16 Apr 2019 15:06:11 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPeg-0003UC-Bn; Tue, 16 Apr 2019 15:05:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555427148; bh=Y8YBUeQRMwzr7J9CrhokVN2JmnDLZgiR6/FvJ8s0awA=; h=X-UI-Sender-Class:From:To:Subject:Date:In-Reply-To:References; b=DfJK3+wJUq+0l9oL9Ica3iTH7rQaRgQyeMkyen9ACyXZ571izEdw7wEWiMz8TpcPI g8tAvSELKhvpLzygWt+HhqDxKyFGCQhjbywSK3w5fsBpiXUtDDzNEB1UjsAKei4/3/ gK4KPErctGMrTukZ2gTEE+s2lH2xeJTrlPaTdc/s= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LsOsW-1grxln1gwy-01242I; Tue, 16 Apr 2019 16:59:11 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 4/4] drm/mediatek: fix possible_crtcs Date: Tue, 16 Apr 2019 16:58:48 +0200 Message-Id: <20190416145848.11932-5-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:9GPlP7IlVWKnFgYWpkxNnSyxoKqbdPAOhYPuzOGEhvtnm/dnvDc u0aZ6E09ZQ+c0lL/CBmKiBqESl128QUe38K6t0MlPeCuzA8eJMORcnnA2iNslAeyJ+0Z2lC I36MEpQImXtGi5bdpUsnPLatQQ8f2w+RitysYEOi3Q7SqESYkKXRwwvHzoL8heMo24QY9+D Fe0s0ddS+mVFkZU3RW9HQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:cbKNyQZYXSQ=:lW1Ilk6Sz5Kn2iECfgQxyq qwUx7vDd6kTmAWs5cYb4lC4Ss4MoX1VLGkBEwDMrWvstvV+BSYHhvQxp5dSagP4EDxAgvAQVi zcnHduWxVyEufcXrTIlq3JamGdV6Lshs3C17ywGf2snS3qPPPC6+oE2x+nsAT/obWcGLoAk8C qJoIBWCT+gGvdZWzen2w7Np2P8NvgRGB4k7t9FIqLlEvSGfM0CeYnCkUO+lV3vsP2DFJ0qVhT lzGZMD4o+W8A6A+pwYlXR251WBUYpuD0GzWz/vFXJr1an/PeokTqbfZvJwqwhYNf8Fefx4MlM 9Fo1kivyNf7tBsXlJ+LFp6QV5Yal2xE0oNe8/hXA+tgWVzSBzUYLlvnysguxfsecgEUjy+t85 espgKmZh9dAtQuERlwbIRw2lw+lBbco/Z4fKYrXw/5GdMfmobwdOzHzNu6D1W/oTqkPf3Bn49 BQEG0XeV1bg6VmWD+udAxpKc12y5PkkV0k4N5R+4XyBZNTwowTW7BKNrkUeQnzlmBRoclLcw8 nsX48PqJLGsWAZm8cAhPIWTkL96FUxk19fyLQA+lnUnfJGN7MsNOhAodJGPsegLKefDEOkPTo PSKY7QcU5flO1LQEcYRVs5utU62wXdexPj8/A589fePpR6CZCqYIXsn3a4+8K9M/KitHKrM0u z0QOp9pH2ev+4o96fx87uPfyqj2SBFekL72bxhXD68cVcPO4ckMbYPfwIj/htGFF8seoxy8k9 1eqN8+UuWMuvg9loRi698kMgXEG5ewp5hCpJ6Iu5McqUalW8bVzASg/BDPpN4esjO4zf5hMxo 3ZCEJxxZInwRl5RXMqtZkzzom1JYidkgR0ioa3yTn2JvY3jVzE1Y64viORe2r2CkJkejcjqMg 2KJFKNtRuVjx9gydoDwGjOBMz4l29gawQffaLaEt4cTyC3zf/7kvrx7PknY0Gr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_080550_699706_34F8CCED X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ryder Lee without this patch there is purple stretched font on fbconsole source: http://forum.banana-pi.org/t/kernel-4-19-rc1-for-testers/6618/52 Signed-off-by: Ryder Lee Tested-by: Frank Wunderlich --- drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index 5d333138f913..c171b01f77e0 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -610,7 +610,7 @@ 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 = BIT(0)|BIT(1); ret = drm_bridge_attach(&dpi->encoder, dpi->bridge, NULL); if (ret) {