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: 10623203 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 06EB1112B for ; Tue, 2 Oct 2018 08:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7BAE28703 for ; Tue, 2 Oct 2018 08:13:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB53E2873D; Tue, 2 Oct 2018 08:13:53 +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=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 6521C28703 for ; Tue, 2 Oct 2018 08:13:53 +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=MMhm1iUQ66b3jRqytqC3rInc7QniZsO4F2hu+St2fwQ=; b=oWrJmiPUMUMjvo u+6JbBsjwjA30g4uxzd+4Wpxj7x6VgoZgg2JniR1izNaOzhC17+lDqfCWiapFYHMeJIQ5oEompdaQ AxlapBXC4yTnj1dVFYTV1Q92vB0qhbhuEaT4Z7sWCvHhOzJ5XJCzgfL1w/T4WN9vVJ9Quyew999pg 44fMspwCdolDthVmnzHNa+8OgC6xQ7vwXa8sQo6UP1T5wy6Ba4XxUfPH2FL2jQu+dKNSTCO1ebeM1 3HhCOCJWW3nIwqzpQNYTrn07/Ey8ZgdReO7Kk7yK6g5osmQq5vku3oI36O8zYoK5GJTrFLfTAf3zT PmeQ9pxQkOUDHHiWEZXQ==; 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 1g7FoK-0004k9-HR; Tue, 02 Oct 2018 08:13:40 +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-arm-kernel@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 , Daniel Kurtz , Mao Huang , CK Hu , Thierry Reding , Philipp Zabel , YT Shen , Yingjoe Chen , Sascha Hauer , linux-arm-kernel@lists.infradead.org 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 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