1 From e39c2eeca4868a7cf34e34fb9a9ca7119c30372a Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
3 Date: Sun, 27 Feb 2022 13:47:09 +0100
4 Subject: [PATCH] dt-bindings: display: add bindings for MIPI DBI
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 commit 2f3468b upstream.
12 Add binding for MIPI DBI compatible SPI panels.
15 - Fix indentation (Rob)
18 - Add sainsmart18 to compatible items (Rob)
19 - Expand write-only description (Sam)
22 - There should only be two compatible (Maxime)
23 - s/panel-dbi-spi/panel-mipi-dbi-spi/in compatible
26 - Move properties to Device Tree (Maxime)
27 - Use contains for compatible (Maxime)
28 - Add backlight property to example
29 - Flesh out description
32 - Fix path for panel-common.yaml
33 - Use unevaluatedProperties
34 - Drop properties which are in the allOf section
35 - Drop model property (Rob)
37 Acked-by: Maxime Ripard <maxime@cerno.tech>
38 Acked-by: Sam Ravnborg <sam@ravnborg.org>
39 Reviewed-by: Rob Herring <robh@kernel.org>
40 Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
41 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
42 Link: https://patchwork.freedesktop.org/patch/msgid/20220227124713.39766-2-noralf@tronnes.org
44 .../display/panel/panel-mipi-dbi-spi.yaml | 126 ++++++++++++++++++
45 1 file changed, 126 insertions(+)
46 create mode 100644 Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml
49 +++ b/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml
51 +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
54 +$id: http://devicetree.org/schemas/display/panel/panel-mipi-dbi-spi.yaml#
55 +$schema: http://devicetree.org/meta-schemas/core.yaml#
57 +title: MIPI DBI SPI Panel
60 + - Noralf Trønnes <noralf@tronnes.org>
63 + This binding is for display panels using a MIPI DBI compatible controller
66 + The MIPI Alliance Standard for Display Bus Interface defines the electrical
67 + and logical interfaces for display controllers historically used in mobile
68 + phones. The standard defines 4 display architecture types and this binding is
69 + for type 1 which has full frame memory. There are 3 interface types in the
70 + standard and type C is the serial interface.
72 + The standard defines the following interface signals for type C:
74 + - Vdd: Power supply for display module
75 + - Vddi: Logic level supply for interface signals
76 + Combined into one in this binding called: power-supply
82 + - SDA: Bidrectional in/out
83 + - D/CX: Data/command selection, high=data, low=command
84 + Called dc-gpios in this binding.
85 + - RESX: Reset when low
86 + Called reset-gpios in this binding.
88 + The type C interface has 3 options:
90 + - Option 1: 9-bit mode and D/CX as the 9th bit
91 + | Command | the next command or following data |
92 + |<0><D7><D6><D5><D4><D3><D2><D1><D0>|<D/CX><D7><D6><D5><D4><D3><D2><D1><D0>|
94 + - Option 2: 16-bit mode and D/CX as a 9th bit
96 + |<X><X><X><X><X><X><X><D/CX><D7><D6><D5><D4><D3><D2><D1><D0>|
98 + - Option 3: 8-bit mode and D/CX as a separate interface line
100 + |<D7><D6><D5><D4><D3><D2><D1><D0>|
102 + The panel resolution is specified using the panel-timing node properties
103 + hactive (width) and vactive (height). The other mandatory panel-timing
104 + properties should be set to zero except clock-frequency which can be
105 + optionally set to inform about the actual pixel clock frequency.
107 + If the panel is wired to the controller at an offset specify this using
108 + hback-porch (x-offset) and vback-porch (y-offset).
111 + - $ref: panel-common.yaml#
112 + - $ref: /schemas/spi/spi-peripheral-props.yaml#
119 + - const: panel-mipi-dbi-spi
124 + Controller is not readable (ie. Din (MISO on the SPI interface) is not
130 + Controller data/command selection (D/CX) in 4-line SPI mode.
131 + If not set, the controller is in 3-line SPI mode.
138 +unevaluatedProperties: false
142 + #include <dt-bindings/gpio/gpio.h>
145 + #address-cells = <1>;
149 + compatible = "sainsmart18", "panel-mipi-dbi-spi";
151 + spi-max-frequency = <40000000>;
153 + dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
154 + reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
157 + backlight = <&backlight>;
167 + clock-frequency = <0>;
168 + hfront-porch = <0>;
170 + vfront-porch = <0>;