From patchwork Fri Sep 20 09:04:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitao Shi X-Patchwork-Id: 11154097 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 34F421599 for ; Fri, 20 Sep 2019 09:05:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 125452054F for ; Fri, 20 Sep 2019 09:05:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TTaC3UnG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 125452054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com 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=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=+AyNGqMXEWWB55t+u1I/RX2U6qbKcSAlgmyB0z3G2ik=; b=TTaC3UnGMtNS9z xUB99jLiiPQV8AfyatJ+XEipy9MwcjHoWuM5A6voyi9Kf+xUz2laA3XI/H5o7XzUVCemfQ+aKKdg6 fssZrjkyz1Ek3qNq86F8fuBswqtrBCO9meVGJz30npwn/oTwk7Xb7AzHWJjmPRM3boEjEQwpkfIhU CgkzWQRPEPYooURjx3pY6fMKPKcSizOSCtshUoOtfxTr1LI7BNhzDjj+5H/853blp1TnCzlaP0TFr 9G7jwQnP66sHEP8dNdOYRKr5m3qLfPpBMlRlQ090LhF2onDtNb7BSw+OWsFgGAXUeq0Gp8FY5Uc48 mxHx3XqRPe29QAsBOZCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iBEqf-0002Oy-Ug; Fri, 20 Sep 2019 09:05:05 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iBEqY-0001os-Tv for linux-mediatek@lists.infradead.org; Fri, 20 Sep 2019 09:05:04 +0000 X-UUID: afa934278a6442729d2929b06016dc43-20190920 X-UUID: afa934278a6442729d2929b06016dc43-20190920 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1448671781; Fri, 20 Sep 2019 01:04:49 -0800 Received: from MTKMBS33DR.mediatek.inc (172.27.6.106) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 20 Sep 2019 02:04:49 -0700 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS33DR.mediatek.inc (172.27.6.106) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 20 Sep 2019 17:04:39 +0800 Received: from mszsdclx1018.gcn.mediatek.inc (172.27.4.253) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 20 Sep 2019 17:04:38 +0800 From: Jitao Shi To: CK Hu , David Airlie , Daniel Vetter , Subject: [PATCH v7 0/5] Support mipitx for mt8183 Date: Fri, 20 Sep 2019 17:04:27 +0800 Message-ID: <20190920090432.3308-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-24922.005 X-TM-AS-Result: No-7.246900-8.000000-10 X-TMASE-MatchedRID: FtlMm0id6DqKhA2hG2DTqzfu+RTlciXg3I10sp4Pur5UjspoiX02F1cI P2h8KmtmWoORQFltGbfQIxN5t4Wy6qG06k9cn1gVx5sgyUhLCNuiNCtus+nPOlhs8uimgHNCJGZ 0d4KSzVJ7rorDYcwGp6DYSStiU7K3JFTEHHYFNqkD2WXLXdz+ARNWFLeBYxoxjlFfNjQx+AJMEn lUJ0kvxRs/944ZgrxWgDLqnrRlXrZ8nn9tnqel2DsAVzN+Ov/s1wB/JHTYLFjBswPqxB5nQXoGZ l6/B6fpP4ecY9MSVqwi07x2VoFGHQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.246900-8.000000 X-TMASE-Version: SMEX-12.5.0.1684-8.5.1010-24922.005 X-TM-SNTS-SMTP: E72900222F02D4BCBCAF82A04967990AB9DF57EDCF8207DAC548FF615E30579E2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190920_020502_658353_5B25D51D X-CRM114-Status: UNSURE ( 6.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 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: Jitao Shi , srv_heupstream@mediatek.com, stonea168@163.com, cawa.cheng@mediatek.com, sj.huang@mediatek.com, linux-mediatek@lists.infradead.org, bibby.hsieh@mediatek.com, Matthias Brugger , yingjoe.chen@mediatek.com, eddie.huang@mediatek.com Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Changes since v6: - add the mipitx driving control in device tree. - config mipitx impedance with calibration data. Changes since v5: - remove mipi_tx->ref_clk - remove mt8183 pll prepare unprepare Changes 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 (5): dt-bindings: display: mediatek: update dsi supported chips drm/mediatek: separate mipi_tx to different file drm/mediatek: add mipi_tx driver for mt8183 drm/mediatek: add the mipitx driving control in device tree drm/mediatek: config mipitx impedance with calibration data .../display/mediatek/mediatek,dsi.txt | 15 +- drivers/gpu/drm/mediatek/Makefile | 2 + drivers/gpu/drm/mediatek/mtk_mipi_tx.c | 344 ++---------------- drivers/gpu/drm/mediatek/mtk_mipi_tx.h | 51 +++ drivers/gpu/drm/mediatek/mtk_mt8173_mipi_tx.c | 289 +++++++++++++++ drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c | 220 +++++++++++ 6 files changed, 603 insertions(+), 318 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