Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: display: st7701: Add Anbernic RG28XX panel

The RG28XX panel is a display panel of the Anbernic RG28XX, a handheld
gaming device from Anbernic. It is 2.8 inches in size (diagonally) with
a resolution of 480x640.

This panel is driven by a variant of the ST7701 driver IC internally,
confirmed by dumping and analyzing its BSP initialization sequence
by using a logic analyzer. It is very similar to the existing
densitron,dmt028vghmcmi-1a panel, but differs in some unknown
register values, so add a new entry for the panel to distinguish them.

Additionally, the panel only has an SPI instead of MIPI DSI.
So add and modify for SPI as well.

Although a panel connected via SPI with a D/CX pin theoretically exists,
no such panels have been found for this driver yet. Therefore, disable
the use of the dc-gpios property for all currently known devices.

Signed-off-by: Hironori KIKUCHI <kikuchan98@gmail.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Link: https://lore.kernel.org/r/20240804061503.881283-4-kikuchan98@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240804061503.881283-4-kikuchan98@gmail.com

authored by

Hironori KIKUCHI and committed by
Neil Armstrong
9a01fb40 a055c91a

+64 -5
+64 -5
Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml
··· 20 20 Densitron DMT028VGHMCMI-1A is 480x640, 2-lane MIPI DSI LCD panel 21 21 which has built-in ST7701 chip. 22 22 23 - allOf: 24 - - $ref: panel-common.yaml# 25 - 26 23 properties: 27 24 compatible: 28 25 items: 29 26 - enum: 30 27 - anbernic,rg-arc-panel 28 + - anbernic,rg28xx-panel 31 29 - densitron,dmt028vghmcmi-1a 32 30 - elida,kd50t048a 33 31 - techstar,ts8550b 34 32 - const: sitronix,st7701 35 33 36 34 reg: 37 - description: DSI virtual channel used by that screen 35 + description: DSI / SPI channel used by that screen 38 36 maxItems: 1 39 37 40 38 VCC-supply: ··· 40 42 41 43 IOVCC-supply: 42 44 description: I/O system regulator 45 + 46 + dc-gpios: 47 + maxItems: 1 48 + description: 49 + Controller data/command selection (D/CX) in 4-line SPI mode. 50 + If not set, the controller is in 3-line SPI mode. 51 + Disallowed for DSI. 43 52 44 53 port: true 45 54 reset-gpios: true ··· 62 57 - port 63 58 - reset-gpios 64 59 65 - additionalProperties: false 60 + allOf: 61 + - $ref: panel-common.yaml# 62 + - if: 63 + properties: 64 + compatible: 65 + contains: 66 + # SPI connected panels 67 + enum: 68 + - anbernic,rg28xx-panel 69 + then: 70 + $ref: /schemas/spi/spi-peripheral-props.yaml# 71 + 72 + - if: 73 + properties: 74 + compatible: 75 + not: 76 + contains: 77 + # DSI or SPI without D/CX pin 78 + enum: 79 + - anbernic,rg-arc-panel 80 + - anbernic,rg28xx-panel 81 + - densitron,dmt028vghmcmi-1a 82 + - elida,kd50t048a 83 + - techstar,ts8550b 84 + then: 85 + required: 86 + - dc-gpios 87 + else: 88 + properties: 89 + dc-gpios: false 90 + 91 + unevaluatedProperties: false 66 92 67 93 examples: 68 94 - | ··· 114 78 port { 115 79 mipi_in_panel: endpoint { 116 80 remote-endpoint = <&mipi_out_panel>; 81 + }; 82 + }; 83 + }; 84 + }; 85 + - | 86 + #include <dt-bindings/gpio/gpio.h> 87 + 88 + spi { 89 + #address-cells = <1>; 90 + #size-cells = <0>; 91 + 92 + panel@0 { 93 + compatible = "anbernic,rg28xx-panel", "sitronix,st7701"; 94 + reg = <0>; 95 + spi-max-frequency = <3125000>; 96 + VCC-supply = <&reg_lcd>; 97 + IOVCC-supply = <&reg_lcd>; 98 + reset-gpios = <&pio 8 14 GPIO_ACTIVE_HIGH>; /* LCD-RST: PI14 */ 99 + backlight = <&backlight>; 100 + 101 + port { 102 + panel_in_rgb: endpoint { 103 + remote-endpoint = <&tcon_lcd0_out_lcd>; 117 104 }; 118 105 }; 119 106 };