Repository navigation
Core2: reset the LCD through the AXP2101 bit on the new PMIC - #354
Merged
Merged
Conversation
Panel_M5StackCore2_T::rst_control always toggled AXP192 reg 0x96 bit1 (GPIO4 = LCD RST). On the AXP2101 (Core2 v1.1 and later) reg 0x96 is the BLDO1 voltage, which powers the backlight, so every panel init nudged the backlight voltage and never reset the LCD. The panel now carries the reset register, set at construction from the detected PMIC: 0x90 bit1 (ALDO2 enable) on the AXP2101, the same bit the detector already uses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
On Core2 boards with the AXP2101 PMIC (v1.1), the panel's
rst_control()toggled reg 0x96 bit1. That is the LCD reset line (GPIO4) on the AXP192, but on the AXP2101 reg 0x96 is the BLDO1 voltage, which powers the backlight. Every panel init therefore nudged the backlight voltage and never reset the LCD.The panel now carries its reset register, chosen at construction from the detected PMIC: reg 0x90 bit1 (ALDO2 enable) on the AXP2101, the same bit the board detection already uses for this reset, and reg 0x96 bit1 on the AXP192 as before.
Checked
getPanel()->init(true), then read the display power mode (0x0A). Init does not send NORON, so the normal-mode state only comes back through a hardware reset.init(false)is the control.