cancel
Showing results for 
Search instead for 
Did you mean: 

How to drive the screen like ili9341 with tinyDRM? anyone succeed?

mteaching
Associate III

Hello, guys.

My goal is highly consistent with this ticket:

https://community.st.com/t5/stm32-mpus-products/cannot-get-spi-lcd-working-with-stm32mp157d-dk1-yocto/m-p/225522

I hope to drive the LCD ili9341 based on STM32MP157F-DK2 but till now it has not been successful, the LCD has always been a white screen.

kernel config

CONFIG_TINYDRM_ILI9341=y
/* drivers/gpu/drm/tiny/ili9341.c */

device tree

 

&spi5 {
	status = "okay";

	panel: display@0{
		compatible = "adafruit,yx240qv29", "ilitek,ili9341";
		reg = <0>;
		spi-3wire;
		spi-max-frequency = <10000000>;
		dc-gpios = <&gpioa 8 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpiod 7 GPIO_ACTIVE_HIGH>;
		rotation = <270>;
		status = "okay";
	};
};

 

 

some logs

the card 0 is the default mipi otm8009a display that works well.

root@stm32mp1:~# ls /dev/dri/
by-path  card0	card1
root@stm32mp1:~# dmesg | grep ili9341
[   14.917187] [drm] Initialized ili9341 1.0.0 20180514 for spi0.0 on minor 1

 

root@stm32mp1:/sys/kernel/debug/dri/1# ls
SPI-1  clients	command  crtc-0  framebuffer  gem_names  internal_clients  name  state
root@stm32mp1:/sys/kernel/debug/dri/1# cat name 
ili9341 dev=spi0.0 unique=spi0.0
root@stm32mp1:/sys/kernel/debug/dri/1# cat state 
plane[32]: plane-0
	crtc=(null)
	fb=0
	crtc-pos=0x0+0+0
	src-pos=0.000000x0.000000+0.000000+0.000000
	rotation=1
	normalized-zpos=0
	color-encoding=ITU-R BT.601 YCbCr
	color-range=YCbCr limited range
crtc[34]: crtc-0
	enable=0
	active=0
	self_refresh_active=0
	planes_changed=0
	mode_changed=0
	active_changed=0
	connectors_changed=0
	color_mgmt_changed=0
	plane_mask=0
	connector_mask=0
	encoder_mask=0
	mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
connector[31]: SPI-1
	crtc=(null)
	self_refresh_aware=0
	max_requested_bpc=0
root@stm32mp1:/sys/kernel/debug/dri/1# cat framebuffer 
root@stm32mp1:/sys/kernel/debug/dri/1# 

waveform

I observed four signals:SCLK/MOSI/DC/RESET.(the CS is by default connected to gnd.

but there is no action on SPI.

 

I suspect there is still something wrong with the configuration of the device tree, but I don't know how to configure it.

Did you make any progress later? can you share with me?Thanks a lot.

@Kevin HUBER @ShawnHymel 

 

1 REPLY 1
mteaching
Associate III

The following is the wave, the channel 3 is the RESET signal:

 

mteaching_1-1709389612532.png