Difference between revisions of "AIMLinux/BSP/Linux/MT8395/control brightness backlight"

From ESS-WIKI
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:How to control panel brightness and backlight}} === Brightness Control === <syntaxhighlight lang="bash"> # valid range : 0x0FFF (dark) ~ 0x0000 (brightest) # h...")
 
 
Line 1: Line 1:
 
{{DISPLAYTITLE:How to control panel brightness and backlight}}
 
{{DISPLAYTITLE:How to control panel brightness and backlight}}
  
=== Brightness Control ===
+
== Brightness Control ==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
# valid range : 0x0FFF (dark) ~ 0x0000 (brightest) # highest 4 bits must be zero
 
# valid range : 0x0FFF (dark) ~ 0x0000 (brightest) # highest 4 bits must be zero
Line 14: Line 14:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Backlight Control ===
+
== Backlight Control ==
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
# enable
 
# enable
Line 26: Line 26:
 
sudo i2cset -f -y 2 0x20 0xe8 0x01 0x78 0x45 0x56 i && sudo reboot
 
sudo i2cset -f -y 2 0x20 0xe8 0x01 0x78 0x45 0x56 i && sudo reboot
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
== References ==
 +
* PTN3460 Programming Guide

Latest revision as of 05:10, 3 January 2024


Brightness Control

# valid range : 0x0FFF (dark) ~ 0x0000 (brightest) # highest 4 bits must be zero
# notice: keep highest 4 bits zero or brightness will be dark whatever lower 12 bits set

# use hexadecimal without leading "0x" (default:7FF)
BRIGHTNESS=6FF 
sudo i2cset -f -y 2 0x20 0x90 $(( $((16#$BRIGHTNESS)) / 256 )) $(( $((16#$BRIGHTNESS)) % 256 )) i

# keep setting
sudo i2cset -f -y 2 0x20 0xe8 0x01 0x78 0x45 0x56 i && sudo reboot

Backlight Control

# enable
sudo i2cset -f -y 2 0x20 0x95 0

# disable
sudo i2cset -f -y 2 0x20 0x95 1

# keep setting
# notice: if "disable" is set, the panel keeps backlight disabled after reboot
sudo i2cset -f -y 2 0x20 0xe8 0x01 0x78 0x45 0x56 i && sudo reboot

References

  • PTN3460 Programming Guide