From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 26 Sep 2024 15:16:53 +0200 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 1stoMW-0030tn-2t for lore@lore.pengutronix.de; Thu, 26 Sep 2024 15:16:53 +0200 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 1stoMI-0006Uq-C5 for lore@pengutronix.de; Thu, 26 Sep 2024 15:16:53 +0200 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=ZBwGkp86SaJU1KBkC7NKwTFhYlK4X3y/GNUD+eFRoH4=; b=0lmnRbJe2pPbTVM2rAnhu0KYSZ NAXY51cBkJ4haCuhXBHfy1+zQWf14E/kx3ucShJtXFqdSM/gU20wS5/HjriUSbN40aIXyNdQvLcMT Y2PuygHiV9qd//SLk8zDRJqejim7Lm/9byqspJpa4BAqjY6nUiPtyx/PEtJuy4nRZZOhIHoCMpWgU r01NeWtAkOx0/JLUPLYITO6urLhqlM/e/G/2hZG12dyw/zW5cB97TsrT7ayadIGmT8KJzeQDBVn6W 1dJIgs4ffXXTLM+nyjZAnUSplqcW7JLy/lYmewPH6KMarI9VCskIHHoBdRiWwOKGcxkS+hBLnKZ3I Z9EjTuBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stoL5-00000008R4Y-0Wcu; Thu, 26 Sep 2024 13:15:23 +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 1stoKv-00000008Qyb-03G6 for barebox@lists.infradead.org; Thu, 26 Sep 2024 13:15:19 +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 1stoKl-0004us-QK; Thu, 26 Sep 2024 15:15:03 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1stoKl-001h7H-67; Thu, 26 Sep 2024 15:15:03 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1stoKl-00GZyn-1j; Thu, 26 Sep 2024 15:15:03 +0200 From: Sascha Hauer Date: Thu, 26 Sep 2024 15:15:06 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240926-vop2-v1-8-fe0581f2020b@pengutronix.de> References: <20240926-vop2-v1-0-fe0581f2020b@pengutronix.de> In-Reply-To: <20240926-vop2-v1-0-fe0581f2020b@pengutronix.de> To: "open list:BAREBOX" X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1727356502; l=145044; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=EFv4zUrcXIpm/qUdlM7RgsPoRtZnybDAXKIrrWMSJ0g=; b=FC855d2TkxAThzXC4IbkZdrrNGXuwK9dqCd+HBKXedVUTpoLAOuZjCc+vLqDlNUykRYUNaRvu /1Iw8oDti8NACXoiYF/scSQrFoKTxPPwMpQ8v3Unmmh1MaON6D5CPf/ X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= 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=-4.0 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 08/13] video: add dw-hdmi driver 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 the Designware HDMI driver from Linux-6.10. The code is directly taken from Linux with the necessary adjustments for the barebox API. Audio support has been removed. Signed-off-by: Sascha Hauer --- drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/dw-hdmi.c | 2286 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/video/dw-hdmi.h | 1168 ++++++++++++++++++++++++ include/linux/hdmi.h | 445 +++++++++ include/video/dw_hdmi.h | 203 +++++ 6 files changed, 4112 insertions(+) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index e86f511da4..588f0cfde5 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -206,4 +206,13 @@ config DRIVER_VIDEO_PANEL_MIPI_DBI firmware file. For more information see https://github.com/notro/panel-mipi-dbi/wiki. +config DRIVER_VIDEO_DW_HDMI + tristate "Designware HDMI support" + select VIDEO_VPL + select OFTREE + help + Say Y here if you want to enable support for the Designware HDMI + controller. To make use of this driver you need platform specific + glue code to be selected as well. + endif diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 37a184a7e2..fd1da2a864 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -31,4 +31,5 @@ obj-$(CONFIG_DRIVER_VIDEO_IMX_IPUV3) += imx-ipu-v3/ obj-$(CONFIG_DRIVER_VIDEO_EFI_GOP) += efi_gop.o obj-$(CONFIG_DRIVER_VIDEO_FB_SSD1307) += ssd1307fb.o obj-$(CONFIG_BACKLIGHT_RAVE_SP) += rave-sp-backlight.o +obj-$(CONFIG_DRIVER_VIDEO_DW_HDMI) += dw-hdmi.o obj-$(CONFIG_DRIVER_VIDEO_BOCHS) += bochs/ diff --git a/drivers/video/dw-hdmi.c b/drivers/video/dw-hdmi.c new file mode 100644 index 0000000000..2e9f21332c --- /dev/null +++ b/drivers/video/dw-hdmi.c @@ -0,0 +1,2286 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * DesignWare High-Definition Multimedia Interface (HDMI) driver + * + * Copyright (C) 2013-2015 Mentor Graphics Inc. + * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. + * Copyright (C) 2010, Guennadi Liakhovetski + */ +#include +#include +#include +#include +#include +#include +#include