1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/display/panel/panel-mipi-dbi-spi.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: MIPI DBI SPI Panel 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Noralf Trønnes <noralf@tronnes.org> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel Vadotdescription: | 13c9ccf3a3SEmmanuel Vadot This binding is for display panels using a MIPI DBI compatible controller 14c9ccf3a3SEmmanuel Vadot in SPI mode. 15c9ccf3a3SEmmanuel Vadot 16c9ccf3a3SEmmanuel Vadot The MIPI Alliance Standard for Display Bus Interface defines the electrical 17c9ccf3a3SEmmanuel Vadot and logical interfaces for display controllers historically used in mobile 18c9ccf3a3SEmmanuel Vadot phones. The standard defines 4 display architecture types and this binding is 19c9ccf3a3SEmmanuel Vadot for type 1 which has full frame memory. There are 3 interface types in the 20c9ccf3a3SEmmanuel Vadot standard and type C is the serial interface. 21c9ccf3a3SEmmanuel Vadot 22c9ccf3a3SEmmanuel Vadot The standard defines the following interface signals for type C: 23c9ccf3a3SEmmanuel Vadot - Power: 24c9ccf3a3SEmmanuel Vadot - Vdd: Power supply for display module 25cb7aa33aSEmmanuel Vadot Called power-supply in this binding. 26c9ccf3a3SEmmanuel Vadot - Vddi: Logic level supply for interface signals 27cb7aa33aSEmmanuel Vadot Called io-supply in this binding. 28c9ccf3a3SEmmanuel Vadot - Interface: 29c9ccf3a3SEmmanuel Vadot - CSx: Chip select 30c9ccf3a3SEmmanuel Vadot - SCL: Serial clock 31c9ccf3a3SEmmanuel Vadot - Dout: Serial out 32c9ccf3a3SEmmanuel Vadot - Din: Serial in 33c9ccf3a3SEmmanuel Vadot - SDA: Bidrectional in/out 34c9ccf3a3SEmmanuel Vadot - D/CX: Data/command selection, high=data, low=command 35c9ccf3a3SEmmanuel Vadot Called dc-gpios in this binding. 36c9ccf3a3SEmmanuel Vadot - RESX: Reset when low 37c9ccf3a3SEmmanuel Vadot Called reset-gpios in this binding. 38c9ccf3a3SEmmanuel Vadot 39c9ccf3a3SEmmanuel Vadot The type C interface has 3 options: 40c9ccf3a3SEmmanuel Vadot 41c9ccf3a3SEmmanuel Vadot - Option 1: 9-bit mode and D/CX as the 9th bit 42c9ccf3a3SEmmanuel Vadot | Command | the next command or following data | 43c9ccf3a3SEmmanuel Vadot |<0><D7><D6><D5><D4><D3><D2><D1><D0>|<D/CX><D7><D6><D5><D4><D3><D2><D1><D0>| 44c9ccf3a3SEmmanuel Vadot 45c9ccf3a3SEmmanuel Vadot - Option 2: 16-bit mode and D/CX as a 9th bit 46c9ccf3a3SEmmanuel Vadot | Command or data | 47c9ccf3a3SEmmanuel Vadot |<X><X><X><X><X><X><X><D/CX><D7><D6><D5><D4><D3><D2><D1><D0>| 48c9ccf3a3SEmmanuel Vadot 49c9ccf3a3SEmmanuel Vadot - Option 3: 8-bit mode and D/CX as a separate interface line 50c9ccf3a3SEmmanuel Vadot | Command or data | 51c9ccf3a3SEmmanuel Vadot |<D7><D6><D5><D4><D3><D2><D1><D0>| 52c9ccf3a3SEmmanuel Vadot 53c9ccf3a3SEmmanuel Vadot The panel resolution is specified using the panel-timing node properties 54c9ccf3a3SEmmanuel Vadot hactive (width) and vactive (height). The other mandatory panel-timing 55c9ccf3a3SEmmanuel Vadot properties should be set to zero except clock-frequency which can be 56c9ccf3a3SEmmanuel Vadot optionally set to inform about the actual pixel clock frequency. 57c9ccf3a3SEmmanuel Vadot 58c9ccf3a3SEmmanuel Vadot If the panel is wired to the controller at an offset specify this using 59c9ccf3a3SEmmanuel Vadot hback-porch (x-offset) and vback-porch (y-offset). 60c9ccf3a3SEmmanuel Vadot 61c9ccf3a3SEmmanuel VadotallOf: 62c9ccf3a3SEmmanuel Vadot - $ref: panel-common.yaml# 63c9ccf3a3SEmmanuel Vadot - $ref: /schemas/spi/spi-peripheral-props.yaml# 64c9ccf3a3SEmmanuel Vadot 65c9ccf3a3SEmmanuel Vadotproperties: 66c9ccf3a3SEmmanuel Vadot compatible: 67c9ccf3a3SEmmanuel Vadot items: 68c9ccf3a3SEmmanuel Vadot - enum: 69*aa1a8ff2SEmmanuel Vadot - saef,sftc154b 70c9ccf3a3SEmmanuel Vadot - sainsmart18 71f126890aSEmmanuel Vadot - shineworld,lh133k 72c9ccf3a3SEmmanuel Vadot - const: panel-mipi-dbi-spi 73c9ccf3a3SEmmanuel Vadot 74c9ccf3a3SEmmanuel Vadot write-only: 75c9ccf3a3SEmmanuel Vadot type: boolean 76c9ccf3a3SEmmanuel Vadot description: 77c9ccf3a3SEmmanuel Vadot Controller is not readable (ie. Din (MISO on the SPI interface) is not 78c9ccf3a3SEmmanuel Vadot wired up). 79c9ccf3a3SEmmanuel Vadot 80c9ccf3a3SEmmanuel Vadot dc-gpios: 81c9ccf3a3SEmmanuel Vadot maxItems: 1 82c9ccf3a3SEmmanuel Vadot description: | 83c9ccf3a3SEmmanuel Vadot Controller data/command selection (D/CX) in 4-line SPI mode. 84c9ccf3a3SEmmanuel Vadot If not set, the controller is in 3-line SPI mode. 85c9ccf3a3SEmmanuel Vadot 86cb7aa33aSEmmanuel Vadot io-supply: 87cb7aa33aSEmmanuel Vadot description: | 88cb7aa33aSEmmanuel Vadot Logic level supply for interface signals (Vddi). 89cb7aa33aSEmmanuel Vadot No need to set if this is the same as power-supply. 90cb7aa33aSEmmanuel Vadot 91f126890aSEmmanuel Vadot spi-3wire: true 92f126890aSEmmanuel Vadot 93c9ccf3a3SEmmanuel Vadotrequired: 94c9ccf3a3SEmmanuel Vadot - compatible 95c9ccf3a3SEmmanuel Vadot - reg 96c9ccf3a3SEmmanuel Vadot - width-mm 97c9ccf3a3SEmmanuel Vadot - height-mm 98c9ccf3a3SEmmanuel Vadot - panel-timing 99c9ccf3a3SEmmanuel Vadot 100c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 101c9ccf3a3SEmmanuel Vadot 102c9ccf3a3SEmmanuel Vadotexamples: 103c9ccf3a3SEmmanuel Vadot - | 104c9ccf3a3SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 105c9ccf3a3SEmmanuel Vadot 106c9ccf3a3SEmmanuel Vadot spi { 107c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 108c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 109c9ccf3a3SEmmanuel Vadot 110c9ccf3a3SEmmanuel Vadot display@0{ 111c9ccf3a3SEmmanuel Vadot compatible = "sainsmart18", "panel-mipi-dbi-spi"; 112c9ccf3a3SEmmanuel Vadot reg = <0>; 113c9ccf3a3SEmmanuel Vadot spi-max-frequency = <40000000>; 114c9ccf3a3SEmmanuel Vadot 115c9ccf3a3SEmmanuel Vadot dc-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; 116c9ccf3a3SEmmanuel Vadot reset-gpios = <&gpio 25 GPIO_ACTIVE_HIGH>; 117c9ccf3a3SEmmanuel Vadot write-only; 118c9ccf3a3SEmmanuel Vadot 119c9ccf3a3SEmmanuel Vadot backlight = <&backlight>; 120c9ccf3a3SEmmanuel Vadot 121c9ccf3a3SEmmanuel Vadot width-mm = <35>; 122c9ccf3a3SEmmanuel Vadot height-mm = <28>; 123c9ccf3a3SEmmanuel Vadot 124c9ccf3a3SEmmanuel Vadot panel-timing { 125c9ccf3a3SEmmanuel Vadot hactive = <160>; 126c9ccf3a3SEmmanuel Vadot vactive = <128>; 127c9ccf3a3SEmmanuel Vadot hback-porch = <0>; 128c9ccf3a3SEmmanuel Vadot vback-porch = <0>; 129c9ccf3a3SEmmanuel Vadot clock-frequency = <0>; 130c9ccf3a3SEmmanuel Vadot hfront-porch = <0>; 131c9ccf3a3SEmmanuel Vadot hsync-len = <0>; 132c9ccf3a3SEmmanuel Vadot vfront-porch = <0>; 133c9ccf3a3SEmmanuel Vadot vsync-len = <0>; 134c9ccf3a3SEmmanuel Vadot }; 135c9ccf3a3SEmmanuel Vadot }; 136c9ccf3a3SEmmanuel Vadot }; 137c9ccf3a3SEmmanuel Vadot 138c9ccf3a3SEmmanuel Vadot... 139