Difference between revisions of "HBW test/test"
From ESS-WIKI
(→Convert hex value to i2cset command list) |
|||
Line 21: | Line 21: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==Convert | + | == Convert edit binary config to i2cset commands == |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | EDIDNEW=6 | + | EDIDNEW=6 # set EDID |
EDIDBIN=g070vw01v0.bin | EDIDBIN=g070vw01v0.bin | ||
SCRIPT=set_new_edid.sh | SCRIPT=set_new_edid.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` | ||
+ | |||
+ | cat << EOT > $SCRIPT | ||
+ | #!/bin/bash | ||
+ | i2cset -f -y 2 0x20 0x85 $REG85 b | ||
+ | |||
+ | $( | ||
xxd -c 16 -ps $EDIDBIN | | xxd -c 16 -ps $EDIDBIN | | ||
sed "s/../0x& /g; s/ *$//" | | sed "s/../0x& /g; s/ *$//" | | ||
for ADDR in `seq 0x00 0x10 0x70`; do | for ADDR in `seq 0x00 0x10 0x70`; do | ||
read | read | ||
− | echo i2cset -f -y 2 0x20 `printf "0x%02x" $ADDR` $REPLY | + | echo i2cset -f -y 2 0x20 `printf "0x%02x" $ADDR` $REPLY i |
− | done | + | 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 | ||
+ | sudo ./$SCRIPT | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 08:02, 2 January 2024
Prerequisites
On Host PC
- LVDS panel's EDID config (128 bytes)
- (optional) one utility to edit EDID config
- PTN3460 Programming Guide
On RSB-3810
- i2c-tools installed
sudo apt update
sudo apt install i2c-tools
Convert EDID config to hex value
(use g070vw01v0.bin as example below)
EDIDBIN=g070vw01v0.bin
xxd -c 16 -ps $EDIDBIN | sed "s/../0x& /g; s/ *$//"
Convert edit binary config to i2cset commands
EDIDNEW=6 # set EDID
EDIDBIN=g070vw01v0.bin
SCRIPT=set_new_edid.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`
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
sudo ./$SCRIPT
Add i2c command for PTN3460
run the script
flash new firmware.vfat
get and extract update_edid.tgz
tar xvf update_edid.tgz
flash u-boot env & firmware (dtb)
genio-flash mmc0boot1 firmware firmware_b
config u-boot env to ebable LVDS display
(choose 1,3,4,5 or 6 as a new EDID, use 6 as example below)
break countdown in u-boot
- Multi-display (HDMI + LVDS)
- The LVDS is always major display that has nothing to do with the specified order.
setenv list_dbto "gpu-mali.dtbo video.dtbo apusys.dtbo hdmi.dtbo lvds6.dtbo"
saveenv
reset
- LVDS only
setenv list_dbto "gpu-mali.dtbo video.dtbo apusys.dtbo lvds6.dtbo"
saveenv
reset