Skip to content

Core2: reset the LCD through the AXP2101 bit on the new PMIC - #354

Merged
lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:core2_lcd_reset
Oct 14, 2026
Merged

lovyan03 merged 1 commit into
m5stack:developfrom
ainyan03:core2_lcd_reset

Conversation

@ainyan03

Copy link
Copy Markdown
Contributor

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

  • Hardware: put the LCD into partial mode (0x12), call 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.
Board PMIC Before After
Core2 v1.1 AXP2101 partial mode kept (LCD not reset), reg 0x96 rewritten partial mode cleared, reg 0x96 untouched
Core2 v1.3 (ILI9342E) AXP192 reset works same
Core2 for AWS AXP192 reset works same
  • Builds with Arduino 2.0.x (ESP-IDF 4.4) / 3.x and ESP-IDF 5.1 to 6.1 across ESP32, S3, C3, C5, C6, C61, H2 and P4.

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.
@lovyan03
lovyan03 merged commit 422b594 into m5stack:develop Oct 14, 2026
26 checks passed
@ainyan03
ainyan03 deleted the core2_lcd_reset branch October 14, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants