1440b075bSKrzysztof Kozlowski# 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 2594914b85SOtto Pflüger Called power-supply in this binding. 262f3468b8SNoralf Trønnes - Vddi: Logic level supply for interface signals 2794914b85SOtto 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: 6952810f62SChris Morgan - saef,sftc154b 702f3468b8SNoralf Trønnes - sainsmart18 7196b2b1a2SLeonard Göhrs - shineworld,lh133k 722f3468b8SNoralf Trønnes - const: panel-mipi-dbi-spi 732f3468b8SNoralf Trønnes 74*6b2358ffSKrzysztof Kozlowski reg: 75*6b2358ffSKrzysztof Kozlowski maxItems: 1 76*6b2358ffSKrzysztof Kozlowski 772f3468b8SNoralf Trønnes write-only: 782f3468b8SNoralf Trønnes type: boolean 792f3468b8SNoralf Trønnes description: 802f3468b8SNoralf Trønnes Controller is not readable (ie. Din (MISO on the SPI interface) is not 812f3468b8SNoralf Trønnes wired up). 822f3468b8SNoralf Trønnes 832f3468b8SNoralf Trønnes dc-gpios: 842f3468b8SNoralf Trønnes maxItems: 1 852f3468b8SNoralf Trønnes description: | 862f3468b8SNoralf Trønnes Controller data/command selection (D/CX) in 4-line SPI mode. 872f3468b8SNoralf Trønnes If not set, the controller is in 3-line SPI mode. 882f3468b8SNoralf Trønnes 8994914b85SOtto Pflüger io-supply: 9094914b85SOtto Pflüger description: | 9194914b85SOtto Pflüger Logic level supply for interface signals (Vddi). 9294914b85SOtto Pflüger No need to set if this is the same as power-supply. 9394914b85SOtto Pflüger 94222e0a8eSLeonard Göhrs spi-3wire: true 95222e0a8eSLeonard Göhrs 962f3468b8SNoralf Trønnesrequired: 972f3468b8SNoralf Trønnes - compatible 982f3468b8SNoralf Trønnes - reg 991ecc0c09SMarek Vasut - width-mm 1001ecc0c09SMarek Vasut - height-mm 1012f3468b8SNoralf Trønnes - panel-timing 1022f3468b8SNoralf Trønnes 1032f3468b8SNoralf TrønnesunevaluatedProperties: false 1042f3468b8SNoralf Trønnes 1052f3468b8SNoralf Trønnesexamples: 1062f3468b8SNoralf Trønnes - | 1072f3468b8SNoralf Trønnes #include <dt-bindings/gpio/gpio.h> 1082f3468b8SNoralf Trønnes 1092f3468b8SNoralf Trønnes spi { 1102f3468b8SNoralf Trønnes #address-cells = <1>; 1112f3468b8SNoralf Trønnes #size-cells = <0>; 1122f3468b8SNoralf Trønnes 1132f3468b8SNoralf Trønnes display@0{ 1142f3468b8SNoralf Trønnes compatible = "sainsmart18", "panel-mipi-dbi-spi"; 1152f3468b8SNoralf Trønnes reg = <0>; 1162f3468b8SNoralf Trønnes spi-max-frequency = <40000000>; 1172f3468b8SNoralf Trønnes 1182f3468b8SNoralf Trønnes dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; 1192f3468b8SNoralf Trønnes reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; 1202f3468b8SNoralf Trønnes write-only; 1212f3468b8SNoralf Trønnes 1222f3468b8SNoralf Trønnes backlight = <&backlight>; 1232f3468b8SNoralf Trønnes 1242f3468b8SNoralf Trønnes width-mm = <35>; 1252f3468b8SNoralf Trønnes height-mm = <28>; 1262f3468b8SNoralf Trønnes 1272f3468b8SNoralf Trønnes panel-timing { 1282f3468b8SNoralf Trønnes hactive = <160>; 1292f3468b8SNoralf Trønnes vactive = <128>; 1302f3468b8SNoralf Trønnes hback-porch = <0>; 1312f3468b8SNoralf Trønnes vback-porch = <0>; 1322f3468b8SNoralf Trønnes clock-frequency = <0>; 1332f3468b8SNoralf Trønnes hfront-porch = <0>; 1342f3468b8SNoralf Trønnes hsync-len = <0>; 1352f3468b8SNoralf Trønnes vfront-porch = <0>; 1362f3468b8SNoralf Trønnes vsync-len = <0>; 1372f3468b8SNoralf Trønnes }; 1382f3468b8SNoralf Trønnes }; 1392f3468b8SNoralf Trønnes }; 1402f3468b8SNoralf Trønnes 1412f3468b8SNoralf Trønnes... 142