mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: Michael Riesch <michael.riesch@wolfvision.net>
Subject: [PATCH 3/3] ARM: Wolfvision PF5: add display overlay
Date: Tue,  1 Oct 2024 12:47:38 +0200	[thread overview]
Message-ID: <20241001104738.1069237-3-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20241001104738.1069237-1-s.hauer@pengutronix.de>

The Wolfvision PF5 can have a display connected to it. The presence of
the display can be checked for using an analog input. Include the
corresponding device tree overlay when the display is connected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/wolfvision-pf5/board.c            | 15 +++++++++++++++
 arch/arm/dts/Makefile                             |  4 ++--
 .../arm/dts/rk3568-wolfvision-pf5-display-vz.dtso | 11 +++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/rk3568-wolfvision-pf5-display-vz.dtso

diff --git a/arch/arm/boards/wolfvision-pf5/board.c b/arch/arm/boards/wolfvision-pf5/board.c
index 5a2f4201ba..c2a6963c0f 100644
--- a/arch/arm/boards/wolfvision-pf5/board.c
+++ b/arch/arm/boards/wolfvision-pf5/board.c
@@ -15,15 +15,19 @@
 #include <boards/wolfvision/common.h>
 #include <mach/rockchip/bbu.h>
 
+#define PF5_DISPLAY_VZ_FILENAME "rk3568-wolfvision-pf5-display-vz.dtbo"
+#define PF5_DISPLAY_VZ_DATA __dtbo_rk3568_wolfvision_pf5_display_vz_start
 #define PF5_IO_EXPANDER_FILENAME "rk3568-wolfvision-pf5-io-expander.dtbo"
 #define PF5_IO_EXPANDER_DATA __dtbo_rk3568_wolfvision_pf5_io_expander_start
 
 enum {
 	PF5_HWID_CHANNEL_MAINBOARD = 1,
 	PF5_HWID_CHANNEL_MODULE = 2,
+	PF5_HWID_CHANNEL_DISPLAY = 3,
 };
 
 extern char PF5_IO_EXPANDER_DATA[];
+extern char PF5_DISPLAY_VZ_DATA[];
 
 static const struct wv_rk3568_extension pf5_extensions[] = {
 	{
@@ -45,6 +49,17 @@ static const struct wv_rk3568_extension pf5_extensions[] = {
 			[16] = { .name = "no", },
 		},
 	},
+	{
+		.adc_chan = PF5_HWID_CHANNEL_DISPLAY,
+		.name = "display",
+		.overlays = {
+			[0] = { .name = "Visualizer",
+				.filename = PF5_DISPLAY_VZ_FILENAME,
+				.data = PF5_DISPLAY_VZ_DATA,
+			},
+			[16] = { .name = "no" },
+		},
+	},
 };
 
 static int pf5_probe(struct device *dev)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 654d221fa3..fe32b812f6 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -231,6 +231,6 @@ lwl-$(CONFIG_MACH_VARISCITE_DT8MCUSTOMBOARD_IMX8MP) += imx8mp-var-dart-dt8mcusto
 lwl-$(CONFIG_MACH_TQMA93XX) += imx93-tqma9352-mba93xxca.dtb.o \
 			       imx93-tqma9352-mba93xxla.dtb.o
 
-obj-$(CONFIG_MACH_WOLFVISION_PF5) += rk3568-wolfvision-pf5-io-expander.dtbo.o
-
+obj-$(CONFIG_MACH_WOLFVISION_PF5) += rk3568-wolfvision-pf5-io-expander.dtbo.o \
+				     rk3568-wolfvision-pf5-display-vz.dtbo.o
 clean-files := *.dtb *.dtb.S .*.dtc .*.pre .*.dts *.dtb.z
diff --git a/arch/arm/dts/rk3568-wolfvision-pf5-display-vz.dtso b/arch/arm/dts/rk3568-wolfvision-pf5-display-vz.dtso
new file mode 100644
index 0000000000..0e57a6660e
--- /dev/null
+++ b/arch/arm/dts/rk3568-wolfvision-pf5-display-vz.dtso
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Device tree overlay for the WolfVision PF5 Visualizer display.
+ *
+ * Copyright (C) 2024 WolfVision GmbH.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <arm64/rockchip/rk3568-wolfvision-pf5-display-vz.dtso>
-- 
2.39.5




  parent reply	other threads:[~2024-10-01 10:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 10:47 [PATCH 1/3] ARM: wolfvision PF5: Use upstream IO expander dtso Sascha Hauer
2024-10-01 10:47 ` [PATCH 2/3] ARM: Wolfvision PF5: of_probe only once Sascha Hauer
2024-10-01 10:47 ` Sascha Hauer [this message]
2024-10-02  7:14 ` [PATCH 1/3] ARM: wolfvision PF5: Use upstream IO expander dtso Michael Riesch
2024-10-02 11:58 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241001104738.1069237-3-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox