Open EthiceDD opened 9 months ago
[ 3.622226] sun6i-spi 1c69000.spi: chipselect 0 already in use
There seems to be a SPI device already using CS0.
Verify by looking in /sys/bus/spi/devices
.
hey guys,I've fixed this issue, it seems to be caused by the fact that I was using a linux 5.18 image before updating linux and the previous version didn't have the panel-mipi-dbi driver, which is why I changed the spi bus but it didn't say that the driver was successful.
But even if I succeed in driving, my display still keeps black screen and unresponsive, I use ILI9341 driver, linux 6.6.16, I used con2fbmap 1 1 to map the terminal to the display but it still goes black, what's going on??
Here are the tips for driving success:
[ 11.712255] panel-mipi-dbi-spi spi0.0: supply power not found, using dummy regulator
[ 11.728154] panel-mipi-dbi-spi spi0.0: supply io not found, using dummy regulator
[ 11.776493] [drm] Initialized panel-mipi-dbi 1.0.0 20220103 for spi0.0 on minor 1
[ 11.779282] panel-mipi-dbi-spi spi0.0: [drm] fb1: panel-mipi-dbid frame buffer device
Black as in no backlight? There's no backlight device in your DT overlay, is backlight hardwired or have you just forgotten it?
I plugged in the led and got a white screen and no response, like I didn't plug in the led, it just became a white screen
A white screen means the controller hasn't been properly configured. Double check your init commands.
But I'm using the init command: https://github.com/notro/panel-mipi-dbi/wiki/Displays#adafruit-ili9341-pitft-tft-lcd-screen
# Adafruit ILI9341 PiTFT TFT LCD Screen
# width=320,height=240
command 0x01 # Software reset
delay 128
command 0xEF 0x03 0x80 0x02
command 0xCF 0x00 0xC1 0x30
command 0xED 0x64 0x03 0x12 0x81
command 0xE8 0x85 0x00 0x78
command 0xCB 0x39 0x2C 0x00 0x34 0x02
command 0xF7 0x20
command 0xEA 0x00 0x00
command 0xc0 0x23 # Power control VRH[5:0]
command 0xc1 0x10 # Power control SAP[2:0];BT[3:0]
command 0xc5 0x3e 0x28 # VCM control
command 0xc7 0x86 # VCM control2
# Command 36h sets the read order from frame memory to the display panel
# Remember to swap width/height on 0/180 rotations
#command 0x36 0x88 # rotation 0
command 0x36 0xE8 # rotation 90
#command 0x36 0x48 # rotation 180
#command 0x36 0x28 # rotation 270
command 0x37 0x00 # Vertical scroll zero
command 0x3a 0x55 # COLMOD: Pixel Format Set
command 0xb1 0x00 0x18 # Frame Rate Control (In Normal Mode/Full Colors)
command 0xb6 0x08 0x82 0x27 # Display Function Control
command 0xF2 0x00 # 3Gamma Function Disable
command 0x26 0x01 # Gamma curve selected
# Set Gamma
command 0xe0 0x0F 0x31 0x2B 0x0C 0x0E 0x08 0x4E 0xF1 0x37 0x07 0x10 0x03 0x0E 0x09 0x00
command 0xe1 0x00 0x0E 0x14 0x03 0x11 0x07 0x31 0xC1 0x48 0x08 0x0F 0x0C 0x31 0x36 0x0F
command 0x11 # Exit Sleep
delay 120
command 0x29 # Display on
delay 120
This init command doesn't look like it can go wrong.
Is something, modetest/fbcon, driving the display? The driver won't write the init commands until it's first use.
You can enable debug output to see what's happening in the driver: https://github.com/notro/panel-mipi-dbi/wiki/Debugging#drmdebug
Error code:
panel-mipi-dbi-spi.dts:
Why I can't create SPI device???