Difference between revisions of "HBW test/test"
From ESS-WIKI
(→set matched device tree overlay (dtbo) in U-Boot) |
|||
Line 67: | Line 67: | ||
saveenv | saveenv | ||
reset | reset | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Appendix == | ||
+ | === fetch pre-set EDID === | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | EDID=2 | ||
+ | sudo i2cset -f -y 2 0x20 0x85 $EDID b | ||
+ | for DA in `seq 0 0x10 0x70`; do | ||
+ | sudo i2cget -f -y 2 0x20 $DA i 0x10 | ||
+ | done | xxd -r -p > EDID_$EDID.bin | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 09:10, 2 January 2024
Contents
Prerequisites
- PTN3460 Programming Guide
- EDID config (128 bytes) to the new LVDS panel
- i2c-tools installed
sudo apt update
sudo apt install i2c-tools
(use EDID 6 and panel, G070VW01V0, as example below)
Convert EDID config to shell script
On Ubuntu
EDIDNEW=6 # set EDID
EDIDBIN=g070vw01v0.bin
SCRIPT=~/set_edid_${EDIDNEW}.sh
REG81=$(printf "0x%02x" 0) # Please refer to the PTN3460 Programming Guide to set correct value
REG84=$(printf "0x%02x" $((2*EDIDNEW + 1)))
REG85=$(printf "0x%02x" $EDIDNEW)
echo -e "REG81:$REG81\nREG84:$REG84\nREG85:$REG85\n"
cat << EOT > $SCRIPT
#!/bin/bash
i2cset -f -y 2 0x20 0x85 $REG85 b
$(
xxd -c 16 -ps $EDIDBIN |
sed "s/../0x& /g; s/ *$//" |
for ADDR in `seq 0x00 0x10 0x70`; do
read
echo i2cset -f -y 2 0x20 `printf "0x%02x" $ADDR` $REPLY i
done
)
i2cset -f -y 2 0x20 0x81 $REG81 b
i2cset -f -y 2 0x20 0x84 $REG84 b
i2cset -f -y 2 0x20 0xe8 0x01 0x78 0x45 0x56 i
EOT
chmod +x $SCRIPT
run the script and reboot
sudo $SCRIPT
sudo reboot
Set matched device tree overlay (dtbo) in U-Boot
On U-Boot
Press any key to stop auto boot
- Multi-display (HDMI + LVDS)
- The LVDS is always major display that has nothing to do with the specified order.
setenv DISPLAY hdmi.dtbo lvds6.dtbo
saveenv
reset
- LVDS only
setenv DISPLAY lvds6.dtbo
saveenv
reset
Appendix
fetch pre-set EDID
EDID=2
sudo i2cset -f -y 2 0x20 0x85 $EDID b
for DA in `seq 0 0x10 0x70`; do
sudo i2cget -f -y 2 0x20 $DA i 0x10
done | xxd -r -p > EDID_$EDID.bin