Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/display/panel/panel-mipi-dbi-spi.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: MIPI DBI SPI Panel
0008 
0009 maintainers:
0010   - Noralf Trønnes <noralf@tronnes.org>
0011 
0012 description: |
0013   This binding is for display panels using a MIPI DBI compatible controller
0014   in SPI mode.
0015 
0016   The MIPI Alliance Standard for Display Bus Interface defines the electrical
0017   and logical interfaces for display controllers historically used in mobile
0018   phones. The standard defines 4 display architecture types and this binding is
0019   for type 1 which has full frame memory. There are 3 interface types in the
0020   standard and type C is the serial interface.
0021 
0022   The standard defines the following interface signals for type C:
0023   - Power:
0024     - Vdd: Power supply for display module
0025     - Vddi: Logic level supply for interface signals
0026     Combined into one in this binding called: power-supply
0027   - Interface:
0028     - CSx: Chip select
0029     - SCL: Serial clock
0030     - Dout: Serial out
0031     - Din: Serial in
0032     - SDA: Bidrectional in/out
0033     - D/CX: Data/command selection, high=data, low=command
0034       Called dc-gpios in this binding.
0035     - RESX: Reset when low
0036       Called reset-gpios in this binding.
0037 
0038   The type C interface has 3 options:
0039 
0040     - Option 1: 9-bit mode and D/CX as the 9th bit
0041       |              Command              |  the next command or following data  |
0042       |<0><D7><D6><D5><D4><D3><D2><D1><D0>|<D/CX><D7><D6><D5><D4><D3><D2><D1><D0>|
0043 
0044     - Option 2: 16-bit mode and D/CX as a 9th bit
0045       |              Command or data                              |
0046       |<X><X><X><X><X><X><X><D/CX><D7><D6><D5><D4><D3><D2><D1><D0>|
0047 
0048     - Option 3: 8-bit mode and D/CX as a separate interface line
0049       |        Command or data         |
0050       |<D7><D6><D5><D4><D3><D2><D1><D0>|
0051 
0052   The panel resolution is specified using the panel-timing node properties
0053   hactive (width) and vactive (height). The other mandatory panel-timing
0054   properties should be set to zero except clock-frequency which can be
0055   optionally set to inform about the actual pixel clock frequency.
0056 
0057   If the panel is wired to the controller at an offset specify this using
0058   hback-porch (x-offset) and vback-porch (y-offset).
0059 
0060 allOf:
0061   - $ref: panel-common.yaml#
0062   - $ref: /schemas/spi/spi-peripheral-props.yaml#
0063 
0064 properties:
0065   compatible:
0066     items:
0067       - enum:
0068           - sainsmart18
0069       - const: panel-mipi-dbi-spi
0070 
0071   write-only:
0072     type: boolean
0073     description:
0074       Controller is not readable (ie. Din (MISO on the SPI interface) is not
0075       wired up).
0076 
0077   dc-gpios:
0078     maxItems: 1
0079     description: |
0080       Controller data/command selection (D/CX) in 4-line SPI mode.
0081       If not set, the controller is in 3-line SPI mode.
0082 
0083 required:
0084   - compatible
0085   - reg
0086   - width-mm
0087   - height-mm
0088   - panel-timing
0089 
0090 unevaluatedProperties: false
0091 
0092 examples:
0093   - |
0094     #include <dt-bindings/gpio/gpio.h>
0095 
0096     spi {
0097         #address-cells = <1>;
0098         #size-cells = <0>;
0099 
0100         display@0{
0101             compatible = "sainsmart18", "panel-mipi-dbi-spi";
0102             reg = <0>;
0103             spi-max-frequency = <40000000>;
0104 
0105             dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
0106             reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
0107             write-only;
0108 
0109             backlight = <&backlight>;
0110 
0111             width-mm = <35>;
0112             height-mm = <28>;
0113 
0114             panel-timing {
0115                 hactive = <160>;
0116                 vactive = <128>;
0117                 hback-porch = <0>;
0118                 vback-porch = <0>;
0119                 clock-frequency = <0>;
0120                 hfront-porch = <0>;
0121                 hsync-len = <0>;
0122                 vfront-porch = <0>;
0123                 vsync-len = <0>;
0124             };
0125         };
0126     };
0127 
0128 ...