12f3468b8SNoralf Trønnes# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) 22f3468b8SNoralf Trønnes%YAML 1.2 32f3468b8SNoralf Trønnes--- 42f3468b8SNoralf Trønnes$id: http://devicetree.org/schemas/display/panel/panel-mipi-dbi-spi.yaml# 52f3468b8SNoralf Trønnes$schema: http://devicetree.org/meta-schemas/core.yaml# 62f3468b8SNoralf Trønnes 72f3468b8SNoralf Trønnestitle: MIPI DBI SPI Panel 82f3468b8SNoralf Trønnes 92f3468b8SNoralf Trønnesmaintainers: 102f3468b8SNoralf Trønnes - Noralf Trønnes <noralf@tronnes.org> 112f3468b8SNoralf Trønnes 122f3468b8SNoralf Trønnesdescription: | 132f3468b8SNoralf Trønnes This binding is for display panels using a MIPI DBI compatible controller 142f3468b8SNoralf Trønnes in SPI mode. 152f3468b8SNoralf Trønnes 162f3468b8SNoralf Trønnes The MIPI Alliance Standard for Display Bus Interface defines the electrical 172f3468b8SNoralf Trønnes and logical interfaces for display controllers historically used in mobile 182f3468b8SNoralf Trønnes phones. The standard defines 4 display architecture types and this binding is 192f3468b8SNoralf Trønnes for type 1 which has full frame memory. There are 3 interface types in the 202f3468b8SNoralf Trønnes standard and type C is the serial interface. 212f3468b8SNoralf Trønnes 222f3468b8SNoralf Trønnes The standard defines the following interface signals for type C: 232f3468b8SNoralf Trønnes - Power: 242f3468b8SNoralf Trønnes - Vdd: Power supply for display module 252f3468b8SNoralf Trønnes - Vddi: Logic level supply for interface signals 262f3468b8SNoralf Trønnes Combined into one in this binding called: power-supply 272f3468b8SNoralf Trønnes - Interface: 282f3468b8SNoralf Trønnes - CSx: Chip select 292f3468b8SNoralf Trønnes - SCL: Serial clock 302f3468b8SNoralf Trønnes - Dout: Serial out 312f3468b8SNoralf Trønnes - Din: Serial in 322f3468b8SNoralf Trønnes - SDA: Bidrectional in/out 332f3468b8SNoralf Trønnes - D/CX: Data/command selection, high=data, low=command 342f3468b8SNoralf Trønnes Called dc-gpios in this binding. 352f3468b8SNoralf Trønnes - RESX: Reset when low 362f3468b8SNoralf Trønnes Called reset-gpios in this binding. 372f3468b8SNoralf Trønnes 382f3468b8SNoralf Trønnes The type C interface has 3 options: 392f3468b8SNoralf Trønnes 402f3468b8SNoralf Trønnes - Option 1: 9-bit mode and D/CX as the 9th bit 412f3468b8SNoralf Trønnes | Command | the next command or following data | 422f3468b8SNoralf Trønnes |<0><D7><D6><D5><D4><D3><D2><D1><D0>|<D/CX><D7><D6><D5><D4><D3><D2><D1><D0>| 432f3468b8SNoralf Trønnes 442f3468b8SNoralf Trønnes - Option 2: 16-bit mode and D/CX as a 9th bit 452f3468b8SNoralf Trønnes | Command or data | 462f3468b8SNoralf Trønnes |<X><X><X><X><X><X><X><D/CX><D7><D6><D5><D4><D3><D2><D1><D0>| 472f3468b8SNoralf Trønnes 482f3468b8SNoralf Trønnes - Option 3: 8-bit mode and D/CX as a separate interface line 492f3468b8SNoralf Trønnes | Command or data | 502f3468b8SNoralf Trønnes |<D7><D6><D5><D4><D3><D2><D1><D0>| 512f3468b8SNoralf Trønnes 522f3468b8SNoralf Trønnes The panel resolution is specified using the panel-timing node properties 532f3468b8SNoralf Trønnes hactive (width) and vactive (height). The other mandatory panel-timing 542f3468b8SNoralf Trønnes properties should be set to zero except clock-frequency which can be 552f3468b8SNoralf Trønnes optionally set to inform about the actual pixel clock frequency. 562f3468b8SNoralf Trønnes 572f3468b8SNoralf Trønnes If the panel is wired to the controller at an offset specify this using 582f3468b8SNoralf Trønnes hback-porch (x-offset) and vback-porch (y-offset). 592f3468b8SNoralf Trønnes 602f3468b8SNoralf TrønnesallOf: 612f3468b8SNoralf Trønnes - $ref: panel-common.yaml# 622f3468b8SNoralf Trønnes - $ref: /schemas/spi/spi-peripheral-props.yaml# 632f3468b8SNoralf Trønnes 642f3468b8SNoralf Trønnesproperties: 652f3468b8SNoralf Trønnes compatible: 662f3468b8SNoralf Trønnes items: 672f3468b8SNoralf Trønnes - enum: 682f3468b8SNoralf Trønnes - sainsmart18 692f3468b8SNoralf Trønnes - const: panel-mipi-dbi-spi 702f3468b8SNoralf Trønnes 712f3468b8SNoralf Trønnes write-only: 722f3468b8SNoralf Trønnes type: boolean 732f3468b8SNoralf Trønnes description: 742f3468b8SNoralf Trønnes Controller is not readable (ie. Din (MISO on the SPI interface) is not 752f3468b8SNoralf Trønnes wired up). 762f3468b8SNoralf Trønnes 772f3468b8SNoralf Trønnes dc-gpios: 782f3468b8SNoralf Trønnes maxItems: 1 792f3468b8SNoralf Trønnes description: | 802f3468b8SNoralf Trønnes Controller data/command selection (D/CX) in 4-line SPI mode. 812f3468b8SNoralf Trønnes If not set, the controller is in 3-line SPI mode. 822f3468b8SNoralf Trønnes 832f3468b8SNoralf Trønnesrequired: 842f3468b8SNoralf Trønnes - compatible 852f3468b8SNoralf Trønnes - reg 86*1ecc0c09SMarek Vasut - width-mm 87*1ecc0c09SMarek Vasut - height-mm 882f3468b8SNoralf Trønnes - panel-timing 892f3468b8SNoralf Trønnes 902f3468b8SNoralf TrønnesunevaluatedProperties: false 912f3468b8SNoralf Trønnes 922f3468b8SNoralf Trønnesexamples: 932f3468b8SNoralf Trønnes - | 942f3468b8SNoralf Trønnes #include <dt-bindings/gpio/gpio.h> 952f3468b8SNoralf Trønnes 962f3468b8SNoralf Trønnes spi { 972f3468b8SNoralf Trønnes #address-cells = <1>; 982f3468b8SNoralf Trønnes #size-cells = <0>; 992f3468b8SNoralf Trønnes 1002f3468b8SNoralf Trønnes display@0{ 1012f3468b8SNoralf Trønnes compatible = "sainsmart18", "panel-mipi-dbi-spi"; 1022f3468b8SNoralf Trønnes reg = <0>; 1032f3468b8SNoralf Trønnes spi-max-frequency = <40000000>; 1042f3468b8SNoralf Trønnes 1052f3468b8SNoralf Trønnes dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; 1062f3468b8SNoralf Trønnes reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; 1072f3468b8SNoralf Trønnes write-only; 1082f3468b8SNoralf Trønnes 1092f3468b8SNoralf Trønnes backlight = <&backlight>; 1102f3468b8SNoralf Trønnes 1112f3468b8SNoralf Trønnes width-mm = <35>; 1122f3468b8SNoralf Trønnes height-mm = <28>; 1132f3468b8SNoralf Trønnes 1142f3468b8SNoralf Trønnes panel-timing { 1152f3468b8SNoralf Trønnes hactive = <160>; 1162f3468b8SNoralf Trønnes vactive = <128>; 1172f3468b8SNoralf Trønnes hback-porch = <0>; 1182f3468b8SNoralf Trønnes vback-porch = <0>; 1192f3468b8SNoralf Trønnes clock-frequency = <0>; 1202f3468b8SNoralf Trønnes hfront-porch = <0>; 1212f3468b8SNoralf Trønnes hsync-len = <0>; 1222f3468b8SNoralf Trønnes vfront-porch = <0>; 1232f3468b8SNoralf Trønnes vsync-len = <0>; 1242f3468b8SNoralf Trønnes }; 1252f3468b8SNoralf Trønnes }; 1262f3468b8SNoralf Trønnes }; 1272f3468b8SNoralf Trønnes 1282f3468b8SNoralf Trønnes... 129