-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add mipidsi module for MIPI DSI displays
#10703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adds support for MIPI DSI (Display Serial Interface) displays via a new mipidsi module. This enables high-speed serial communication with DSI displays using differential signaling. The module provides: - Bus class: Manages DSI bus with 1-4 data lanes - Display class: Handles display configuration and framebuffer Module is: - Disabled by default globally - Enabled only for ESP32-P4 (has hardware MIPI-DSI support) 🤖 Initial code generated with [Claude Code](https://claude.com/claude-code) and then hand improved. Co-Authored-By: Claude <noreply@anthropic.com>
|
Depends on espressif/usb-pids#274 for M5Stack Tab5 PID. |
|
No luck getting the M5Stack Tab5 going with this yet. The USB C is connected to GPIO24/25 which is connected to the serial/jtag peripheral. The USB A is the high speed OTG. We can switch the USB C to the FS OTG with an eFuse edit but then we cannot access the serial/jtag peripheral for bootloading.
|
|
When I run the mipidsi init code you posted to discord the bottom two lines (23 & 24) are overwritten/corrupted by some combination with lines 21 and 22. Edit: I ran a program to display an animated gif and it didn't seem to have any trouble at the bottom of the display so perhaps the issue has to do with Terminalio? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks clean! I pushed a commit to fix up the pins.c formatting, and have a couple of other comments. I won't get a board to test until tomorrow.
|
Temporary build failures due to so maybe we should update the |
Opened #10706 for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good on the allocation fixup. If this works for you, fine to merge. Or I could test tomorrow when my board arrives.
|
I don't know if this is something that should be addressed in this PR or if it's a separate issue but I worked up some code that demonstrates the bottom of the screen refresh issue I'm seeing. when I run this code.py the program stops at the first input prompt but the MIPI DSI display doesn't show the correct output at the bottom of the screen, then when you press enter, the screen is updated and when it stops at the second input prompt (which inserts a display.refresh() while waiting for input) the entire display is properly updated. from sys import stdin
import supervisor
import mipidsi
import displayio
import digitalio
import framebufferio
import board
import time
displayio.release_displays()
bus = mipidsi.Bus(frequency=1000000000)
init_sequence = (
b"\xb2\x01\x10"
b"\x80\x01\x8b"
b"\x81\x01\x78"
b"\x82\x01\x84"
b"\x83\x01\x88"
b"\x84\x01\xa8"
b"\x85\x01\xe3"
b"\x86\x01\x88"
b"\x11\x80\x78"
)
reset_pin = digitalio.DigitalInOut(board.IO27)
reset_pin.direction = digitalio.Direction.OUTPUT
reset_pin.value = False
time.sleep(0.1)
reset_pin.value = True
time.sleep(0.2)
fb = mipidsi.Display(
bus,
init_sequence=init_sequence,
width=1024,
height=600,
color_depth=24,
pixel_clock_frequency=52000000,
hsync_pulse_width=10,
hsync_front_porch=160,
hsync_back_porch=160,
vsync_pulse_width=1,
vsync_front_porch=12,
vsync_back_porch=23,
backlight_pin=board.IO26,
)
display = framebufferio.FramebufferDisplay(fb)
supervisor.runtime.display=display
for i in range(23):
print(i)
n = input('[input] waiting for input: ')
print(chr(27)+'[2J')
time.sleep(.5)
for i in range(23):
print(i)
print('[stdin] waiting for input: ',end="")
key = ''
keys = ''
while key != '\n':
display.refresh()
if supervisor.runtime.serial_bytes_available:
key = stdin.read(1)
keys = keys + keyPutting time.sleep(.1) after the print statements in the for loops caused both loops to have display issues. |
|
Merging so we can get a version to test into a beta. I created #10708 to address the problem @RetiredWizard found. |
Adds support for MIPI DSI (Display Serial Interface) displays via a new mipidsi module. This enables high-speed serial communication with DSI displays using differential signaling.
The module provides:
Module is:
🤖 Initial code generated with Claude Code and then hand improved.