mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(lcd): support i80 lcd sleep retention on p4
This commit is contained in:
committed by
Chen Ji Chang
parent
8a0a3b921d
commit
d7481316f1
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "hal/lcd_periph.h"
|
||||
#include "soc/gpio_sig_map.h"
|
||||
#include "soc/lcd_cam_reg.h"
|
||||
|
||||
const soc_lcd_i80_signal_desc_t soc_lcd_i80_signals[1] = {
|
||||
[0] = {
|
||||
@@ -80,3 +81,39 @@ const soc_lcd_rgb_signal_desc_t soc_lcd_rgb_signals[1] = {
|
||||
.disp_sig = SIG_GPIO_OUT_IDX,
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* LCD_CAM Registers to be saved during sleep retention
|
||||
* - LCD Clock Configuration registers: LCDCAM_LCD_CLOCK_REG (0x0)
|
||||
* - LCD RGB/YUV Configuration registers: LCDCAM_LCD_RGB_YUV_REG (0x10)
|
||||
* - LCD User Configuration registers: LCDCAM_LCD_USER_REG (0x14), LCDCAM_LCD_MISC_REG (0x18)
|
||||
* - LCD Control registers: LCDCAM_LCD_CTRL_REG (0x1c), LCDCAM_LCD_CTRL1_REG (0x20), LCDCAM_LCD_CTRL2_REG (0x24)
|
||||
* - LCD Command Value registers: LCDCAM_LCD_FIRST_CMD_VAL_REG (0x28), LCDCAM_LCD_LATTER_CMD_VAL_REG (0x2c)
|
||||
* - LCD Delay Mode Configuration registers: LCDCAM_LCD_DLY_MODE_CFG1_REG (0x30), LCDCAM_LCD_DLY_MODE_CFG2_REG (0x38)
|
||||
* - LCD DMA Interrupt Enable register: LCDCAM_LC_DMA_INT_ENA_REG (0x64)
|
||||
*
|
||||
* NOTE: Only I80 LCD supports sleep retention, not RGB LCD.
|
||||
*/
|
||||
#define LCD_RETENTION_REGS_CNT 12
|
||||
#define LCD_RETENTION_REGS_BASE (DR_REG_LCDCAM_BASE + 0x0)
|
||||
static const uint32_t lcd_cam_regs_map[4] = {0x2005ff1, 0x0, 0x0, 0x0};
|
||||
static const regdma_entries_config_t lcd_regs_retention[] = {
|
||||
// backup stage: save configuration registers
|
||||
// restore stage: restore the configuration registers
|
||||
[0] = {
|
||||
.config = REGDMA_LINK_ADDR_MAP_INIT(REGDMA_LCDCAM_LINK(0x00),
|
||||
LCD_RETENTION_REGS_BASE, LCD_RETENTION_REGS_BASE,
|
||||
LCD_RETENTION_REGS_CNT, 0, 0,
|
||||
lcd_cam_regs_map[0], lcd_cam_regs_map[1],
|
||||
lcd_cam_regs_map[2], lcd_cam_regs_map[3]),
|
||||
.owner = ENTRY(0),
|
||||
},
|
||||
};
|
||||
|
||||
const soc_i80_lcd_retention_info_t soc_i80_lcd_retention_info[1] = {
|
||||
[0] = {
|
||||
.regdma_entry_array = lcd_regs_retention,
|
||||
.array_size = ARRAY_SIZE(lcd_regs_retention),
|
||||
.retention_module = SLEEP_RETENTION_MODULE_LCDCAM
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user