From patchwork Tue Mar 31 15:57:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Kuang Hu X-Patchwork-Id: 11468023 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 F1076159A for ; Tue, 31 Mar 2020 15:57:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 CFD8D2173E for ; Tue, 31 Mar 2020 15:57:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="BESI4iYI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFD8D2173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E56446E33D; Tue, 31 Mar 2020 15:57:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE2C46E33D for ; Tue, 31 Mar 2020 15:57:36 +0000 (UTC) Received: from DESKTOP-GFFITBK.localdomain (218-161-90-76.HINET-IP.hinet.net [218.161.90.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 76D4B212CC; Tue, 31 Mar 2020 15:57:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585670256; bh=Z34pspBhqMJqahd4MffOLhAEomB14DsGzR3OqdRcvaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BESI4iYI7S4LZ8V9oksT3+mHeXn5MARHjZOFPsanwIhqTA2BoqoTS1zPJkHEPUcMa ONGAMtYGeRtOoOrAHgkK1Flwjbnc9jXxszztSVvlONLW8RSKybN9gFpgwi9gRK9FYH R5jkxCSLv8jpUpgRUUcghlP4JUqvhb0OIF6/TmJM= From: Chun-Kuang Hu To: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Chunfeng Yun , Kishon Vijay Abraham I Subject: [PATCH v3 1/4] drm/mediatek: Move tz_disabled from mtk_hdmi_phy to mtk_hdmi driver Date: Tue, 31 Mar 2020 23:57:25 +0800 Message-Id: <20200331155728.18032-2-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200331155728.18032-1-chunkuang.hu@kernel.org> References: <20200331155728.18032-1-chunkuang.hu@kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: CK Hu tz_disabled is used to control mtk_hdmi output signal, but this variable is stored in mtk_hdmi_phy and mtk_hdmi_phy does not use it. So move tz_disabled to mtk_hdmi where it's used. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu Reviewed-by: Chunfeng Yun --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 22 ++++++++++++++++--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - .../gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 - 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 5e4a4dbda443..878433c09c9b 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -144,11 +144,16 @@ struct hdmi_audio_param { struct hdmi_codec_params codec_params; }; +struct mtk_hdmi_conf { + bool tz_disabled; +}; + struct mtk_hdmi { struct drm_bridge bridge; struct drm_bridge *next_bridge; struct drm_connector conn; struct device *dev; + const struct mtk_hdmi_conf *conf; struct phy *phy; struct device *cec_dev; struct i2c_adapter *ddc_adpt; @@ -230,7 +235,6 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black) static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable) { struct arm_smccc_res res; - struct mtk_hdmi_phy *hdmi_phy = phy_get_drvdata(hdmi->phy); /* * MT8173 HDMI hardware has an output control bit to enable/disable HDMI @@ -238,7 +242,7 @@ static void mtk_hdmi_hw_make_reg_writable(struct mtk_hdmi *hdmi, bool enable) * The ARM trusted firmware provides an API for the HDMI driver to set * this control bit to enable HDMI output in supervisor mode. */ - if (hdmi_phy->conf && hdmi_phy->conf->tz_disabled) + if (hdmi->conf->tz_disabled) regmap_update_bits(hdmi->sys_regmap, hdmi->sys_offset + HDMI_SYS_CFG20, 0x80008005, enable ? 0x80000005 : 0x8000); @@ -1688,6 +1692,7 @@ static int mtk_drm_hdmi_probe(struct platform_device *pdev) return -ENOMEM; hdmi->dev = dev; + hdmi->conf = of_device_get_match_data(dev); ret = mtk_hdmi_dt_parse_pdata(hdmi, pdev); if (ret) @@ -1765,8 +1770,19 @@ static int mtk_hdmi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(mtk_hdmi_pm_ops, mtk_hdmi_suspend, mtk_hdmi_resume); +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt2701 = { + .tz_disabled = true, +}; + +static const struct mtk_hdmi_conf mtk_hdmi_conf_mt8173; + static const struct of_device_id mtk_drm_hdmi_of_ids[] = { - { .compatible = "mediatek,mt8173-hdmi", }, + { .compatible = "mediatek,mt2701-hdmi", + .data = &mtk_hdmi_conf_mt2701, + }, + { .compatible = "mediatek,mt8173-hdmi", + .data = &mtk_hdmi_conf_mt8173, + }, {} }; diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h index 2d8b3182470d..fc1c2efd1128 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h @@ -20,7 +20,6 @@ struct mtk_hdmi_phy; struct mtk_hdmi_phy_conf { - bool tz_disabled; unsigned long flags; const struct clk_ops *hdmi_phy_clk_ops; void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); diff --git a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c index d3cc4022e988..99fe05cd3598 100644 --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c @@ -237,7 +237,6 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) } struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { - .tz_disabled = true, .flags = CLK_SET_RATE_GATE, .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, From patchwork Tue Mar 31 15:57:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Kuang Hu X-Patchwork-Id: 11468033 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 B15271668 for ; Tue, 31 Mar 2020 15:57:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 8FFD3212CC for ; Tue, 31 Mar 2020 15:57:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VyMILHnt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8FFD3212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A009B6E857; Tue, 31 Mar 2020 15:57:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 333336E855 for ; Tue, 31 Mar 2020 15:57:39 +0000 (UTC) Received: from DESKTOP-GFFITBK.localdomain (218-161-90-76.HINET-IP.hinet.net [218.161.90.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 006D82145D; Tue, 31 Mar 2020 15:57:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585670259; bh=AL6zvpFQUuF/mrQfmk3wscJLtjTKUP/MgD0iD7UtbWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VyMILHntgkfjjVAnbx0XFP815DGsRjqLrwCnNMrHu5tSwlOcGXRhI+YqVHXQAXDXG 9NsK2rLf2Zrc3STtscpFGJsltt5wIJUGHZ3+FvM/RvVCUrF40yU21kgf/ilF/2FWlW DgYKADVa+HyRDqmKaRImU6jjogW8MPBzErt7HCIU= From: Chun-Kuang Hu To: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Chunfeng Yun , Kishon Vijay Abraham I Subject: [PATCH v3 2/4] drm/mediatek: Separate mtk_hdmi_phy to an independent module Date: Tue, 31 Mar 2020 23:57:26 +0800 Message-Id: <20200331155728.18032-3-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200331155728.18032-1-chunkuang.hu@kernel.org> References: <20200331155728.18032-1-chunkuang.hu@kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: CK Hu mtk_hdmi_phy is a part of mtk_hdmi module, but phy driver should be an independent module rather than be part of drm module, so separate the phy driver to an independent module. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu Reviewed-by: Chunfeng Yun --- drivers/gpu/drm/mediatek/Kconfig | 9 ++++++++- drivers/gpu/drm/mediatek/Makefile | 11 +++++++---- drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 +- drivers/gpu/drm/mediatek/mtk_hdmi.h | 1 - drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 1 + drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 - 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index fa5ffc4fe823..ff6a1eb4ae83 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -23,6 +23,13 @@ config DRM_MEDIATEK_HDMI tristate "DRM HDMI Support for Mediatek SoCs" depends on DRM_MEDIATEK select SND_SOC_HDMI_CODEC if SND_SOC - select GENERIC_PHY + select PHY_MTK_HDMI help DRM/KMS HDMI driver for Mediatek SoCs + +config PHY_MTK_HDMI + tristate "MediaTek HDMI-PHY Driver" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + help + Enable this to support HDMI-PHY diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile index b7a82ed5788f..fcbef23aa6ce 100644 --- a/drivers/gpu/drm/mediatek/Makefile +++ b/drivers/gpu/drm/mediatek/Makefile @@ -19,9 +19,12 @@ obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o mediatek-drm-hdmi-objs := mtk_cec.o \ mtk_hdmi.o \ - mtk_hdmi_ddc.o \ - mtk_mt2701_hdmi_phy.o \ - mtk_mt8173_hdmi_phy.o \ - mtk_hdmi_phy.o + mtk_hdmi_ddc.o obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o + +phy-mtk-hdmi-drv-objs := mtk_hdmi_phy.o \ + mtk_mt2701_hdmi_phy.o \ + mtk_mt8173_hdmi_phy.o + +obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 878433c09c9b..ee72ece0e54d 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -1797,7 +1798,6 @@ static struct platform_driver mtk_hdmi_driver = { }; static struct platform_driver * const mtk_hdmi_drivers[] = { - &mtk_hdmi_phy_driver, &mtk_hdmi_ddc_driver, &mtk_cec_driver, &mtk_hdmi_driver, diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.h b/drivers/gpu/drm/mediatek/mtk_hdmi.h index bb3653de6bd1..472bf141c92b 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.h @@ -5,7 +5,6 @@ */ #ifndef _MTK_HDMI_CTRL_H #define _MTK_HDMI_CTRL_H -#include "mtk_hdmi_phy.h" struct platform_driver; diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c index 5223498502c4..fe022acddbef 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c @@ -205,6 +205,7 @@ struct platform_driver mtk_hdmi_phy_driver = { .of_match_table = mtk_hdmi_phy_match, }, }; +module_platform_driver(mtk_hdmi_phy_driver); MODULE_DESCRIPTION("MediaTek HDMI PHY Driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h index fc1c2efd1128..b13e1d5f8e78 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h @@ -49,7 +49,6 @@ void mtk_hdmi_phy_mask(struct mtk_hdmi_phy *hdmi_phy, u32 offset, u32 val, u32 mask); struct mtk_hdmi_phy *to_mtk_hdmi_phy(struct clk_hw *hw); -extern struct platform_driver mtk_hdmi_phy_driver; extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_8173_conf; extern struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf; From patchwork Tue Mar 31 15:57:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Kuang Hu X-Patchwork-Id: 11468025 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 CDE25159A for ; Tue, 31 Mar 2020 15:57:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 AA90420BED for ; Tue, 31 Mar 2020 15:57:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="tERapeQM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA90420BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4DDB6E855; Tue, 31 Mar 2020 15:57:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id ADC786E855 for ; Tue, 31 Mar 2020 15:57:41 +0000 (UTC) Received: from DESKTOP-GFFITBK.localdomain (218-161-90-76.HINET-IP.hinet.net [218.161.90.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7FA5B2137B; Tue, 31 Mar 2020 15:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585670261; bh=LMgKTiMXsLLMrmXVZ091bFAZrp+yhoV6qstjfE/5HIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tERapeQM0EghlKy3jmG7e3Eggxx/o6awQQEYBwxV/0MOL7sktYlZB7SpD1xvTNuS2 x96kqrSzYsVAxJ/7kAW/sPpQIX7m5Xhh+8DAoE5ljx78hz+fO1AfOMAtzBYaV7tx3X Auy63voAXpyJ7m/LmrO+k9Kqwy0IvVMAIDG3UIzw= From: Chun-Kuang Hu To: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Chunfeng Yun , Kishon Vijay Abraham I Subject: [PATCH v3 3/4] phy: mediatek: Move mtk_hdmi_phy driver into drivers/phy/mediatek folder Date: Tue, 31 Mar 2020 23:57:27 +0800 Message-Id: <20200331155728.18032-4-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200331155728.18032-1-chunkuang.hu@kernel.org> References: <20200331155728.18032-1-chunkuang.hu@kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: CK Hu mtk_hdmi_phy is currently placed inside mediatek drm driver, but it's more suitable to place a phy driver into phy driver folder, so move mtk_hdmi_phy driver into phy driver folder. Signed-off-by: CK Hu Signed-off-by: Chun-Kuang Hu Reviewed-by: Chunfeng Yun Reviewed-by: Matthias Brugger --- drivers/gpu/drm/mediatek/Kconfig | 7 ------- drivers/gpu/drm/mediatek/Makefile | 6 ------ drivers/phy/mediatek/Kconfig | 7 +++++++ drivers/phy/mediatek/Makefile | 7 +++++++ .../mediatek/phy-mtk-hdmi-mt2701.c} | 2 +- .../mediatek/phy-mtk-hdmi-mt8173.c} | 2 +- .../mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} | 2 +- .../mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} | 0 8 files changed, 17 insertions(+), 16 deletions(-) rename drivers/{gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt2701.c} (99%) rename drivers/{gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi-mt8173.c} (99%) rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.c => phy/mediatek/phy-mtk-hdmi.c} (99%) rename drivers/{gpu/drm/mediatek/mtk_hdmi_phy.h => phy/mediatek/phy-mtk-hdmi.h} (100%) diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/Kconfig index ff6a1eb4ae83..2427d5bf699d 100644 --- a/drivers/gpu/drm/mediatek/Kconfig +++ b/drivers/gpu/drm/mediatek/Kconfig @@ -26,10 +26,3 @@ config DRM_MEDIATEK_HDMI select PHY_MTK_HDMI help DRM/KMS HDMI driver for Mediatek SoCs - -config PHY_MTK_HDMI - tristate "MediaTek HDMI-PHY Driver" - depends on ARCH_MEDIATEK && OF - select GENERIC_PHY - help - Enable this to support HDMI-PHY diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek/Makefile index fcbef23aa6ce..77b0fd86063d 100644 --- a/drivers/gpu/drm/mediatek/Makefile +++ b/drivers/gpu/drm/mediatek/Makefile @@ -22,9 +22,3 @@ mediatek-drm-hdmi-objs := mtk_cec.o \ mtk_hdmi_ddc.o obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o - -phy-mtk-hdmi-drv-objs := mtk_hdmi_phy.o \ - mtk_mt2701_hdmi_phy.o \ - mtk_mt8173_hdmi_phy.o - -obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o diff --git a/drivers/phy/mediatek/Kconfig b/drivers/phy/mediatek/Kconfig index dee757c957f2..10f0ec2d5b54 100644 --- a/drivers/phy/mediatek/Kconfig +++ b/drivers/phy/mediatek/Kconfig @@ -35,3 +35,10 @@ config PHY_MTK_XSPHY Enable this to support the SuperSpeedPlus XS-PHY transceiver for USB3.1 GEN2 controllers on MediaTek chips. The driver supports multiple USB2.0, USB3.1 GEN2 ports. + +config PHY_MTK_HDMI + tristate "MediaTek HDMI-PHY Driver" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + help + Enable this to support HDMI-PHY diff --git a/drivers/phy/mediatek/Makefile b/drivers/phy/mediatek/Makefile index 08a8e6a97b1e..cda074c53235 100644 --- a/drivers/phy/mediatek/Makefile +++ b/drivers/phy/mediatek/Makefile @@ -6,3 +6,10 @@ obj-$(CONFIG_PHY_MTK_TPHY) += phy-mtk-tphy.o obj-$(CONFIG_PHY_MTK_UFS) += phy-mtk-ufs.o obj-$(CONFIG_PHY_MTK_XSPHY) += phy-mtk-xsphy.o + +phy-mtk-hdmi-drv-objs := phy-mtk-hdmi.o \ + phy-mtk-hdmi-mt2701.o \ + phy-mtk-hdmi-mt8173.o + +obj-$(CONFIG_PHY_MTK_HDMI) += phy-mtk-hdmi-drv.o + diff --git a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c similarity index 99% rename from drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c rename to drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c index 99fe05cd3598..a6cb1dea3d0c 100644 --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt2701.c @@ -4,7 +4,7 @@ * Author: Chunhui Dai */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00 #define RG_HDMITX_DRV_IBIAS 0 diff --git a/drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c similarity index 99% rename from drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c rename to drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c index b55f51675205..3521c4893c53 100644 --- a/drivers/gpu/drm/mediatek/mtk_mt8173_hdmi_phy.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi-mt8173.c @@ -4,7 +4,7 @@ * Author: Jie Qiu */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" #define HDMI_CON0 0x00 #define RG_HDMITX_PLL_EN BIT(31) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/phy/mediatek/phy-mtk-hdmi.c similarity index 99% rename from drivers/gpu/drm/mediatek/mtk_hdmi_phy.c rename to drivers/phy/mediatek/phy-mtk-hdmi.c index fe022acddbef..8fc83f01a720 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi.c @@ -4,7 +4,7 @@ * Author: Jie Qiu */ -#include "mtk_hdmi_phy.h" +#include "phy-mtk-hdmi.h" static int mtk_hdmi_phy_power_on(struct phy *phy); static int mtk_hdmi_phy_power_off(struct phy *phy); diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/phy/mediatek/phy-mtk-hdmi.h similarity index 100% rename from drivers/gpu/drm/mediatek/mtk_hdmi_phy.h rename to drivers/phy/mediatek/phy-mtk-hdmi.h From patchwork Tue Mar 31 15:57:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Kuang Hu X-Patchwork-Id: 11468029 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 404A81668 for ; Tue, 31 Mar 2020 15:57:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 1E1CA2137B for ; Tue, 31 Mar 2020 15:57:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="LehEO92z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E1CA2137B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C3396E856; Tue, 31 Mar 2020 15:57:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 25D4E6E856 for ; Tue, 31 Mar 2020 15:57:44 +0000 (UTC) Received: from DESKTOP-GFFITBK.localdomain (218-161-90-76.HINET-IP.hinet.net [218.161.90.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D498214D8; Tue, 31 Mar 2020 15:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585670264; bh=bFnnF2dZO5qJovO73F2Ej1VVG447VC5SqBeFPILlMsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LehEO92zj/jb1FWwEtS+u7BzpzT+Ii4OZysyBIwf/nqljEhon/w4RljTNgVFTWkpJ UcrZi0tBki2L61LDLGpeKV7i7Au2MWGLH46f+cDNEcYP1hjoHTRpBrnB6Qwv1mKh6E OLUklYq0W5ykLjHHGeqsXdrVC7F50KEnna6f4b70= From: Chun-Kuang Hu To: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Chunfeng Yun , Kishon Vijay Abraham I Subject: [PATCH v3 4/4] MAINTAINERS: add files for Mediatek DRM drivers Date: Tue, 31 Mar 2020 23:57:28 +0800 Message-Id: <20200331155728.18032-5-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200331155728.18032-1-chunkuang.hu@kernel.org> References: <20200331155728.18032-1-chunkuang.hu@kernel.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chun-Kuang Hu , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Mediatek HDMI phy driver is moved from drivers/gpu/drm/mediatek to drivers/phy/mediatek, so add the new folder to the Mediatek DRM drivers' information. Signed-off-by: Chun-Kuang Hu Reviewed-by: Matthias Brugger --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 38fe2f3f7b6f..129777037538 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5612,6 +5612,7 @@ M: Philipp Zabel L: dri-devel@lists.freedesktop.org S: Supported F: drivers/gpu/drm/mediatek/ +F: drivers/phy/mediatek/phy-mtk-hdmi* F: Documentation/devicetree/bindings/display/mediatek/ DRM DRIVERS FOR NVIDIA TEGRA