From patchwork Wed Aug 7 08:46:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitao Shi X-Patchwork-Id: 11081703 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 409641395 for ; Wed, 7 Aug 2019 08:47:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E970289BF for ; Wed, 7 Aug 2019 08:47:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2277B289C2; Wed, 7 Aug 2019 08:47:46 +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,UNPARSEABLE_RELAY 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 CCAED289BF for ; Wed, 7 Aug 2019 08:47:45 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=CHqD0ZzesNGZXBB38kNMKjORk0rkyDOrLiuCKJS438M=; b=V+U3MffXCpFh2u yG3xNaPM1e7ovVMvobfTH9yjrTpX+80SbCBesMQCCLu3zpsGkUcaeFLp9PtxdFLymIUEtnpzfYCsg ElDAj8BXbzo65OF30mAQRyiKu2UZjjf26gfH7FDWEqbnPA65ogY6pBqhdgGXC3XTpqaSZi0QdQ3JH toW35oBkbFQTPaMBfB0H5vDblWAJtnrzSaii9goighkBGpwaWoJcwu3fyyOGWHj/comNoMlBw+4HT BNSHvzCM8Srg4jIfAq91MkuXAMQYovT1jNLBGJnbYBsQ/6TF/yFa2NDPvil9ldflNHDcAutRbzJ0T ZhM29to4wTD0A6cKPbXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvHbl-0007AO-Cm; Wed, 07 Aug 2019 08:47:45 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvHb7-0006kt-0O; Wed, 07 Aug 2019 08:47:06 +0000 X-UUID: ca9be5d934934f5da0521c1625c7c5fa-20190807 X-UUID: ca9be5d934934f5da0521c1625c7c5fa-20190807 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 743791507; Wed, 07 Aug 2019 00:46:55 -0800 Received: from MTKMBS33DR.mediatek.inc (172.27.6.106) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 7 Aug 2019 01:46:54 -0700 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33DR.mediatek.inc (172.27.6.106) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 7 Aug 2019 16:46:48 +0800 Received: from mszsdclx1018.gcn.mediatek.inc (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 7 Aug 2019 16:46:46 +0800 From: Jitao Shi To: Rob Herring , Pawel Moll , "Mark Rutland" , Ian Campbell , , David Airlie , Matthias Brugger Subject: [PATCH v6 0/3] Support mipitx for mt8183 Date: Wed, 7 Aug 2019 16:46:42 +0800 Message-ID: <20190807084645.63738-1-jitao.shi@mediatek.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.1684-8.5.1010-24828.001 X-TM-AS-Result: No-6.934100-8.000000-10 X-TMASE-MatchedRID: angWuI+ZklDHO8eAxCOj9iAI8aJmq0jwEypq3q87aEEL9Tj77wy87Pib PPdYWnRM+F2zlPAdpe6A45NLifUOpj3qUaC7D/bC/1dEgwtQ6NBcaNB/u5yQq8z/SxKo9mJ4NHw BAGIh28uVta6x57a42xw8w8GZWTrwoqClLVAxl2VDiyuN5FvFNj+k5IvvZ1N/mvnco5r4a3OjxY yRBa/qJcFwgTvxipFajoczmuoPCq1guV9FslmIPhw7K8UtBQeEp3IVzZN0+VdcN1xZFcfLHXIs9 fkcQeBP X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.934100-8.000000 X-TMASE-Version: SMEX-12.5.0.1684-8.5.1010-24828.001 X-TM-SNTS-SMTP: 64327E99D620C0FC25FBF80F2165C701713A62B3F7AA8C8E730E2B111128E7202000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190807_014705_077352_FE9EC6DA X-CRM114-Status: UNSURE ( 7.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stonea168@163.com, dri-devel@lists.freedesktop.org, Andy Yan , Ajay Kumar , Vincent Palatin , cawa.cheng@mediatek.com, bibby.hsieh@mediatek.com, ck.hu@mediatek.com, Russell King , Thierry Reding , devicetree@vger.kernel.org, Jitao Shi , Philipp Zabel , Inki Dae , linux-mediatek@lists.infradead.org, yingjoe.chen@mediatek.com, eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org, Rahul Sharma , srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, Sascha Hauer , Sean Paul Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Change since v5: - remove mipi_tx->ref_clk - remove mt8183 pll prepare unprepare Change since v4: - fine tune the mipi_tx->ref_clk and mipi_tx->pll sequence 1. Prepare mipi_tx->ref_clk 2. Prepare mipi_tx->pll 3. Enable mipi_tx->ref_clk 4. Enable mipi_tx->pll Changes since v3: - turn off PLL before setting PLL parameters. Changes since v2: - update Acked-by: Rob Herring - update mt8183 max bit rate support Changes since v1: - update dt-bindings document for mt8183 mipitx. - remove mtk_mipitx_clk_get_ops and assign clk_ops in probe. - fix the lincence - remove txdiv1 from mtk_mipi_tx_pll_prepare Jitao Shi (3): dt-bindings: display: mediatek: update dsi supported chips drm/mediatek: separate mipi_tx to different file drm/mediatek: add mipi_tx driver for mt8183 .../display/mediatek/mediatek,dsi.txt | 4 +- drivers/gpu/drm/mediatek/Makefile | 2 + drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 338 ++---------------- drivers/gpu/drm/mediatek/mtk_mipi_tx.h | 49 +++ drivers/gpu/drm/mediatek/mtk_mt8173_mipi_tx.c | 289 +++++++++++++++ drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c | 150 ++++++++ 6 files changed, 515 insertions(+), 317 deletions(-) create mode 100644 drivers/gpu/drm/mediatek/mtk_mipi_tx.h create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8173_mipi_tx.c create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c