[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220516162826.23025-2-max.oss.09@gmail.com>
Date: Mon, 16 May 2022 18:28:25 +0200
From: Max Krummenacher <max.oss.09@...il.com>
To: max.krummenacher@...adex.com
Cc: Christoph Niedermaier <cniedermaier@...electronics.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Marek Vasut <marex@...x.de>,
Francesco Dolcini <francesco.dolcini@...adex.com>,
Maxime Ripard <mripard@...nel.org>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Sam Ravnborg <sam@...nborg.org>,
Thierry Reding <thierry.reding@...il.com>,
devicetree@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v1 1/2] dt-bindings: display: add new bus-format property for panel-dpi
From: Max Krummenacher <max.krummenacher@...adex.com>
The property is used to set the enum bus_format and infer the bpc
for a panel defined by 'panel-dpi'.
This specifies how the panel is connected to the display interface.
Signed-off-by: Max Krummenacher <max.krummenacher@...adex.com>
---
.../bindings/display/panel/panel-dpi.yaml | 11 +++++++++
.../dt-bindings/display/dt-media-bus-format.h | 23 +++++++++++++++++++
2 files changed, 34 insertions(+)
create mode 100644 include/dt-bindings/display/dt-media-bus-format.h
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
index dae0676b5c6e..ca44e96c3001 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
@@ -21,6 +21,14 @@ properties:
- {}
- const: panel-dpi
+ bus-format:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Describes how the display panel is connected to the display interface.
+ Valid values are defined in <dt-bindings/display/dt-media-bus-format.h>.
+ The mapping between the color/significance of the panel lines to the
+ parallel data lines are defined in [1].
+ [1] https://www.kernel.org/doc/html/v5.17/userspace-api/media/v4l/subdev-formats.html#packed-rgb-formats
backlight: true
enable-gpios: true
height-mm: true
@@ -39,11 +47,14 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/display/dt-media-bus-format.h>
+ ...
panel {
compatible = "startek,startek-kd050c", "panel-dpi";
label = "osddisplay";
power-supply = <&vcc_supply>;
backlight = <&backlight>;
+ bus-format = "DT_MEDIA_BUS_FMT_RGB888_1X24";
port {
lcd_in: endpoint {
diff --git a/include/dt-bindings/display/dt-media-bus-format.h b/include/dt-bindings/display/dt-media-bus-format.h
new file mode 100644
index 000000000000..c0f2a7b59aa1
--- /dev/null
+++ b/include/dt-bindings/display/dt-media-bus-format.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
+/*
+ * Copyright 2022 Max Krummenacher <max.krummenacher@...adex.com>
+ */
+
+#ifndef __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H
+#define __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H
+
+/*
+ * Attention: Keep these macro names in sync with
+ * include/uapi/linux/media-bus-format.h
+ */
+
+#define DT_MEDIA_BUS_FMT_RGB565_1X16 1
+#define DT_MEDIA_BUS_FMT_RGB666_1X18 2
+#define DT_MEDIA_BUS_FMT_RBG888_1X24 3
+#define DT_MEDIA_BUS_FMT_RGB666_1X24_CPADHI 4
+#define DT_MEDIA_BUS_FMT_BGR888_1X24 5
+#define DT_MEDIA_BUS_FMT_GBR888_1X24 6
+#define DT_MEDIA_BUS_FMT_RGB888_1X24 7
+#define DT_MEDIA_BUS_FMT_RGB888_1X32_PADHI 8
+
+#endif /* __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H */
--
2.20.1
Powered by blists - more mailing lists