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 25*94914b85SOtto Pflüger Called power-supply in this binding. 262f3468b8SNoralf Trønnes - Vddi: Logic level supply for interface signals 27*94914b85SOtto Pflüger Called io-supply in this binding. 282f3468b8SNoralf Trønnes - Interface: 292f3468b8SNoralf Trønnes - CSx: Chip select 302f3468b8SNoralf Trønnes - SCL: Serial clock 312f3468b8SNoralf Trønnes - Dout: Serial out 322f3468b8SNoralf Trønnes - Din: Serial in 332f3468b8SNoralf Trønnes - SDA: Bidrectional in/out 342f3468b8SNoralf Trønnes - D/CX: Data/command selection, high=data, low=command 352f3468b8SNoralf Trønnes Called dc-gpios in this binding. 362f3468b8SNoralf Trønnes - RESX: Reset when low 372f3468b8SNoralf Trønnes Called reset-gpios in this binding. 382f3468b8SNoralf Trønnes 392f3468b8SNoralf Trønnes The type C interface has 3 options: 402f3468b8SNoralf Trønnes 412f3468b8SNoralf Trønnes - Option 1: 9-bit mode and D/CX as the 9th bit 422f3468b8SNoralf Trønnes | Command | the next command or following data | 432f3468b8SNoralf Trønnes |<0><D7><D6><D5><D4><D3><D2><D1><D0>|<D/CX><D7><D6><D5><D4><D3><D2><D1><D0>| 442f3468b8SNoralf Trønnes 452f3468b8SNoralf Trønnes - Option 2: 16-bit mode and D/CX as a 9th bit 462f3468b8SNoralf Trønnes | Command or data | 472f3468b8SNoralf Trønnes |<X><X><X><X><X><X><X><D/CX><D7><D6><D5><D4><D3><D2><D1><D0>| 482f3468b8SNoralf Trønnes 492f3468b8SNoralf Trønnes - Option 3: 8-bit mode and D/CX as a separate interface line 502f3468b8SNoralf Trønnes | Command or data | 512f3468b8SNoralf Trønnes |<D7><D6><D5><D4><D3><D2><D1><D0>| 522f3468b8SNoralf Trønnes 532f3468b8SNoralf Trønnes The panel resolution is specified using the panel-timing node properties 542f3468b8SNoralf Trønnes hactive (width) and vactive (height). The other mandatory panel-timing 552f3468b8SNoralf Trønnes properties should be set to zero except clock-frequency which can be 562f3468b8SNoralf Trønnes optionally set to inform about the actual pixel clock frequency. 572f3468b8SNoralf Trønnes 582f3468b8SNoralf Trønnes If the panel is wired to the controller at an offset specify this using 592f3468b8SNoralf Trønnes hback-porch (x-offset) and vback-porch (y-offset). 602f3468b8SNoralf Trønnes 612f3468b8SNoralf TrønnesallOf: 622f3468b8SNoralf Trønnes - $ref: panel-common.yaml# 632f3468b8SNoralf Trønnes - $ref: /schemas/spi/spi-peripheral-props.yaml# 642f3468b8SNoralf Trønnes 652f3468b8SNoralf Trønnesproperties: 662f3468b8SNoralf Trønnes compatible: 672f3468b8SNoralf Trønnes items: 682f3468b8SNoralf Trønnes - enum: 692f3468b8SNoralf Trønnes - sainsmart18 702f3468b8SNoralf Trønnes - const: panel-mipi-dbi-spi 712f3468b8SNoralf Trønnes 722f3468b8SNoralf Trønnes write-only: 732f3468b8SNoralf Trønnes type: boolean 742f3468b8SNoralf Trønnes description: 752f3468b8SNoralf Trønnes Controller is not readable (ie. Din (MISO on the SPI interface) is not 762f3468b8SNoralf Trønnes wired up). 772f3468b8SNoralf Trønnes 782f3468b8SNoralf Trønnes dc-gpios: 792f3468b8SNoralf Trønnes maxItems: 1 802f3468b8SNoralf Trønnes description: | 812f3468b8SNoralf Trønnes Controller data/command selection (D/CX) in 4-line SPI mode. 822f3468b8SNoralf Trønnes If not set, the controller is in 3-line SPI mode. 832f3468b8SNoralf Trønnes 84*94914b85SOtto Pflüger io-supply: 85*94914b85SOtto Pflüger description: | 86*94914b85SOtto Pflüger Logic level supply for interface signals (Vddi). 87*94914b85SOtto Pflüger No need to set if this is the same as power-supply. 88*94914b85SOtto Pflüger 892f3468b8SNoralf Trønnesrequired: 902f3468b8SNoralf Trønnes - compatible 912f3468b8SNoralf Trønnes - reg 921ecc0c09SMarek Vasut - width-mm 931ecc0c09SMarek Vasut - height-mm 942f3468b8SNoralf Trønnes - panel-timing 952f3468b8SNoralf Trønnes 962f3468b8SNoralf TrønnesunevaluatedProperties: false 972f3468b8SNoralf Trønnes 982f3468b8SNoralf Trønnesexamples: 992f3468b8SNoralf Trønnes - | 1002f3468b8SNoralf Trønnes #include <dt-bindings/gpio/gpio.h> 1012f3468b8SNoralf Trønnes 1022f3468b8SNoralf Trønnes spi { 1032f3468b8SNoralf Trønnes #address-cells = <1>; 1042f3468b8SNoralf Trønnes #size-cells = <0>; 1052f3468b8SNoralf Trønnes 1062f3468b8SNoralf Trønnes display@0{ 1072f3468b8SNoralf Trønnes compatible = "sainsmart18", "panel-mipi-dbi-spi"; 1082f3468b8SNoralf Trønnes reg = <0>; 1092f3468b8SNoralf Trønnes spi-max-frequency = <40000000>; 1102f3468b8SNoralf Trønnes 1112f3468b8SNoralf Trønnes dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; 1122f3468b8SNoralf Trønnes reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; 1132f3468b8SNoralf Trønnes write-only; 1142f3468b8SNoralf Trønnes 1152f3468b8SNoralf Trønnes backlight = <&backlight>; 1162f3468b8SNoralf Trønnes 1172f3468b8SNoralf Trønnes width-mm = <35>; 1182f3468b8SNoralf Trønnes height-mm = <28>; 1192f3468b8SNoralf Trønnes 1202f3468b8SNoralf Trønnes panel-timing { 1212f3468b8SNoralf Trønnes hactive = <160>; 1222f3468b8SNoralf Trønnes vactive = <128>; 1232f3468b8SNoralf Trønnes hback-porch = <0>; 1242f3468b8SNoralf Trønnes vback-porch = <0>; 1252f3468b8SNoralf Trønnes clock-frequency = <0>; 1262f3468b8SNoralf Trønnes hfront-porch = <0>; 1272f3468b8SNoralf Trønnes hsync-len = <0>; 1282f3468b8SNoralf Trønnes vfront-porch = <0>; 1292f3468b8SNoralf Trønnes vsync-len = <0>; 1302f3468b8SNoralf Trønnes }; 1312f3468b8SNoralf Trønnes }; 1322f3468b8SNoralf Trønnes }; 1332f3468b8SNoralf Trønnes 1342f3468b8SNoralf Trønnes... 135