/**
 * @file hv_comm_FlashConfig.h
 * @brief Header file of Project.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 *
 *
 @ endverbatim
 *
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-04-25
 */
#ifndef __HV_COMM_FLASH_CONFIG_H__
#define __HV_COMM_FLASH_CONFIG_H__

/* *********
FLASH_N25Q:0
FLASH_MT25:1
FLASH_P25Q:2
FLASH_W25Q:3
FLASH_GD25:4
FLASH_MX25:5
***********/
#define HV_FLASH_CONFIG_TYPE                     3
#define CONFIG_DB_USERDATA                       1

#define HV_FLASH_CONFIG_PM_PART_SIZE             (36*1024)
#define HV_FLASH_CONFIG_PM_DATA_START            (28*1024)
#define HV_FLASH_CONFIG_SUPERBLOCK_START         (32*1024)
#define HV_FLASH_CONFIG_BOOT_SIZE                (60*1024*2)

#define HV_FLASH_CONFIG_PRECODE_SIZE             (HV_FLASH_CONFIG_PM_PART_SIZE + HV_FLASH_CONFIG_BOOT_SIZE)

/* 4MB flash compress */
#define CONFIG_CODE_COMPRESSED
#define CONFIG_PQ_COMPRESSED

#define HV_FLASH_CONFIG_CODE_PART_SIZE           (1304*1024)
#define HV_FLASH_CONFIG_LOGO_PART_SIZE           (128*1024)


#define HV_FLASH_CONFIG_TIMER_START         (0*1024)
#define HV_FLASH_CONFIG_USERDATA_START      (4*1024)
#define HV_FLASH_CONFIG_USERBACK_START      (8*1024)
#define HV_FLASH_CONFIG_SYSTEMDATA_START    (12*1024)
#define HV_FLASH_CONFIG_FACDATA_START       (16*1024)
#define HV_FLASH_CONFIG_PANEL_START         (20*1024)
#define HV_FLASH_CONFIG_GAMMA_START         (24*1024)
#define HV_FLASH_CONFIG_DPEDID_START        (40*1024)
#define HV_FLASH_CONFIG_HDMIEDID_START      (48*1024)
#define HV_FLASH_CONFIG_HDCP_START          (56*1024)
#define HV_FLASH_CONFIG_DIAGDATA_START      (60*1024)

#define HV_FLASH_CONFIG_PQ_DATA_PART_SIZE        (396*1024)
#define HV_FLASH_CONFIG_BACK_SIZE           (0x218000)

#define HV_FLASH_CONFIG_START_XIP                0xbfc00000
#define HV_FLASH_CONFIG_START                    0x0
#define HV_FLASH_CONFIG_LOGO_PART_START         (HV_FLASH_CONFIG_START + HV_FLASH_CONFIG_PRECODE_SIZE + HV_FLASH_CONFIG_CODE_PART_SIZE)
#define HV_FLASH_CONFIG_PQ_DATA_PART_START      (HV_FLASH_CONFIG_LOGO_PART_START+ HV_FLASH_CONFIG_LOGO_PART_SIZE)
#define HV_FLASH_CONFIG_MONITOR_DATA_PART_START (HV_FLASH_CONFIG_PQ_DATA_PART_START + HV_FLASH_CONFIG_PQ_DATA_PART_SIZE)
#endif
