From patchwork Wed Feb 8 09:08:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 13132586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EC8AC636D3 for ; Wed, 8 Feb 2023 09:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8dSVqHU7IXpkv3uVV+4ThtcyF0CIvQnbivi8b0YmDEY=; b=Irlf1JxkbnM0Pd Hs8gDxRP0mhM1/OLnBFSA88XOf0Uow5Lm9vyj5Se600d5WouxujXUhL2wibjPVwzYnoJnzjfHTZoF 8RaEQbXF41feoR4QApt7bITVriPcn97HhPpSx1hgtuSRKQSPtBmbuTGvyW6SHNyQE6tScM4JOqJSV KTdAL+hqdzFwwtNup5/ZfCtrP2kP/lTiQy0w7WglFWPcKCoAobUpFxnbgr7ulfrLVyExZ0k+ov08Y 990/wcgDsa9PjIJfKb69zniH6HqnktMWk0kSBznV4DOBtcpCzSu+BJ+2BqC2AtkzR3BVoxOBo1rFh DYCePNFoG/srLy3dFx1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPgRP-00Egwf-1m; Wed, 08 Feb 2023 09:08:35 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPgRL-00Egsg-2n for linux-rockchip@lists.infradead.org; Wed, 08 Feb 2023 09:08:33 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pPgRC-0004eh-Rj; Wed, 08 Feb 2023 10:08:23 +0100 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pPgR7-003TfR-9P; Wed, 08 Feb 2023 10:08:18 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pPgR7-00GG82-Aw; Wed, 08 Feb 2023 10:08:17 +0100 From: Sascha Hauer To: dri-devel@lists.freedesktop.org Cc: Sandy Huang , linux-rockchip@lists.infradead.org, Michael Riesch , kernel@pengutronix.de, Robin Murphy , Dan Johansen , FUKAUMI Naoki , Sascha Hauer , Nicolas Frattaroli Subject: [PATCH v5 3/4] drm/rockchip: dw_hdmi: Add support for 4k@30 resolution Date: Wed, 8 Feb 2023 10:08:15 +0100 Message-Id: <20230208090816.3810589-4-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230208090816.3810589-1-s.hauer@pengutronix.de> References: <20230208090816.3810589-1-s.hauer@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-rockchip@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230208_010831_129737_61DB3362 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org This adds the PLL/phy settings to support higher resolutions like 4k@30. The values were taken from the Rockchip downstream Kernel. Tested-by: Michael Riesch Link: https://lore.kernel.org/r/20220926080435.259617-3-s.hauer@pengutronix.de Tested-by: Nicolas Frattaroli Tested-by: Dan Johansen Link: https://lore.kernel.org/r/20230118132213.2911418-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- Notes: Changes since v2: - Use correct mpll_cfg values, previously the 420 values were used drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 7d8bf292fedce..feba6b9becd6c 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -161,6 +161,12 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = { { 0x214c, 0x0003}, { 0x4064, 0x0003} }, + }, { + 340000000, { + { 0x0040, 0x0003 }, + { 0x3b4c, 0x0003 }, + { 0x5a64, 0x0003 }, + }, }, { ~0UL, { { 0x00a0, 0x000a }, @@ -186,6 +192,8 @@ static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = { 146250000, { 0x0038, 0x0038, 0x0038 }, }, { 148500000, { 0x0000, 0x0038, 0x0038 }, + }, { + 600000000, { 0x0000, 0x0000, 0x0000 }, }, { ~0UL, { 0x0000, 0x0000, 0x0000}, }