[PATCH 3/3] ARM: Wolfvision PF5: add display overlay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux