Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Wed Feb 10, 2021 10:09 pm

Image

I bought a Chinese IPS screen, and as usual, the docs aren't very helpful. I made this quick reference and would like to know if my assumptions are correct. Unnamed pins are either GND or NC.

I want to connect the display to my CMIO4 board, on one of the DSI connectors. The display does not have touch, which leads me to believe that 12, 13, 14, 15 can be ommited. 1.8V, 5.0V will have to be separate from the IO board. No idea what TE output is.
Is it really as easy as just connecting data N, P, and clock N, P?

msl
Posts: 190
Joined: Tue Jul 07, 2020 9:12 pm
Location: Munich
Contact: Website Twitter

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Thu Feb 11, 2021 12:44 pm

Fyod wrote:
Wed Feb 10, 2021 10:09 pm
I bought a Chinese IPS screen, and as usual, the docs aren't very helpful. I made this quick reference and would like to know if my assumptions are correct. Unnamed pins are either GND or NC.

I want to connect the display to my CMIO4 board, on one of the DSI connectors. The display does not have touch, which leads me to believe that 12, 13, 14, 15 can be ommited. 1.8V, 5.0V will have to be separate from the IO board. No idea what TE output is.
Is it really as easy as just connecting data N, P, and clock N, P?
It's not that easy and you definitely need some documentation:
- reset is often 1.8V and you'd need to switch CMIO to 1.8 or have a level shifter
- you need a constant current source for backlight. If Vf <5V you can temporary use it with current limiting resistor from 5V for test only
- MIPI DSI is not like AV/VGA, where you plug monitor and it simply works. You need a driver: most of LCD screens need initialization sequence and you have zero chances to guess how it looks like
I highly recommend to contact seller for some kind of datasheet and controller IC type and init sequence.
If you have a driver and pinout, this is what you have to do for your LCD: https://github.com/harlab/CM4_LCD_LT070ME05000

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11499
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Thu Feb 11, 2021 3:08 pm

As msl says, if you have no datasheet then you will struggle to get the displays working. Even with a datasheet there is no guarantee that the information provided is correct!

TE is Tear Enable. Generally that only affects displays with backing memory for the display, which generally means they are driven in command mode instead of video mode. Try and avoid needing it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Tue Mar 02, 2021 7:29 am

msl wrote:
Thu Feb 11, 2021 12:44 pm
It's not that easy and you definitely need some documentation:
- reset is often 1.8V and you'd need to switch CMIO to 1.8 or have a level shifter
- you need a constant current source for backlight. If Vf <5V you can temporary use it with current limiting resistor from 5V for test only
- MIPI DSI is not like AV/VGA, where you plug monitor and it simply works. You need a driver: most of LCD screens need initialization sequence and you have zero chances to guess how it looks like
I highly recommend to contact seller for some kind of datasheet and controller IC type and init sequence.
If you have a driver and pinout, this is what you have to do for your LCD: https://github.com/harlab/CM4_LCD_LT070ME05000
I do have some data, but eg. reset voltage is not mentioned. I'll see if I can figure that out.
Backlight is 3V.
I luckily did receive a driver example written in C, including the init sequence.

zlemonpie
Posts: 35
Joined: Tue Dec 08, 2020 3:05 am

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Tue Mar 02, 2021 9:25 pm

from the 2 displays that i managed to bring up, reset voltage is usually driven by iovcc. In your case its 1.8V. I would still ask the seller for datasheets just to double check.

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Thu Mar 25, 2021 11:57 pm

I have the datasheet and everything I think I need.
IO voltage can be 1.8-3.3V so either I'll supply 3.3 to the display IO and use a GPIO for Reset or I can switch the resistor on the CMIO4 to 1.8V.

Are there any tutorials out there on what is needed to create a driver for Raspbian?

msl
Posts: 190
Joined: Tue Jul 07, 2020 9:12 pm
Location: Munich
Contact: Website Twitter

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Fri Mar 26, 2021 1:30 am

Fyod wrote:
Thu Mar 25, 2021 11:57 pm
Are there any tutorials out there on what is needed to create a driver for Raspbian?
If no init sequence required, patch https://github.com/raspberrypi/linux/bl ... l-simple.c with correct settings for your panel

Otherwise find a driver that best matches your LCD as "skeleton"
It might be easier to begin with looking at bindings first: https://github.com/raspberrypi/linux/tr ... play/panel to see the one with the same number of IOs and regulators
Then among chosen ones take a look at source codes https://github.com/raspberrypi/linux/tr ... /drm/panel to get one with init routine, there are two types of those: with one data byte and random number
Then:
- replace init sequence
- adjust size, clock, modes, etc
- make sure 'compatible' is unique
- add driver to sources and build kernel
- make DT overlay, compile it and add to config along with enabling vc4-kms-v3d

Sounds pretty much like "how to draw an owl meme", but that's what I did to bring up JD9365

Ventran
Posts: 11
Joined: Wed Dec 16, 2020 5:22 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Fri Mar 26, 2021 1:06 pm

Right, connecting not-official display is not so easy task but many users done it. I try connecting the panel PH720128T003. Below inspirations for you:
https://github.com/raspberrypi/linux/issues/4015
https://hackaday.io/project/176098-rasp ... pi-display
viewtopic.php?t=247380
https://www.youtube.com/watch?v=ftqoxa7 ... ngodan2003

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Fri Mar 26, 2021 8:12 pm

Ventran wrote:
Fri Mar 26, 2021 1:06 pm
Right, connecting not-official display is not so easy task but many users done it. I try connecting the panel PH720128T003. Below inspirations for you:
https://github.com/raspberrypi/linux/issues/4015
https://hackaday.io/project/176098-rasp ... pi-display
viewtopic.php?t=247380
https://www.youtube.com/watch?v=ftqoxa7 ... ngodan2003

Interesting, thank you.
I am working with a round display as well, similar to the one in your youtube video.
What I have from the seller is code that is meant to run on an R63353 Display Driver IC https://www.synaptics.com/company/news/DDIC-R63353.

Code: Select all

bridge.reset                            # 7400 reset
delay 300
mipi.lane.enable

#===== Setting DSI ===== 

mipi.dsi 1 650 nonburst
delay 100

#=== Set Link Level : GPIO VOH, MIPI HS signal VOH/VOL
gpio.link.level 1.8
mipi.link.level 0.6 0   ## 0.4 to 0.5
#=== Set Timing Parameter
# 1. LP Timing(T_LPX, TA_GO, TA_GET, TA_SURE) : Unit is 8UI, T_LPX
mipi.timing.lp 6 4 5 2
# 2. HS Data Timing(Pre, Zero, Trail, Exit) : Unit is 8UI
mipi.timing.data 8 25 5 2
# 3. HS clk Timing(Pre, Zero, Trail, Exit) : Unit is 8UI
mipi.timing.clk 4 16 8 2

#======================================================
#set LCM info
#   mipi.video[v_line][h_pixel][frame rate][VBP][VFP][HBP][HFP]
#  set resolution porch
#======================================================
#Erwin setting
#mipi.video 572 640 60 15 6 49 67
mipi.video 572 640 60 8 4 49 67
#===== Setting power
# E7400 Board Power Control: these are programmable voltages now
power.level 2.3 2.8
power.led 0.020

#secure that LED booster properly starts
board.power.off led
delay 50

# E7113S Board Power Control
board.power.on vio vdd led
...

This is what I need to translate to the RPi, correct?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11499
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Fri Mar 26, 2021 9:14 pm

Good luck - trying to get a Synaptic R69429 running was a right pain in the neck.
viewtopic.php?f=98&t=282974
https://github.com/6by9/linux/tree/rpi-5.10.y-r69429
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Fri Mar 26, 2021 9:33 pm

I'm not actually using the Synaptic driver, and the display does not include it. I was sent an example of the code if I wanted to get it running on the driver. Even if I did though, it seems they aren't sold anywhere, atleat not in qtys for DIYers.
I'm connecting directly to the panel as in the "schematic" in the first post.

aBUGSworstnightmare
Posts: 3233
Joined: Tue Jun 30, 2015 1:35 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Sat Mar 27, 2021 6:10 am

Fyod wrote:
Fri Mar 26, 2021 9:33 pm
I'm not actually using the Synaptic driver, and the display does not include it. I was sent an example of the code if I wanted to get it running on the driver. Even if I did though, it seems they aren't sold anywhere, atleat not in qtys for DIYers.
I'm connecting directly to the panel as in the "schematic" in the first post.
isn't the Synaptics driver IC mounted on the glass of your circular pannel (COG)?
With the code posted above you will never get it to work! You need to know the initializiation sequence, power-up and power-down sequence and for sure the pinout. Where did you you get the panel from; ask your supplier to provide the details of it.

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Sat Mar 27, 2021 11:06 pm

Nope, the Synaptic board is an optional addon, not part of the screen.
I have the pinout in the first post.
Here's the entire code:

Code: Select all

bridge.reset                            # 7400 reset
delay 300
mipi.lane.enable

#===== Setting DSI ===== 

mipi.dsi 1 650 nonburst
delay 100

#=== Set Link Level : GPIO VOH, MIPI HS signal VOH/VOL
gpio.link.level 1.8
mipi.link.level 0.6 0   ## 0.4 to 0.5
#=== Set Timing Parameter
# 1. LP Timing(T_LPX, TA_GO, TA_GET, TA_SURE) : Unit is 8UI, T_LPX
mipi.timing.lp 6 4 5 2
# 2. HS Data Timing(Pre, Zero, Trail, Exit) : Unit is 8UI
mipi.timing.data 8 25 5 2
# 3. HS clk Timing(Pre, Zero, Trail, Exit) : Unit is 8UI
mipi.timing.clk 4 16 8 2

#======================================================
#set LCM info
#   mipi.video[v_line][h_pixel][frame rate][VBP][VFP][HBP][HFP]
#  set resolution porch
#======================================================
#Erwin setting
#mipi.video 572 640 60 15 6 49 67
mipi.video 572 640 60 8 4 49 67
#===== Setting power
# E7400 Board Power Control: these are programmable voltages now
power.level 2.3 2.8
power.led 0.020

#secure that LED booster properly starts
board.power.off led
delay 50

# Board Power Control
board.power.on vio vdd led


#===== Init. GPIO : GPIO4(RESX):high->low->high
gpio.dir 0x7F 

#===== Init. GPIO : GPIO4(RESX):high->low->high
gpio.write 0x08	                                          ## RESET_N = High
delay 100
gpio.write 0x00                                           ## RESET_N = Low
                                                          ## Power Supply ON : IOVCC,DPHYVCC
delay 10                                                  ## unit [ms]
gpio.write 0x08                                           ## RESET_N = High
delay 200                                                 ## unit [ms] for PMIC_EN=High
                                                          ## Power Supply ON : VSP
delay 10                                                  ## unit [ms]
                                                          ## Power Supply ON : VSN
delay 10                                                  ## unit [ms]


mipi.write 0x29 0xB0 0x00
mipi.write 0x29 0xB3 0x14 0x00 0x00 0x00 0x00            ## dsi mode 
mipi.write 0x29 0xB4 0x00 0x00 
mipi.write 0x29 0xB6 0x4B 0xDB 0x16 
mipi.write 0x29 0xB8 0x57 0x3D 0x19 0x1E 0x0A 0x50 0x50 
mipi.write 0x29 0xB9 0x6F 0x3D 0x28 0x3C 0x14 0xC8 0xC8 
mipi.write 0x29 0xBA 0xB5 0x33 0x41 0x64 0x23 0xA0 0xA0 
mipi.write 0x29 0xBB 0x14 0x14 
mipi.write 0x29 0xBC 0x37 0x32 
mipi.write 0x29 0xBD 0x64 0x32 
mipi.write 0x29 0xBE 0x00 0x04 
mipi.write 0x29 0xC0 0x00 0x00

##Control forward&backward(UDS=0,U-D backward B7=1£¨L-R backward B6=1) 
mipi.write 0x39 0x36 0x00 


mipi.write 0x29 0xC1 0x8C 0xA2 0x00 0xC6 0x00 0xD6 0x8C 0x31 0xC6 0x48 0x22 0x2A 0x9D 0xF8 0x5A 0x23 0xA5 0x94 0xC6 0x5E 0x3C 0x69 0x1D 0x45 0x1A 0x63 0x8C 0x69 0x2C 0x18 0x03 0x00 0x28 0x02 0x02 0x80 0x00 0x01 0x11 
mipi.write 0x29 0xC2 0x30 0xF2 0x3C 0x08 0x04 0x00 0x00 0x08 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 
mipi.write 0x29 0xCC 0x0E
mipi.write 0x29 0xCB 0x1C 0xFC 0xF7 0xFE 0x83 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x1C 0xFC 0xF7 0xFE 0x83 0x03 0xE8 0x00 0x00
mipi.write 0x29 0xD0 0x11 0x00 0x00 0x14 0x94 0x40 0x19 0x19 0x09 0x00  # VGH/VGL=+/-8V
mipi.write 0x29 0xD3 0x1B 0x33 0xBB 0x77 0x77 0x77 0x33 0x33 0x33 0x00 0x01 0x00 0x00 0xCF 0xA0 0x0B 0x1F 0x1F 0x33 0x33 0x72 0x12 0x8A 0x07 0x3D 0xBC

mipi.write 0x29 0xC3 0x00 0x00 0x00 
mipi.write 0x29 0xC4 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 
mipi.write 0x29 0xC5 0x00 0x08 0x00 0x00 0x00 0x00 0x70 0x00 
mipi.write 0x29 0xC6 0x01 0x90 0x04 0xC1 0x04 0xC1 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x11 0x38 0x07 0x01 0x90 0x08 
mipi.write 0x29 0xC7 0x00 0x14 0x20 0x30 0x3E 0x4A 0x62 0x74 0x83 0x91 0x44 0x51 0x5F 0x75 0x7F 0x8D 0x9D 0xAA 0xBC 0x00 0x14 0x20 0x30 0x3E 0x4A 0x62 0x74 0x83 0x91 0x44 0x51 0x5F 0x75 0x7F 0x8D 0x9D 0xAA 0xBC
## Gamma              255  251  247  240  232  224  200  176  152  127  103  79    55 31    23   15   8     4    0  255  251  247  240  232  224  200  176  152  127  103  79    55 31    23   15   8     4    0                   
mipi.write 0x29 0xC8 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 
mipi.write 0x29 0xC9 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 
mipi.write 0x29 0xCA 0x1C 0xFC 0xFC 0xFC 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 

mipi.write 0x29 0xCE 0x55 0x40 0x49 0x53 0x59 0x5E 0x63 0x68 0x6E 0x74 0x7E 0x8A 0x98 0xA8 0xBB 0xD0 0xFF 0x04 0x00 0x04 0x04 0x42 0x00 0x69 0x5A 
mipi.write 0x29 0xD1 0x04 0x40 0x06 0x0F 
mipi.write 0x29 0xD2 0x00 0x00 0xFF 0xFF 
 
mipi.write 0x29 0xD4 0x41 0x04 0x00 
## VCOM
mipi.write 0x29 0xD5 0x06 0x00 0x00 0x01 0x3D 0x01 0x3D 
mipi.write 0x29 0xD6 0x01 
mipi.write 0x29 0xD7 0xBF 0xF8 0x7F 0xA8 0xCE 0x3E 0xFC 0xC1 0xF1 0xEF 0x83 0x07 0x3F 0x10 0x7F 0xC0 0x01 0xE7 0x40 0x1C 0x00 0x00 0x00 0x01 0x0F 
mipi.write 0x29 0xD8 0x00 0x00 0x00 
mipi.write 0x29 0xD9 0x00 0x08 0x44 
mipi.write 0x29 0xDD 0x30 0x06 0x23 0x65 
mipi.write 0x29 0xDE 0x00 0x3F 0xFF 0x10 
mipi.write 0x29 0xE1 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
mipi.write 0x29 0xE2 0x00 0x00 0x00 0x00 0x00 0x00 
mipi.write 0x29 0xE3 0x00 0x00 
mipi.write 0x29 0xE7 0x00 0x00 
mipi.write 0x29 0xE9 0x00 
mipi.write 0x29 0xEA 0x00 
mipi.write 0x29 0xEB 0x00 0x00 0x00 0x00 0x00 0x00 
mipi.write 0x29 0xEC 0x40 0x10 
mipi.write 0x29 0xED 0x00 0x00 0x00 
mipi.write 0x29 0xEE 0x00 0x32 

mipi.write 0x39 0x35 0x00
 

#Display On
mipi.write 0x05 0x29                                      ## set_display_on

# Sleep Out
mipi.write 0x05 0x11                                      ## exit_sleep_mode
delay 70

mipi.clock.enable                                         ## High Speed Data transmission mode: MIPI DSI Clock Enable
delay 1                                                  ## unit [ms]
mipi.video.enable                                        ## this command only in video mode. In command mode, please do not use absolutely.
delay 1                                                  ## unit [ms]

#image.fill 255 255 255
image.display 05

aBUGSworstnightmare
Posts: 3233
Joined: Tue Jun 30, 2015 1:35 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Sun Mar 28, 2021 6:01 am

Fyod wrote:
Sat Mar 27, 2021 11:06 pm
Nope, the Synaptic board is an optional addon, not part of the screen.
I have the pinout in the first post.
Here's the entire code:

Code: Select all

bridge.reset                            # 7400 reset
delay 300
mipi.lane.enable

#===== Setting DSI ===== 

mipi.dsi 1 650 nonburst
delay 100

#=== Set Link Level : GPIO VOH, MIPI HS signal VOH/VOL
gpio.link.level 1.8
mipi.link.level 0.6 0   ## 0.4 to 0.5
#=== Set Timing Parameter
# 1. LP Timing(T_LPX, TA_GO, TA_GET, TA_SURE) : Unit is 8UI, T_LPX
mipi.timing.lp 6 4 5 2
# 2. HS Data Timing(Pre, Zero, Trail, Exit) : Unit is 8UI
mipi.timing.data 8 25 5 2
# 3. HS clk Timing(Pre, Zero, Trail, Exit) : Unit is 8UI
mipi.timing.clk 4 16 8 2

#======================================================
#set LCM info
#   mipi.video[v_line][h_pixel][frame rate][VBP][VFP][HBP][HFP]
#  set resolution porch
#======================================================
#Erwin setting
#mipi.video 572 640 60 15 6 49 67
mipi.video 572 640 60 8 4 49 67
#===== Setting power
# E7400 Board Power Control: these are programmable voltages now
power.level 2.3 2.8
power.led 0.020

#secure that LED booster properly starts
board.power.off led
delay 50

# Board Power Control
board.power.on vio vdd led


#===== Init. GPIO : GPIO4(RESX):high->low->high
gpio.dir 0x7F 

#===== Init. GPIO : GPIO4(RESX):high->low->high
gpio.write 0x08	                                          ## RESET_N = High
delay 100
gpio.write 0x00                                           ## RESET_N = Low
                                                          ## Power Supply ON : IOVCC,DPHYVCC
delay 10                                                  ## unit [ms]
gpio.write 0x08                                           ## RESET_N = High
delay 200                                                 ## unit [ms] for PMIC_EN=High
                                                          ## Power Supply ON : VSP
delay 10                                                  ## unit [ms]
                                                          ## Power Supply ON : VSN
delay 10                                                  ## unit [ms]


mipi.write 0x29 0xB0 0x00
mipi.write 0x29 0xB3 0x14 0x00 0x00 0x00 0x00            ## dsi mode 
mipi.write 0x29 0xB4 0x00 0x00 
mipi.write 0x29 0xB6 0x4B 0xDB 0x16 
mipi.write 0x29 0xB8 0x57 0x3D 0x19 0x1E 0x0A 0x50 0x50 
mipi.write 0x29 0xB9 0x6F 0x3D 0x28 0x3C 0x14 0xC8 0xC8 
mipi.write 0x29 0xBA 0xB5 0x33 0x41 0x64 0x23 0xA0 0xA0 
mipi.write 0x29 0xBB 0x14 0x14 
mipi.write 0x29 0xBC 0x37 0x32 
mipi.write 0x29 0xBD 0x64 0x32 
mipi.write 0x29 0xBE 0x00 0x04 
mipi.write 0x29 0xC0 0x00 0x00

##Control forward&backward(UDS=0,U-D backward B7=1£¨L-R backward B6=1) 
mipi.write 0x39 0x36 0x00 


mipi.write 0x29 0xC1 0x8C 0xA2 0x00 0xC6 0x00 0xD6 0x8C 0x31 0xC6 0x48 0x22 0x2A 0x9D 0xF8 0x5A 0x23 0xA5 0x94 0xC6 0x5E 0x3C 0x69 0x1D 0x45 0x1A 0x63 0x8C 0x69 0x2C 0x18 0x03 0x00 0x28 0x02 0x02 0x80 0x00 0x01 0x11 
mipi.write 0x29 0xC2 0x30 0xF2 0x3C 0x08 0x04 0x00 0x00 0x08 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 0x0A 0xCA 0x29 0x28 0xA7 0xA0 0x9C 0x82 0x72 
mipi.write 0x29 0xCC 0x0E
mipi.write 0x29 0xCB 0x1C 0xFC 0xF7 0xFE 0x83 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x1C 0xFC 0xF7 0xFE 0x83 0x03 0xE8 0x00 0x00
mipi.write 0x29 0xD0 0x11 0x00 0x00 0x14 0x94 0x40 0x19 0x19 0x09 0x00  # VGH/VGL=+/-8V
mipi.write 0x29 0xD3 0x1B 0x33 0xBB 0x77 0x77 0x77 0x33 0x33 0x33 0x00 0x01 0x00 0x00 0xCF 0xA0 0x0B 0x1F 0x1F 0x33 0x33 0x72 0x12 0x8A 0x07 0x3D 0xBC

mipi.write 0x29 0xC3 0x00 0x00 0x00 
mipi.write 0x29 0xC4 0x31 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x02 
mipi.write 0x29 0xC5 0x00 0x08 0x00 0x00 0x00 0x00 0x70 0x00 
mipi.write 0x29 0xC6 0x01 0x90 0x04 0xC1 0x04 0xC1 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x11 0x38 0x07 0x01 0x90 0x08 
mipi.write 0x29 0xC7 0x00 0x14 0x20 0x30 0x3E 0x4A 0x62 0x74 0x83 0x91 0x44 0x51 0x5F 0x75 0x7F 0x8D 0x9D 0xAA 0xBC 0x00 0x14 0x20 0x30 0x3E 0x4A 0x62 0x74 0x83 0x91 0x44 0x51 0x5F 0x75 0x7F 0x8D 0x9D 0xAA 0xBC
## Gamma              255  251  247  240  232  224  200  176  152  127  103  79    55 31    23   15   8     4    0  255  251  247  240  232  224  200  176  152  127  103  79    55 31    23   15   8     4    0                   
mipi.write 0x29 0xC8 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 
mipi.write 0x29 0xC9 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 0x00 0x00 0x00 0x00 0xFC 0x00 
mipi.write 0x29 0xCA 0x1C 0xFC 0xFC 0xFC 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 

mipi.write 0x29 0xCE 0x55 0x40 0x49 0x53 0x59 0x5E 0x63 0x68 0x6E 0x74 0x7E 0x8A 0x98 0xA8 0xBB 0xD0 0xFF 0x04 0x00 0x04 0x04 0x42 0x00 0x69 0x5A 
mipi.write 0x29 0xD1 0x04 0x40 0x06 0x0F 
mipi.write 0x29 0xD2 0x00 0x00 0xFF 0xFF 
 
mipi.write 0x29 0xD4 0x41 0x04 0x00 
## VCOM
mipi.write 0x29 0xD5 0x06 0x00 0x00 0x01 0x3D 0x01 0x3D 
mipi.write 0x29 0xD6 0x01 
mipi.write 0x29 0xD7 0xBF 0xF8 0x7F 0xA8 0xCE 0x3E 0xFC 0xC1 0xF1 0xEF 0x83 0x07 0x3F 0x10 0x7F 0xC0 0x01 0xE7 0x40 0x1C 0x00 0x00 0x00 0x01 0x0F 
mipi.write 0x29 0xD8 0x00 0x00 0x00 
mipi.write 0x29 0xD9 0x00 0x08 0x44 
mipi.write 0x29 0xDD 0x30 0x06 0x23 0x65 
mipi.write 0x29 0xDE 0x00 0x3F 0xFF 0x10 
mipi.write 0x29 0xE1 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
mipi.write 0x29 0xE2 0x00 0x00 0x00 0x00 0x00 0x00 
mipi.write 0x29 0xE3 0x00 0x00 
mipi.write 0x29 0xE7 0x00 0x00 
mipi.write 0x29 0xE9 0x00 
mipi.write 0x29 0xEA 0x00 
mipi.write 0x29 0xEB 0x00 0x00 0x00 0x00 0x00 0x00 
mipi.write 0x29 0xEC 0x40 0x10 
mipi.write 0x29 0xED 0x00 0x00 0x00 
mipi.write 0x29 0xEE 0x00 0x32 

mipi.write 0x39 0x35 0x00
 

#Display On
mipi.write 0x05 0x29                                      ## set_display_on

# Sleep Out
mipi.write 0x05 0x11                                      ## exit_sleep_mode
delay 70

mipi.clock.enable                                         ## High Speed Data transmission mode: MIPI DSI Clock Enable
delay 1                                                  ## unit [ms]
mipi.video.enable                                        ## this command only in video mode. In command mode, please do not use absolutely.
delay 1                                                  ## unit [ms]

#image.fill 255 255 255
image.display 05
looks like you have the full init sequence for tne driver IC as well as the power-on sequence.
Still a long way to go.
Can you post a picture of the display when connected to 'the board with the Synaptics'?

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Sun Mar 28, 2021 10:57 pm

This is an image with some kind of testing rig. The red board has the Synaptic driver chip, I was told.
lcd.jpg
lcd.jpg (41.59 KiB) Viewed 988 times

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Sun Mar 28, 2021 11:09 pm

And here's my setup for connecting to the CMIO4.
https://i.imgur.com/P7Mm31t.jpg

zlemonpie
Posts: 35
Joined: Tue Dec 08, 2020 3:05 am

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Mon Mar 29, 2021 1:46 am

is it me, or is the sample code missing sync pulse width for the timings?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11499
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Mon Mar 29, 2021 7:23 am

zlemonpie wrote:
Mon Mar 29, 2021 1:46 am
is it me, or is the sample code missing sync pulse width for the timings?
It is, but I'm reading

Code: Select all

mipi.dsi 1 650 nonburst
as being a 650Mbit/s link speed over a single lane. DSI doesn't necessarily transmit the actual sync pulses, just sync events.

Combine that with

Code: Select all

mipi.video 572 640 60 8 4 49 67
and I think it gives you all the parameters you need.
650M / 60 = 10.833Mbit/frame. 24bpp = 451388pixels/frame.
640+49+67 = 756 wide. 572+8+4 = 584 high
756x584 would be 441504 pixels, so the right ball park.
Whether setting the vsync width to 25 (451388/756 - 584) with hsync being 0 is sufficient depends on the exact panel, but I wouldn't expect it to be too fussy.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Mon Mar 29, 2021 10:16 am

Based on this info, is there a similar driver that I could use as a template for creating a new one?
And will I need the Pi to be able to turn the backlight and IO voltage on/off based on the driver, or can I just run them off the same 5V as the Pi, thus getting power at the same time as the Pi?
I have confirmed that the backlight is 5V and on my test breakout, I have regulators for 5V->3.3V and 5V->1.8V. Currently there is no Enable circuit to the Pi.
Also, for future reference, to control backlight brightness, I expect I would have to add some kind of PWM backlight driver to the Pi, correct?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11499
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Mon Mar 29, 2021 10:29 am

Fyod wrote:
Mon Mar 29, 2021 10:16 am
Based on this info, is there a similar driver that I could use as a template for creating a new one?
ILI9881C is one of the simpler drivers that sends an initialisation sequence to the panel during enable.
I appear to have overwritten my branch that had an example overlay, but the contents is along the lines of

Code: Select all

/*
 * vc4-kms-dsi-ili9881-lhr050h41-overlay.dts
 * Configures the BananaPi LHR050H41 panel on DSI1.
 * Untested with this specific panel, but working with similar ones.
 */

/dts-v1/;
/plugin/;

/ {
       compatible = "brcm,bcm2835";

       fragment@0 {
               target = <&dsi1>;
               __overlay__  {
                       #address-cells = <1>;
                       #size-cells = <0>;
                       status = "okay";

                       port {
                               dsi_out: endpoint {
                                       remote-endpoint = <&panel_in>;
                               };
                       };

                       dsi_panel: dsi_panel@0 {
                               reg = <0>;
                               compatible = "bananapi,lhr050h41";
                               // Add a regulator if you have one
                               //power-supply = <&reg_display>;
                               // Add a backlight controller  if you have one
                               //backlight = <&backlight>;

                               port {
                                       panel_in: endpoint {
                                               remote-endpoint = <&dsi_out>;
                                       };
                               };
                       };
               };
       };
};
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

zlemonpie
Posts: 35
Joined: Tue Dec 08, 2020 3:05 am

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Mon Mar 29, 2021 11:40 am

Fyod wrote:
Mon Mar 29, 2021 10:16 am
Based on this info, is there a similar driver that I could use as a template for creating a new one?
And will I need the Pi to be able to turn the backlight and IO voltage on/off based on the driver, or can I just run them off the same 5V as the Pi, thus getting power at the same time as the Pi?
I have confirmed that the backlight is 5V and on my test breakout, I have regulators for 5V->3.3V and 5V->1.8V. Currently there is no Enable circuit to the Pi.
Also, for future reference, to control backlight brightness, I expect I would have to add some kind of PWM backlight driver to the Pi, correct?
It should be okay to get your backlight from the Pi's 5V. I would double check the datasheet to make sure it's not drawing anything crazy like 10A off the Pi (unlikely but just in case)!. If you need brightness control and there isn't a controller chip (most likely there isn't), then you will need to PWM it.

aBUGSworstnightmare
Posts: 3233
Joined: Tue Jun 30, 2015 1:35 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Mon Mar 29, 2021 6:47 pm

Fyod wrote:
Sun Mar 28, 2021 10:57 pm
This is an image with some kind of testing rig. The red board has the Synaptic driver chip, I was told.

lcd.jpg
have a closer look at your display; the R63353 ist the 'big bar' at the bottom of your 'flat tire' circular display (it's a die., mounted on the TFT backplane, that's why it's known as COG (Chip on Glass)
My bet on the chip on the red PCB is a bridge chip (i.e. RGB to MIPI; quite often used in display test jigs).

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Mon Mar 29, 2021 8:40 pm

Nope, there really is no IC on the flex. Just some passives.

Wow, you're right, upon having a closer look, there is an approx. 1x15mm silver bar under the display.
I had no idea display ICs could be that small and it has 147! interconnects, according to the datasheet. That's crazy.

Fyod
Posts: 12
Joined: Wed Feb 10, 2021 10:05 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Fri Jun 18, 2021 1:08 pm

Coming back to this, I'm still dumbfounded by the process required to create the display driver.
Could anyone give me a list of what needs to be done and where I can find a similar display driver to use for reference?
I'd have a look at each step and try it out, but I'm currently lost.

aBUGSworstnightmare
Posts: 3233
Joined: Tue Jun 30, 2015 1:35 pm

Re: Raspberry Pi CMIO4 -> MIPI display - pin confirmation?

Fri Jun 18, 2021 1:29 pm

Fyod wrote:
Fri Jun 18, 2021 1:08 pm
Coming back to this, I'm still dumbfounded by the process required to create the display driver.
Could anyone give me a list of what needs to be done and where I can find a similar display driver to use for reference?
I'd have a look at each step and try it out, but I'm currently lost.
You should be able to use 'panel-jdi-lt070me05000.c' as a reference; find it in the kernel source under '/home/pi/linux/drivers/gpu/drm/panel'.

https://www.raspberrypi.org/documentati ... uilding.md gives you an idea on the steps required for building the kernel.
You will need to have access to the TCON data sheet and you need to ask your module supplier to provide the required initialization code and power-up/-down sequence.

Then implement the changes into the source code, compile it, keep your fingers crossed and fire it up.

I would recommend to start with a branch of 6by9 - https://github.com/6by9/linux/tree/rpi- ... si8x-marek - as this one has some changes to 'vc4_dsi.c' which solved a DSI init issue with a TI bridge chip (see viewtopic.php?f=44&t=305690)

@6by9: by when will these changes be merged to 5.10y (referring to viewtopic.php?f=44&t=305690&start=225#p1875172)?
Or do you recommend another branch to @Fyod to start with?

Return to “Compute Module”