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 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: 692f3468b8SNoralf Trønnes - sainsmart18 7096b2b1a2SLeonard Göhrs - shineworld,lh133k 712f3468b8SNoralf Trønnes - const: panel-mipi-dbi-spi 722f3468b8SNoralf Trønnes 732f3468b8SNoralf Trønnes write-only: 742f3468b8SNoralf Trønnes type: boolean 752f3468b8SNoralf Trønnes description: 762f3468b8SNoralf Trønnes Controller is not readable (ie. Din (MISO on the SPI interface) is not 772f3468b8SNoralf Trønnes wired up). 782f3468b8SNoralf Trønnes 792f3468b8SNoralf Trønnes dc-gpios: 802f3468b8SNoralf Trønnes maxItems: 1 812f3468b8SNoralf Trønnes description: | 822f3468b8SNoralf Trønnes Controller data/command selection (D/CX) in 4-line SPI mode. 832f3468b8SNoralf Trønnes If not set, the controller is in 3-line SPI mode. 842f3468b8SNoralf Trønnes 8594914b85SOtto Pflüger io-supply: 8694914b85SOtto Pflüger description: | 8794914b85SOtto Pflüger Logic level supply for interface signals (Vddi). 8894914b85SOtto Pflüger No need to set if this is the same as power-supply. 8994914b85SOtto Pflüger 90*222e0a8eSLeonard Göhrs spi-3wire: true 91*222e0a8eSLeonard Göhrs 922f3468b8SNoralf Trønnesrequired: 932f3468b8SNoralf Trønnes - compatible 942f3468b8SNoralf Trønnes - reg 951ecc0c09SMarek Vasut - width-mm 961ecc0c09SMarek Vasut - height-mm 972f3468b8SNoralf Trønnes - panel-timing 982f3468b8SNoralf Trønnes 992f3468b8SNoralf TrønnesunevaluatedProperties: false 1002f3468b8SNoralf Trønnes 1012f3468b8SNoralf Trønnesexamples: 1022f3468b8SNoralf Trønnes - | 1032f3468b8SNoralf Trønnes #include <dt-bindings/gpio/gpio.h> 1042f3468b8SNoralf Trønnes 1052f3468b8SNoralf Trønnes spi { 1062f3468b8SNoralf Trønnes #address-cells = <1>; 1072f3468b8SNoralf Trønnes #size-cells = <0>; 1082f3468b8SNoralf Trønnes 1092f3468b8SNoralf Trønnes display@0{ 1102f3468b8SNoralf Trønnes compatible = "sainsmart18", "panel-mipi-dbi-spi"; 1112f3468b8SNoralf Trønnes reg = <0>; 1122f3468b8SNoralf Trønnes spi-max-frequency = <40000000>; 1132f3468b8SNoralf Trønnes 1142f3468b8SNoralf Trønnes dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; 1152f3468b8SNoralf Trønnes reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; 1162f3468b8SNoralf Trønnes write-only; 1172f3468b8SNoralf Trønnes 1182f3468b8SNoralf Trønnes backlight = <&backlight>; 1192f3468b8SNoralf Trønnes 1202f3468b8SNoralf Trønnes width-mm = <35>; 1212f3468b8SNoralf Trønnes height-mm = <28>; 1222f3468b8SNoralf Trønnes 1232f3468b8SNoralf Trønnes panel-timing { 1242f3468b8SNoralf Trønnes hactive = <160>; 1252f3468b8SNoralf Trønnes vactive = <128>; 1262f3468b8SNoralf Trønnes hback-porch = <0>; 1272f3468b8SNoralf Trønnes vback-porch = <0>; 1282f3468b8SNoralf Trønnes clock-frequency = <0>; 1292f3468b8SNoralf Trønnes hfront-porch = <0>; 1302f3468b8SNoralf Trønnes hsync-len = <0>; 1312f3468b8SNoralf Trønnes vfront-porch = <0>; 1322f3468b8SNoralf Trønnes vsync-len = <0>; 1332f3468b8SNoralf Trønnes }; 1342f3468b8SNoralf Trønnes }; 1352f3468b8SNoralf Trønnes }; 1362f3468b8SNoralf Trønnes 1372f3468b8SNoralf Trønnes... 138