From patchwork Fri Sep 21 03:28:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bibby Hsieh X-Patchwork-Id: 10608999 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 48A2A5A4 for ; Fri, 21 Sep 2018 03:34:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34BF72DD8D for ; Fri, 21 Sep 2018 03:34:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28D032E053; Fri, 21 Sep 2018 03:34:05 +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 AE94C2DD8D for ; Fri, 21 Sep 2018 03:34:04 +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=ONHVH0bTVOxw9cYKERNNTLaNejAanxJuDdh0rpHCem0=; b=j1ypgqHyadqRsk PoI3neQHvS+nEfxOzTGtnS9UU7lr+2kSFkyggQGi24pXkndG2u20/iWDoEPD4S7r4VD2+cZO6HMBY 0t1sadjlGrbMgGBypMLXsgVlCZlSEF/2HhkhlBZpB9hBo/iOYtUfwfhCSpzlZef7SvOEJfLcZ/T65 UHVtDKOdY8IxjGq95+5ryolKimWM1kVmIJJS3wILlpdrRmKnbyAIT/1x/RcHXYWnQfcXslfl6D70t LAfwtwFv2eW7pcEloP0AbtFprzTQW/T7g875A1bmPNZQLxrdQ4ji6T9LLOPTA4gxySq7ZXjFLIB0M p07hB4gWFF8qxZiefSGw==; 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 1g3CCW-0003U1-UF; Fri, 21 Sep 2018 03:33:52 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g3C7g-0000AO-Oe; Fri, 21 Sep 2018 03:29:02 +0000 X-UUID: e197b42766e845da968973214942c28b-20180921 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 575814866; Fri, 21 Sep 2018 11:28:33 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 21 Sep 2018 11:28:25 +0800 Received: from mtkslt209.mediatek.inc (10.21.15.96) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Fri, 21 Sep 2018 11:28:26 +0800 From: Bibby Hsieh To: David Airlie , Matthias Brugger , Daniel Vetter , , Subject: [PATCH v3 00/13] drm/mediatek: support hdmi output for mt2701 and mt7623 Date: Fri, 21 Sep 2018 11:28:10 +0800 Message-ID: <20180921032822.30771-1-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.12.5.2.gbdf23ab MIME-Version: 1.0 X-TM-SNTS-SMTP: CEE4575F981872D3BB4873EEBB53C81D993AE4664EBD137A0871387CFE004CDE2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180920_202852_969947_32D2B445 X-CRM114-Status: GOOD ( 13.69 ) 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. 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 (3): drm/mediatek: implement connection from BLS to DPI0 drm/mediatek: add a error return value when clock driver has been prepared drm/mediatek: config component output by device node port 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 | 106 ++++++++--- 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 | 39 ++++- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 4 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 15 +- drivers/gpu/drm/mediatek/mtk_hdmi.h | 2 +- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 213 ++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 56 ++++++ drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 234 +++++++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c | 204 +-------------------- 13 files changed, 661 insertions(+), 235 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