From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 28 Oct 2024 15:41:20 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1t5Qvm-001tlL-2z for lore@lore.pengutronix.de; Mon, 28 Oct 2024 15:41:20 +0100 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t5Qvk-00057N-Lo for lore@pengutronix.de; Mon, 28 Oct 2024 15:41:20 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=66oee5YbjLESWd8kv9BBCSgdPd/aEQ+whisRHKJ6r4I=; b=GPIZdw987oSlif1/cbxhGKD6KE mK5/jBajW5I55Pmfvc9PnRbL/tFPfkTXQUYwfq294QauArkhtPJ9jGdja5tVbGQ/sIC6/YxtGZTY1 rMywj4cyqpdhXUcal6y2vzmfxZWug1ledGAYFpyVQdJKuPR+gP3YnchokmqAexhh3cijAoYElghOJ abObsW60SzcM1sJOUhLsE6ur3swp/D84yd/KRTIGVCVt1m1y1rxguU+zGVhwmflkGwQhSAEJmA25U oaEM3MqAlX9R8XpYBLUOl0aLzp4932Ovd4xvaaqkMxnylTS0RdABXK4KU4jtYqTQVn7doD+V3Hk5Z 0bON2V9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t5Qv1-0000000B9l9-38f8; Mon, 28 Oct 2024 14:40:31 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t5QbM-0000000B5ti-147a for barebox@lists.infradead.org; Mon, 28 Oct 2024 14:20:14 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t5Qax-0002nm-2P; Mon, 28 Oct 2024 15:19:47 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1t5Qaw-000s7N-2A; Mon, 28 Oct 2024 15:19:46 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1t5Qaw-00EMX2-1u; Mon, 28 Oct 2024 15:19:46 +0100 From: Sascha Hauer Date: Mon, 28 Oct 2024 15:19:51 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241028-vop2-rk3588-v1-6-a54bf7c28adc@pengutronix.de> References: <20241028-vop2-rk3588-v1-0-a54bf7c28adc@pengutronix.de> In-Reply-To: <20241028-vop2-rk3588-v1-0-a54bf7c28adc@pengutronix.de> To: "open list:BAREBOX" X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730125186; l=9488; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=SwpgEJw9rsm2NRV3GG8UdeVPu/f+nV4muor64gjcErc=; b=y0GocYRGVNAXmY6Aw3H2+HRpB9UGjgjyVgSHhvML7Fkgldq3vY9yt+wlt0EmEw4mzQ7EfUmKH kU7ZdHPxCFRDZLx9Ae2CClBkd8qwa9FeJhEdCUFuwjK+v/+SODwI5e6 X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241028_072012_496760_634F2C51 X-CRM114-Status: GOOD ( 20.93 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 06/12] video: rockchip: add support for RK3588 HDMI X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) This adds support for the RK3588 HDMI controller based on Linux commit: | commit d687f549688832b6d91ec7244355b966a105f569 | Author: Cristian Ciocaltea | Date: Sat Jul 6 03:22:35 2024 +0300 | | drm/rockchip: Add basic RK3588 HDMI output support | | The RK3588 SoC family integrates the newer Synopsys DesignWare HDMI 2.1 | Quad-Pixel (QP) TX controller IP and a HDMI/eDP TX Combo PHY based on a | Samsung IP block. | | Add just the basic support for now, i.e. RGB output up to 4K@60Hz, | without audio, CEC or any of the HDMI 2.1 specific features. | | Co-developed-by: Algea Cao | Signed-off-by: Algea Cao | Signed-off-by: Cristian Ciocaltea Signed-off-by: Sascha Hauer --- drivers/video/rockchip/Kconfig | 11 ++ drivers/video/rockchip/Makefile | 1 + drivers/video/rockchip/dw_hdmi_qp-rockchip.c | 231 +++++++++++++++++++++++++++ 3 files changed, 243 insertions(+) diff --git a/drivers/video/rockchip/Kconfig b/drivers/video/rockchip/Kconfig index b91c6fc398..16e41d8db9 100644 --- a/drivers/video/rockchip/Kconfig +++ b/drivers/video/rockchip/Kconfig @@ -14,5 +14,16 @@ config DRIVER_VIDEO_ROCKCHIP_HDMI select OFTREE select DRIVER_VIDEO_EDID select DRIVER_VIDEO_DW_HDMI + help + Say y here if you want to use HDMI on RK356x based SoCs + +config DRIVER_VIDEO_ROCKCHIP_HDMI_QP + bool "Rockchip HDMI QP driver" + select VIDEO_VPL + select OFTREE + select DRIVER_VIDEO_EDID + select DRIVER_VIDEO_DW_HDMI + help + Say y here if you want to use HDMI on RK3588 based SoCs endif diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile index 278ce1302d..86a7f39602 100644 --- a/drivers/video/rockchip/Makefile +++ b/drivers/video/rockchip/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_DRIVER_VIDEO_ROCKCHIP_VOP2) += rockchip_drm_vop2.o rockchip_vop2_reg.o obj-$(CONFIG_DRIVER_VIDEO_ROCKCHIP_HDMI) += dw_hdmi-rockchip.o +obj-$(CONFIG_DRIVER_VIDEO_ROCKCHIP_HDMI_QP) += dw_hdmi_qp-rockchip.o diff --git a/drivers/video/rockchip/dw_hdmi_qp-rockchip.c b/drivers/video/rockchip/dw_hdmi_qp-rockchip.c new file mode 100644 index 0000000000..1c337c30c1 --- /dev/null +++ b/drivers/video/rockchip/dw_hdmi_qp-rockchip.c @@ -0,0 +1,231 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2021-2022 Rockchip Electronics Co., Ltd. + * Copyright (c) 2024 Collabora Ltd. + * + * Author: Algea Cao + * Author: Cristian Ciocaltea + */ +#include +#include +#include +#include +#include +#include +#include