Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp230622pxa; Tue, 4 Aug 2020 04:17:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/q6qAhxW3u63wOyJ54sCJEW6RHcyyeYlRP20VHx9qAOYve4ll77cqRbYhn/h8MnLxgYjs X-Received: by 2002:a17:906:7e57:: with SMTP id z23mr20568089ejr.294.1596539828690; Tue, 04 Aug 2020 04:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596539828; cv=none; d=google.com; s=arc-20160816; b=FjVbU+VVbAd6DsZWWureeP0ASm6nU1uR+MY/2RC/128NaT/fNKF5F1Ks6085TBXFJ9 ef8om6urTf9V123dzULoipV8ETXYAtoLztLlE0YshaTqo9t6OEfoKt2IMsivjxrV6zBA mTxliMhQ49Xp2TSyOjZvsX+sX8Gdu/DQEmYQ+eoc2/vk3AkgDiAs47j+Yoc5/zPAH5hy /XtU8SvFd6gxgXW1Vr+Soi4JwCYB7VoDmgnF+6JuDPOoOpq+xqevnB5Zyxck92TtsKzr 1hXMOA3HMeQ73hNvq6tZNZXP5KHQstztgho/Aji5eouME/s5WvO+PC8VyVijfTZ0FTkL PQxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Tvt7koxlgmMWFSYlV9RwSNCWybA13LVEGNqsglV8N/o=; b=EXAsJZt8WapFcbRN2trp+ql/l7MFUKfSGd3YGz9UJ2g3+t2F6PeZjePDtYVeMGIym/ 6DgwVrrZTTdLQr2HczdTL8DrCfhPfBDhmexBCBvDkiYmvUpJ91wP7F8LAzAorCfhcRJk 1lTsjNzEMUa45sGil2mDOjaq5EHTNFRrnFvtGJ3RvvVhO/W0TorY8TuhnPpiNnnWh1Gr AJBGph1SZ1i0L89BXPetPqkD0EcuXImVAw51lQHCIIp4hDXf/SsjIyWZrT0rkxIGmrK0 zc6W17kxkJ4x0iA7Chuteeb5+gxA3EHgWC9K8j0BItKjQGe6HRoKQ/lBXOHluqezbb/2 mA1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=KdMTtX8B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si10966850ejp.500.2020.08.04.04.16.22; Tue, 04 Aug 2020 04:17:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=KdMTtX8B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730165AbgHDLPo (ORCPT + 99 others); Tue, 4 Aug 2020 07:15:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728897AbgHDLLf (ORCPT ); Tue, 4 Aug 2020 07:11:35 -0400 Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [IPv6:2a03:2900:1:1::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCD80C06179F for ; Tue, 4 Aug 2020 04:11:13 -0700 (PDT) Received: from mxout1.routing.net (unknown [192.168.10.81]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id 1C45B96316; Tue, 4 Aug 2020 10:59:23 +0000 (UTC) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout1.routing.net (Postfix) with ESMTP id EA4EB40313; Tue, 4 Aug 2020 10:59:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1596538763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Tvt7koxlgmMWFSYlV9RwSNCWybA13LVEGNqsglV8N/o=; b=KdMTtX8B+IDeLvENYxo5OqdkZwdYung9arI6DEWFSBRfGnNZSFx/e6jppky4qEOm0medV1 rKk2FraL1Lu+aL0GFZrv6xrqsF7b8g8MEmoew98GWjsID2j3gY2Ca6F2bJdkkxoGkx80r5 dS6gNl9Cw88MMHmvBaYg9XKj7ztPBAI= Received: from localhost.localdomain (fttx-pool-217.61.144.119.bambit.de [217.61.144.119]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 40B8A36042B; Tue, 4 Aug 2020 10:59:22 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, chunhui dai Subject: [PATCH v3 2/5] drm/mediatek: disable tmds on mt2701 Date: Tue, 4 Aug 2020 12:58:46 +0200 Message-Id: <20200804105849.70876-3-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200804105849.70876-1-linux@fw-web.de> References: <20200804105849.70876-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: chunhui dai disable tmds on phy on mt2701 to support other resolutions like 1280x1024 Signed-off-by: chunhui dai Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich --- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 3 +++ drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 + drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c index 5223498502c4..edadb7a700f1 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c @@ -184,6 +184,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) return PTR_ERR(phy_provider); } + if (hdmi_phy->conf->pll_default_off) + hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); + return of_clk_add_provider(dev->of_node, of_clk_src_simple_get, hdmi_phy->pll); } diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h index 2d8b3182470d..f472fdeb63dc 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h @@ -22,6 +22,7 @@ struct mtk_hdmi_phy; struct mtk_hdmi_phy_conf { bool tz_disabled; unsigned long flags; + bool pll_default_off; const struct clk_ops *hdmi_phy_clk_ops; void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); void (*hdmi_phy_disable_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..6fbedacfc1e8 100644 --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c @@ -239,6 +239,7 @@ 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, + .pll_default_off = true, .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, .hdmi_phy_disable_tmds = mtk_hdmi_phy_disable_tmds, -- 2.25.1