这个项目先是分享在Hackaday上:7" LCD for Raspberry Pi CM4 CMIO,并在Github上开源出来,搭配树莓派CM4的CMIO板子,由于CM4的DSI接口(22Pin/0.5mm间距)和7寸屏的MIPI接口(31pin/0.3mm间距)线序不同,所以作者做了一个转接板,除了实现线序的调整外,还增加了针对LCD的Reset信号以及1.8V的供电电压 - 如果你直接使用CM4模块,可以从CM4模块中直接获得1.8V的直流电压,而CMIO上无法通过FPC软线提供1.8V直流电压,所以作者在转接板上加了一个3.3V转1.8V的LDO。
用的显示屏同样也是JDI LT070ME05000 LCD panel,这是一款用在2013年的Google Nexus II上的高分辨率屏,显示效果非常好,比较适合制作便携式的计算机(淘宝上有卖,一百块钱搞定,不过不适合设计大批量的新产品)。
Overview
JDI LT070ME05000 is 7" 1200x1920 4-lane DSI IPS display used in Asus/Google Nexus 7 2013 tablet. To use it, 4-lane DSI interface is required, so it can be used with Raspberry Pi Compute Modules 3 and 4. Some suppliers have these displays available from ~$US20 shipped. There is a driver for this panel in a mainline already included, so we only need to compile/install it and make device tree overlay
Software installation
We need build rpi-5.10.y branch with LT070ME05000 module enabled. This is well documented at Raspberry Pi help pages here and here
sudo apt install git bc bison flex libssl-dev make
sudo apt install libncurses5-dev
git clone --depth=1 --branch rpi-5.10.y https://github.com/raspberrypi/linux
cd linux
KERNEL=kernel7l
make bcm2711_defconfig
make menuconfig
Navigate to Device Drivers/Graphics support/Display panel, check JDI LT070ME05000 panel and save
Now we need to build and install kernel:
make -j4 zImage modules dtbs
sudo make modules_install
sudo cp arch/arm/boot/dts/*.dtb /boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
Device Tree Source can be modified to assign another GPIO numbers, then compiled and copied to boot partition:
sudo dtc -@ -I dts -O dtb -o vc4-kms-dsi-lt070me05000.dtbo vc4-kms-dsi-lt070me05000-overlay.dts
sudo cp vc4-kms-dsi-lt070me05000.dtbo /boot/overlays/
Then edit /boot/config.txt to add:
lcd_ignore=1
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-lt070me05000
and reboot
After reboot screen should we working and have portrait orientation. To adjust, use Main Menu/Preferences/Screen configuration utility
LCD pins defaults to:
- Reset - GPIO17
- Enable - GPIO4
- DCDC Enable - GPIO5
Default pins can be changed, for example:
lcd_ignore=1
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-lt070me05000,reset=5,enable=17,dcdc-en=4
Hardware
Important notes:
- This schematics comes with no warranties, use at your own risk
- Verify pin 1 location for your application: two FPC connectors facing each other would have first pin at opposite side
- 3V3 LDO gets hot. According to datasheet, VDD and VDDp can actually be powered from 3.0-5.0V
- i2c part for TP is not tested
- LCD_RST MUST be 1.8V with sufficient current, ie resistive divider 3.3->1.8 is likely not to work. If using with RPi CM3, LCD_RST can be directly driven by 1.8 powered GPIO bank
Github资源链接: