Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp478918pxa; Tue, 4 Aug 2020 10:01:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFWznrzmiRHSomrVS4btshk9YM05gxnSmJrYRy7Nf99/NJ8jCC/Twuni7wVJ6Nwohsvajq X-Received: by 2002:a17:906:3a17:: with SMTP id z23mr21718235eje.238.1596560497535; Tue, 04 Aug 2020 10:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596560497; cv=none; d=google.com; s=arc-20160816; b=R3EDH5MUM7R9E6J8t+V3JNk1v+Y2vMJzW2fp7mhvPpAc2GQvrAFGFnDlMBAegwq+2O jD96v2/CumNg2ahVUCpe02vRwENB1X1d22SLKAiL1gViYqtTiJY1g0wUAYAbtkI1xSHz ugj26AxPvB83Lqxuc8p+T65/beC+I1TTIpTjEmj4IEsSiAPXnYxI3jGId+hzQd0qOJYc I71ZX1iZzPz+eFCHPstv2R65Gxc1WsQACtxBl5pOZjmGMigGGYsyIFoMPpK9RY/wpxgQ SjW9Ly6e9mPazCuI3D8DWoXu6iRsS2XpPhL9WFjmAyEsYJEuIXzkdLArKEZm9EjFEI7C lD2w== 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=xx6R20Ntmua6C/npP1JEsZqieF3PWsRkX8HybA1piN4aEIwZZ4x/CfyV41MM/5BX/+ 5SGAZ3aL9c0TDEh/skKiBaLAww1MNmJVNlvlolKiAL69+LiLLVkBH2Kvu7xH0eh/kAKo XsLQZQktapHDfT7rl8/v8p52ZMNKDgGps5Un6CFJjLIdSQX12wHeOHHXNVnWs0ukTzN7 GjeuBwWkLGo3A8A2bF6wm5GFHzA5xFSvPD/JNnW5PLhhv+YkWY/V3Y0Ydl7MWK6ayhKR YUIMsBwQbAZH1wrdtxmyc4olHiiaR7DALc6Ysch9pcPYy3CdoNsNrVY5RUbWHpvlmjua 47Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=nrCQShCU; 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 d13si13898263edo.419.2020.08.04.10.00.46; Tue, 04 Aug 2020 10:01:37 -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=nrCQShCU; 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 S1729022AbgHDQ4b (ORCPT + 99 others); Tue, 4 Aug 2020 12:56:31 -0400 Received: from mxwww.masterlogin.de ([95.129.51.220]:46152 "EHLO mxwww.masterlogin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728048AbgHDQ4P (ORCPT ); Tue, 4 Aug 2020 12:56:15 -0400 Received: from mxout4.routing.net (unknown [192.168.10.112]) by forward.mxwww.masterlogin.de (Postfix) with ESMTPS id EA78E9614F; Tue, 4 Aug 2020 16:56:11 +0000 (UTC) Received: from mxbox3.masterlogin.de (unknown [192.168.10.78]) by mxout4.routing.net (Postfix) with ESMTP id BD9671014A6; Tue, 4 Aug 2020 16:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1596560171; 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=nrCQShCUiKb/bluJS6ekx73gjPCb+mpkwkkU5P+PfWHmgBVsxxsXKL3hNG2OaQ3ducby0z e4TFVfo0fVZjUSPVbS/eUfzYOKK3M2zroiH0lxYsVBG/Qk/2MKpSyY8we6WwPZfDGBhtJX 0bKJ29FNQtGffNrUIiOCdv4LYD5LxmI= Received: from localhost.localdomain (fttx-pool-217.61.144.119.bambit.de [217.61.144.119]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 1124E3603C2; Tue, 4 Aug 2020 16:56:11 +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 v4 3/6] drm/mediatek: disable tmds on mt2701 Date: Tue, 4 Aug 2020 18:55:52 +0200 Message-Id: <20200804165555.75159-5-linux@fw-web.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200804165555.75159-1-linux@fw-web.de> References: <20200804165555.75159-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