From patchwork Tue Oct 2 08:10:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bibby Hsieh X-Patchwork-Id: 10623241 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 591CE13BB for ; Tue, 2 Oct 2018 08:38:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A3A627F8E for ; Tue, 2 Oct 2018 08:38:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2ABDB27FA5; Tue, 2 Oct 2018 08:38:16 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=unavailable 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 BA9C427F8E for ; Tue, 2 Oct 2018 08:38:15 +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=36RZZo+HjRpQJjdmYcktn0mv4Yie5xQ2AMXiX3tc5qI=; b=bWT+/1lY7ofj2T Gp+4tVlNt8yxgoro2aX14DSVvz3miW5EDluyVAGtp4LOHWSds6uoDcLihfb4mPJ28t7/8RQB06dHI CdXA4zQKtQEXgrwzg4P/rHrGc0uEvmtbmg6bLZ6zdK/QY/i56t5nB3dD9EkHKVDOxqcVeU308JlZE +bNd58R/PqM6HtoACK9CrhDCBQ9fHRgu+gFwfd1HYpuXpE7IiMLs4BkSsCQfyPtrwFUfvaSlMxpay Ca6jj3Yr8zS7glPGcTDGlDyw8wyvAA3HcHXxQnAT9LQLnRyg4GrepOLx8QiIAe0lbPkiRIqJcDEAT +BoYLkQxcsMqdxTVK7LA==; 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 1g7GC0-0001W1-LR; Tue, 02 Oct 2018 08:38:08 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g7Flv-0003RO-SU; Tue, 02 Oct 2018 08:11:34 +0000 X-UUID: b302491698d44173975e96b2d4bc4a69-20181002 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1016097981; Tue, 02 Oct 2018 16:10:45 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 2 Oct 2018 16:10:43 +0800 Received: from mtkslt209.mediatek.inc (10.21.15.96) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 2 Oct 2018 16:10:43 +0800 From: Bibby Hsieh To: David Airlie , Matthias Brugger , Daniel Vetter , , Subject: [PATCH v4 00/11] drm/mediatek: support hdmi output for mt2701 and mt7623 Date: Tue, 2 Oct 2018 16:10:30 +0800 Message-ID: <20181002081041.32629-1-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.12.5.2.gbdf23ab MIME-Version: 1.0 X-TM-SNTS-SMTP: FA615D565FF1EB0A30583E0BA52DD5A692208EAD99EA5E107072113D806F1B862000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181002_011112_082236_03439370 X-CRM114-Status: GOOD ( 13.52 ) 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: Bibby Hsieh , linux-kernel@vger.kernel.org, Cawa Cheng , Mao Huang , CK Hu , Thierry Reding , Philipp Zabel , Yingjoe Chen , Sascha Hauer , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to support HDMI on mt2701, we have to make some modifications. 1) Add the HDMI driver. 2) Add the DPI driver. 3) Add a mechanism that config output component by dts. Change since v3: - Remove drm/mediatek: config component output by device node port patch, we will push another patches to flexibly config the component output. - fixup the return value - replace dpi->power_ctl and power_sta with reference count mechanism. - move the common function to mtk_hdmi_phy.c/h Changes since v2: - Fix the typo in commit message. - Remove const of reg_h_fre_con in the mtk_dpi_conf struct - Remove unused error log - Use lower casee for hex number - Use common API which defined in mtk_hdmi_phy.c to reduce code size - Implemet the enable/disable of phy_pll_ops the same as 8173 - Move the common header to mtk_hdmi_phy.h - Remove the including of debugfs.h NOTE: - add description about thecoponent output in the binding document in v4. Changes since v1: - Separate some patches to independent patch. - add DISP_REG_CONFIG_DSI_SEL and DISP_REG_CONFIG_DPI_SEL configuration in the condition of BLS&DPI0 connection. Changes since v0: - Correct some typos in commit message. - Fixup the build warning (tmp variable didn't be initialized) Bibby Hsieh (2): drm/mediatek: implement connection from BLS to DPI0 drm/mediatek: add a error return value when clock driver has been prepared chunhui dai (9): drm/mediatek: add refcount for DPI power on/off drm/mediatek: move hardware register to node data drm/mediatek: adjust EDGE to match clock and data drm/mediatek: add clock factor for different IC drm/mediatek: convert dpi driver to use drm_of_find_panel_or_bridge drm/mediatek: add dpi driver for mt2701 and mt7623 drm/mediatek: separate hdmi phy to different file drm/mediatek: add support for SPDIF audio in HDMI drm/mediatek: add hdmi driver for MT2701 and MT7623 drivers/gpu/drm/mediatek/Makefile | 5 +- drivers/gpu/drm/mediatek/mtk_dpi.c | 131 ++++++++------ drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 2 +- drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 14 +- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 + drivers/gpu/drm/mediatek/mtk_hdmi.c | 15 +- drivers/gpu/drm/mediatek/mtk_hdmi.h | 2 +- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 235 +++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 60 +++++++ drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 212 ++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c | 226 +----------------------- 12 files changed, 627 insertions(+), 279 deletions(-) create mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi_phy.c create mode 100644 drivers/gpu/drm/mediatek/mtk_hdmi_phy.h create mode 100644 drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c