6.5 Power and Backlight Control with ATtiny Atmel MCU
The ATtiny microcontroller in the Raspberry Pi Touch Display 2 manages power and backlight control. It interfaces via I2C through the REG_POWERON and REG_PWM registers. These registers are configured using the Raspberry Pi v2 panel regulator Linux driver.
Refer to github.com/raspberrypi/linux/blob/rpi-6.6.y/drivers/regulator/rpi-panel-v2-regulator.c.

- DISP_STATE_SET_BRIGHTNESS:
- Is executed after DISP_STATE_CONFIG_MIPI_HOST (display initialization).
- Writes to REG_PWM (0x03) with a fixed value of
0x9f using DISP_WriteRegister:
DISP_WriteRegister(REG_PWM, 0x9f, DISP_CLIENT_ID_MCU); - This configuration turns on the display backlight.
- DISP_STATE_POWER_ON:
- Sends REG_POWERON (0x02, value 0x3) to activate
the ATtiny, enabling backlight functionality:
DISP_WriteRegister(REG_POWERON, 0x3, DISP_CLIENT_ID_MCU); - Ensures the ATtiny is powered before brightness control.
- Sends REG_POWERON (0x02, value 0x3) to activate
the ATtiny, enabling backlight functionality:
