From: Hironori KIKUCHI <kikuchan98@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Hironori KIKUCHI <kikuchan98@gmail.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org
Subject: [PATCH 1/2] dt-bindings: display: panel: Add generic MIPI-DSI/DPI panels
Date: Fri, 31 Jan 2025 15:43:53 +0900 [thread overview]
Message-ID: <20250131064354.4163579-2-kikuchan98@gmail.com> (raw)
In-Reply-To: <20250131064354.4163579-1-kikuchan98@gmail.com>
This is a binding for generic MIPI-DSI/DPI panels that require
initialization with a simple command sequence before use.
Although the `panel-simple` binding exists for generic panels, it is not
suitable for panels that require initialization via their communication
bus, as such panels cannot be considered "simple".
While many dedicated bindings exist for such panels, the generic panels
are not complex enough to warrant a dedicated binding because they only
require a "simple" initialization before use.
This binding addresses that gap.
Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
---
.../bindings/display/panel/panel-mipi.yaml | 244 ++++++++++++++++++
1 file changed, 244 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/panel/panel-mipi.yaml
diff --git a/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml b/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml
new file mode 100644
index 00000000000..681614333d8
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/panel-mipi.yaml
@@ -0,0 +1,244 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/panel-mipi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic MIPI-DSI/DPI Panels Requiring Initialization
+
+maintainers:
+ - Hironori KIKUCHI <kikuchan98@gmail.com>
+
+description:
+ This is a binding for generic MIPI-DSI/DPI panels that require
+ initialization with a simple command sequence before use.
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - panel-mipi-dsi
+ - panel-mipi-dpi-spi
+ - items:
+ - {}
+ - enum:
+ - panel-mipi-dsi
+ - panel-mipi-dpi-spi
+
+ reg:
+ description: DSI / SPI channel used by that screen
+ maxItems: 1
+
+ power-supply: true
+
+ io-supply:
+ description: I/O system regulator.
+ No need to set if this is the same as polwer-supply.
+
+ dc-gpios:
+ maxItems: 1
+ description: Controller data/command selection (D/CX) in 4-line SPI mode.
+ If not set, the controller is in 3-line SPI mode.
+ Disallowed for DSI.
+
+ width-mm: true
+ height-mm: true
+ panel-timing: true
+ display-timings: true
+
+ reset-delay:
+ description: Delay (in ms) after the reset command
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ init-delay:
+ description: Delay (in ms) for sending the initial command sequence
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ sleep-delay:
+ description: Delay (in ms) after the sleep command
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ backlight-delay:
+ description: Delay (in ms) for enabling the backlight
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ port: true
+ reset-gpios: true
+ rotation: true
+
+ backlight: true
+
+ init-sequence:
+ description: Encoded initial command sequence.
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+
+ firmware-name:
+ maxItems: 1
+
+ dsi-mode-video:
+ description: Enable MIPI_DSI_MODE_VIDEO.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-video-burst:
+ description: Enable MIPI_DSI_MODE_VIDEO_BURST.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-video-sync-pulse:
+ description: Enable MIPI_DSI_MODE_VIDEO_SYNC_PULSE.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-video-auto-vert:
+ description: Enable MIPI_DSI_MODE_VIDEO_AUTO_VERT.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-video-hse:
+ description: Enable MIPI_DSI_MODE_VIDEO_HSE.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-video-no-hfp:
+ description: Enable MIPI_DSI_MODE_VIDEO_NO_HFP.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-video-no-hbp:
+ description: Enable MIPI_DSI_MODE_VIDEO_NO_HBP.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-video-no-hsa:
+ description: Enable MIPI_DSI_MODE_VIDEO_NO_HSA.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-vsync-flush:
+ description: Enable MIPI_DSI_MODE_VSYNC_FLUSH.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-no-eot-packet:
+ description: Enable MIPI_DSI_MODE_NO_EOT_PACKET.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-clock-non-continuous:
+ description: Enable MIPI_DSI_CLOCK_NON_CONTINUOUS.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-mode-lpm:
+ description: Enable MIPI_DSI_MODE_LPM.
+ Disallowed for SPI.
+ type: boolean
+
+ dsi-hs-pkt-end-aligned:
+ description: Enable MIPI_DSI_HS_PKT_END_ALIGNED.
+ Disallowed for SPI.
+ type: boolean
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: panel-common.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - panel-mipi-dpi-spi
+ then:
+ # SPI mode
+ $ref: /schemas/spi/spi-peripheral-props.yaml#
+ properties:
+ dsi-mode-video: false
+ dsi-mode-video-burst: false
+ dsi-mode-video-sync-pulse: false
+ dsi-mode-video-auto-vert: false
+ dsi-mode-video-hse: false
+ dsi-mode-video-no-hfp: false
+ dsi-mode-video-no-hbp: false
+ dsi-mode-video-no-hsa: false
+ dsi-mode-vsync-flush: false
+ dsi-mode-no-eot-packet: false
+ dsi-clock-non-continuous: false
+ dsi-mode-lpm: false
+ dsi-hs-pkt-end-aligned: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - panel-mipi-dsi
+ then:
+ # DSI mode
+ properties:
+ dc-gpios: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "vendor,some-panel", "panel-mipi-dsi";
+ reg = <0>;
+
+ port {
+ mipi_in_panel: endpoint {
+ remote-endpoint = <&mipi_out_panel>;
+ };
+ };
+ };
+ };
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0{
+ compatible = "panel-mipi-dpi-spi";
+ reg = <0>;
+
+ spi-max-frequency = <40000000>;
+
+ dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+
+ backlight = <&backlight>;
+
+ init-sequence = [
+ 01 11
+ 00
+ 04 b1 01 2c 2d
+ 01 29
+ 80 00 00 00
+ ];
+
+ width-mm = <35>;
+ height-mm = <28>;
+
+ panel-timing {
+ hactive = <160>;
+ vactive = <128>;
+ hback-porch = <0>;
+ vback-porch = <0>;
+ clock-frequency = <0>;
+ hfront-porch = <0>;
+ hsync-len = <0>;
+ vfront-porch = <0>;
+ vsync-len = <0>;
+ };
+ };
+ };
--
2.48.1
next prev parent reply other threads:[~2025-01-31 6:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 6:43 [PATCH 0/2] drm: panel: Add Generic MIPI Panel Driver Hironori KIKUCHI
2025-01-31 6:43 ` Hironori KIKUCHI [this message]
2025-01-31 7:47 ` [PATCH 1/2] dt-bindings: display: panel: Add generic MIPI-DSI/DPI panels Krzysztof Kozlowski
2025-02-01 5:27 ` Hironori KIKUCHI
2025-01-31 6:43 ` [PATCH 2/2] drm: panel: Add a driver for Generic MIPI-DSI/DPI(+SPI) panels Hironori KIKUCHI
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=20250131064354.4163579-2-kikuchan98@gmail.com \
--to=kikuchan98@gmail.com \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®