#ifndef FLASH_LAYOUT_H
#define FLASH_LAYOUT_H

//----------------------------------------------------------------------------
// Flash Partition configuration
//----------------------------------------------------------------------------
#ifdef DEMO_BOARD
#define NAND_FLASH_TOTAL_SIZE           ((UINT64) 8*1024*1024*1024 & 0xFFFFFFFFF)
#else
#define NAND_FLASH_TOTAL_SIZE           ((UINT64)16*1024*1024*1024 & 0xFFFFFFFFF)
#endif
//#define MAX_UPGRADE_IMAGE_FILE_SIZE      ((UINT64)4*1024*1024*1024)

#ifdef CC_ARIB
#define NAND_FLASH_3RD_SIZE             ((UINT64)(400*1024*1024))     /* 400 MB */
#define NAND_FLASH_3RD_RW_SIZE          ((UINT64)(500*1024*1024))     /* 500 MB */
#else
#ifdef CC_3RD_RO_DBG
#define NAND_FLASH_3RD_SIZE             ((UINT64)(200*1024*1024))     /* 200 MB */
#else
#define NAND_FLASH_3RD_SIZE             ((UINT64)(124*1024*1024))     /* 124 MB */
#endif
#define NAND_FLASH_3RD_RW_SIZE          ((UINT64)(233*1024*1024))     /* 233 MB */
#endif

#define NAND_FLASH_PQ_SIZE              ((UINT64)(5*1024*1024))      /*  14 MB */

#ifdef CC_DISABLE_BASIC_PART
#ifdef CC_SYM_SUPPORT
#define NAND_FLASH_ROOTFS_SIZE          ((UINT64)(120*1024*1024))      /*120 MB */ /* SYM_SUPPORT=true */
#define NAND_FLASH_APPIMAGE_SIZE        ((UINT64)(139*1024*1024))     /* 139 MB */ /* SYM_SUPPORT=true */
#else
#define NAND_FLASH_ROOTFS_SIZE          ((UINT64)(100*1024*1024))      /*100 MB */ /* Normal behavior */
#define NAND_FLASH_APPIMAGE_SIZE        ((UINT64)(159*1024*1024))     /* 159 MB */ /* Normal behavior */
#endif /* endif CC_SYM_SUPPORT */
#else
#define NAND_FLASH_ROOTFS_SIZE          ((UINT64)(19*1024*1024))      /*  19 MB */ /* Debug+Development purpose */
#define NAND_FLASH_APPIMAGE_SIZE        ((UINT64)(240*1024*1024))     /* 240 MB */ /* Debug+Development purpose */
#endif /* endif CC_DISABLE_BASIC_PART */

#define NAND_FLASH_LOADER_SIZE              ((UINT64)(2*1024*1024))       /*   2 MB */
#define NAND_FLASH_UBOOT_SIZE               ((UINT64)(2*1024*1024))       /*   2 MB */
#define NAND_FLASH_MISC_SIZE                ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_RECV_SIZE                ((UINT64)(20*1024*1024))      /*  20 MB */
#define NAND_FLASH_BOOT_SIZE                ((UINT64)(20*1024*1024))      /*  20 MB */

#define NAND_FLASH_CACH_SIZE                ((UINT64)(600*1024*1024))     /* 600 MB */
#define NAND_FLASH_RSVD_SIZE                ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SINGLE_CHANNELLIST_SIZE  ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_AQ_SIZE                  ((UINT64)(1*1024*1024))       /*   1 MB */
//#define NAND_FLASH_CAPTURE_LOGO_SIZE        ((UINT64)(4*1024*1024))       /*   4 MB */
#define NAND_FLASH_LOADER_LOGO_SIZE         ((UINT64)(4*1024*1024))       /*   4 MB */
#define NAND_FLASH_TRUSTZONE_SIZE           ((UINT64)(2*1024*1024))       /*   1 MB */
//#define NAND_FLASH_SIGNATURE_SIZE           ((UINT64)(2*1024*1024))       /*   2 MB */
#define NAND_FLASH_KERNEL_SIZE              ((UINT64)(3*1024*1024))       /*   2 MB */
#define NAND_FLASH_PERM_SIZE                ((UINT64)(8*1024*1024))       /*   8 MB */
#define NAND_FLASH_PANEL_SIZE               ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_CIPLUS_SIZE              ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_EDID_SIZE                ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SERVICE_MODE_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_DVBS_DEFAULT_DB_SIZE     ((UINT64)(1*1024*1024))       /*   1 MB */

#ifdef CC_ARIB
#define NAND_FLASH_EPG_CACHE_SIZE           ((UINT64)(260*1024*1024))     /* 260 MB */
#define NAND_FLASH_ARIB_NVRAM_SIZE          ((UINT64)(300*1024*1024))     /* 300 MB */
#else
#define NAND_FLASH_EPG_CACHE_SIZE           ((UINT64)(38*1024*1024))      /*   38 MB */
#define NAND_FLASH_ARIB_NVRAM_SIZE          ((UINT64)(1*1024*1024))       /*    1 MB */
#endif

    #ifdef ADSP_BIN_SUPPORT
        #define PART_ADSP_SIZE              (3*1024*1024) /* audio dsp size */
	#ifdef CC_AUD_ARM_SUPPORT
		#define PART_AARM_SIZE				((UINT64)(4*1024*1024)) /* 4 MB*/
        #else
            #define PART_AARM_SIZE			((UINT64)(4*1024*1024)) /* 4 MB */
	#endif
    #else
        #define PART_ADSP_SIZE              ((UINT64)(2*1024*1024))       /*   2 MB */
        #define PART_AARM_SIZE	            ((UINT64)(4*1024*1024)) /* 4 MB */
    #endif  

#define NAND_FLASH_VERSION_SIZE             ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_REPLACE_EEPROM_SIZE      ((UINT64)(1*1024*1024))       /*  1  MB for each*/
#define NAND_FLASH_RESERVE_SIZE             ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_DDRI_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_MLFW_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_LDAT_SIZE        ((UINT64)(3*1024*1024))       /*   3 MB */
#define NAND_FLASH_SONY_BE_MAFW_SIZE        ((UINT64)(6*1024*1024))       /*   6 MB */
#define NAND_FLASH_SONY_BE_DFW1_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_DFW2_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_PDAT_SIZE        ((UINT64)(5*1024*1024))       /*   5 MB */
#define NAND_FLASH_SONY_BE_BDAT_SIZE        ((UINT64)(8*1024*1024))       /*   8 MB */
#define NAND_FLASH_SONY_BE_NDAT_SIZE        ((UINT64)(2*1024*1024))       /*   2 MB */
#define NAND_FLASH_SONY_BE_FDAT_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_UDAT_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_BDIX_SIZE        ((UINT64)(2*1024*1024))       /*   2 MB */
#define NAND_FLASH_SONY_BE_MINF_SIZE        ((UINT64)(1*1024*1024))       /*   1 MB */
#define NAND_FLASH_SONY_BE_BEDAT_SIZE       ((UINT64)(6*1024*1024))       /*   6 MB */
//#define NAND_FLASH_SONY_BE_RESV_SIZE        ((UINT64)(8*1024*1024))       /*   8 MB */
#define NAND_FLASH_UDT_SIZE                 ((UINT64)(1*1024*1024))       /*   1 MB */

#ifdef DEMO_BOARD
#define NAND_FLASH_UPGRADE_SIZE             ((UINT64)(1024*1024*1024))    /* 1536MB */
#define NAND_FLASH_DATA_DEMO_SIZE           ((UINT64)(400*1024*1024))     /* 400MB */
#define NAND_FLASH_SYSM_SIZE                ((UINT64)(1800*1024*1024))    /* 1800MB */
#define NAND_FLASH_USRD_SIZE                ((UINT64) 1024*1024*1024 & 0xFFFFFFFFFFF)    /* 1024MB */
#else
#define NAND_FLASH_UPGRADE_SIZE             ((UINT64) 2048*1024*1024 & 0xFFFFFFFFFFF)
#define NAND_FLASH_DATA_DEMO_SIZE           ((UINT64)(1024*1024*1024))    /* 1024MB */
#define NAND_FLASH_SYSM_SIZE                ((UINT64)(1800*1024*1024))    /* 1800MB */

#ifdef CC_ARIB
#define NAND_FLASH_USRD_SIZE                ((UINT64) 7558*1024*1024 & 0xFFFFFFFFFFF)
#else
#define NAND_FLASH_USRD_SIZE                ((UINT64) 8622*1024*1024 & 0xFFFFFFFFFFF)
#endif

#endif

#define NAND_FLASH_SDCARD_SIZE              ((UINT64)(1*1024*1024))         /* 1 MB */

#define NAND_FLASH_HDCP_SIZE                ((UINT64)(1*1024*1024))         /* 1 MB */

#define NAND_FLASH_OOPS_SIZE                ((UINT64)(1*1024*1024))         /* 1 MB */
#define NAND_FLASH_SPQD_SIZE                ((UINT64)(2*1024*1024))         /* 2 MB */
#define NAND_FLASH_SPQC_SIZE                ((UINT64)(5*1024*1024))         /* 5 MB */

#define NAND_PART_SIZE_0                    (NAND_FLASH_LOADER_SIZE)                /* loader image                  */
#define NAND_PART_SIZE_1                    (NAND_FLASH_UBOOT_SIZE)                 /* nand_1  - uboot env           */
#define NAND_PART_ID_EEPROM_A               (2)
#define NAND_PART_SIZE_2                    (NAND_FLASH_REPLACE_EEPROM_SIZE)
#define NAND_PART_SIZE_3                    (NAND_FLASH_PERM_SIZE)
#define NAND_PART_SIZE_4                    (NAND_FLASH_BOOT_SIZE)
#define NAND_PART_SIZE_5                    (NAND_FLASH_RSVD_SIZE)
#define NAND_PART_SIZE_6                    (NAND_FLASH_SINGLE_CHANNELLIST_SIZE)
#define NAND_PART_SIZE_7                    (NAND_FLASH_SINGLE_CHANNELLIST_SIZE)
#define NAND_PART_SIZE_8                    (NAND_FLASH_PQ_SIZE)
#define NAND_PART_SIZE_9                    (NAND_FLASH_AQ_SIZE)
#define NAND_PART_SIZE_10                   (NAND_FLASH_LOADER_LOGO_SIZE)
#define NAND_PART_SIZE_11                   (NAND_FLASH_TRUSTZONE_SIZE)
#define NAND_PART_SIZE_12                   (NAND_FLASH_ROOTFS_SIZE)                /* nand_6  - rootfs A            */
#define NAND_PART_SIZE_13                   (NAND_FLASH_APPIMAGE_SIZE)              /* nand_8  - basic               */
#define NAND_PART_SIZE_14                   (NAND_FLASH_3RD_RW_SIZE)                /* nand_9  - 3rd_rw              */
#define NAND_PART_SIZE_15                   (NAND_FLASH_HDCP_SIZE)
#define NAND_PART_SIZE_16                   (NAND_FLASH_3RD_SIZE)                   /* nand_12 - 3rd_ro              */
#define NAND_PART_SIZE_17                   (NAND_FLASH_PANEL_SIZE)                 /* nand_17 - Flash Panel         */
#define NAND_PART_SIZE_18                   (NAND_FLASH_CIPLUS_SIZE)                /* nand_18 - ci                  */
#define NAND_PART_SIZE_19                   (NAND_FLASH_EDID_SIZE)                  /* nand_19 - edid                */
#define NAND_PART_SIZE_20                   (NAND_FLASH_SERVICE_MODE_SIZE)          /* nand_20 - Service mode        */
#define NAND_PART_SIZE_21                   (NAND_FLASH_DVBS_DEFAULT_DB_SIZE)       /* nand_21 - DVBS Default DB     */
#define NAND_PART_SIZE_22                   (NAND_FLASH_EPG_CACHE_SIZE)             /* nand_22 - EPG Cache           */
#define NAND_PART_ID_ADSPBIN                (23)
#define NAND_PART_SIZE_23                   (PART_ADSP_SIZE)               /* ADSP partition */
#define NAND_PART_SIZE_24                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_25                   (NAND_FLASH_HDCP_SIZE)
#define NAND_PART_SIZE_26                   (NAND_FLASH_SONY_BE_DDRI_SIZE)          /* Sony backend IC DDR Init FW */
#define NAND_PART_SIZE_27                   (NAND_FLASH_SONY_BE_MLFW_SIZE)          /* Sony backend IC Main Loader FW*/
#define NAND_PART_SIZE_28                   (NAND_FLASH_SONY_BE_LDAT_SIZE)          /* Sony backend IC L-Data */     
#define NAND_PART_SIZE_29                   (NAND_FLASH_SONY_BE_MAFW_SIZE)          /* Sony backend IC Main FW */    
#define NAND_PART_SIZE_30                   (NAND_FLASH_SONY_BE_DFW1_SIZE)          /* Sony backend IC DFW1 */       
#define NAND_PART_SIZE_31                   (NAND_FLASH_SONY_BE_DFW2_SIZE)          /* Sony backend IC DFW2 */       
#define NAND_PART_SIZE_32                   (NAND_FLASH_SONY_BE_PDAT_SIZE)          /* Sony backend IC P-Data */     
#define NAND_PART_SIZE_33                   (NAND_FLASH_SONY_BE_BDAT_SIZE)          /* Sony backend IC B-Data */     
#define NAND_PART_SIZE_34                   (NAND_FLASH_SONY_BE_NDAT_SIZE)          /* Sony backend IC N-Data */     
#define NAND_PART_SIZE_35                   (NAND_FLASH_SONY_BE_FDAT_SIZE)          /* Sony backend IC F-Data */     
#define NAND_PART_SIZE_36                   (NAND_FLASH_SONY_BE_UDAT_SIZE)          /* Sony backend IC U-Data */   
#define NAND_PART_SIZE_37                   (NAND_FLASH_SONY_BE_BDIX_SIZE)          /* Sony backend IC BDI */   
#define NAND_PART_SIZE_38                   (NAND_FLASH_SONY_BE_MINF_SIZE)          /* map info */   
#define NAND_PART_SIZE_39                   (NAND_FLASH_SONY_BE_BEDAT_SIZE)         /* This have child partition */   

#define NAND_PART_SIZE_40                   (NAND_FLASH_UPGRADE_SIZE)
#define NAND_PART_SIZE_41                   (NAND_FLASH_MISC_SIZE)
#define NAND_PART_SIZE_42                   (NAND_FLASH_RECV_SIZE)
#define NAND_PART_SIZE_43                   (NAND_FLASH_SYSM_SIZE)
#define NAND_PART_SIZE_44                   (NAND_FLASH_USRD_SIZE)
#define NAND_PART_SIZE_45                   (NAND_FLASH_CACH_SIZE)
#define NAND_PART_SIZE_46                   (NAND_FLASH_SDCARD_SIZE)
#define NAND_PART_SIZE_47                   (NAND_FLASH_UDT_SIZE)
#define NAND_PART_SIZE_48                   (NAND_FLASH_ARIB_NVRAM_SIZE)
#define NAND_PART_SIZE_49                   (PART_AARM_SIZE)
#define NAND_PART_SIZE_50                   (NAND_FLASH_DATA_DEMO_SIZE)
#define NAND_PART_SIZE_51                   (NAND_FLASH_VERSION_SIZE)
#define NAND_PART_SIZE_52                   (NAND_FLASH_OOPS_SIZE)
#define NAND_PART_SIZE_53                   (NAND_FLASH_SPQD_SIZE)
#define NAND_PART_SIZE_54                   (NAND_FLASH_SPQC_SIZE)
#define NAND_PART_SIZE_55                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_56                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_57                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_58                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_59                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_60                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_61                   (NAND_FLASH_RESERVE_SIZE)
#define NAND_PART_SIZE_62                   (NAND_FLASH_RESERVE_SIZE)


#ifdef CC_MTD_ENCRYPT_SUPPORT
#define NAND_PART_ENCRYPT_1                 (1)
#define NAND_PART_ENCRYPT_2                 (0)
#define NAND_PART_ENCRYPT_3                 (0)
#define NAND_PART_ENCRYPT_4                 (1)                 /* boot */
#define NAND_PART_ENCRYPT_5                 (0)
#define NAND_PART_ENCRYPT_6                 (0)
#define NAND_PART_ENCRYPT_7                 (0)
#define NAND_PART_ENCRYPT_8                 (0)
#define NAND_PART_ENCRYPT_9                 (0)
#define NAND_PART_ENCRYPT_10                (0)
#define NAND_PART_ENCRYPT_11                (0)
#define NAND_PART_ENCRYPT_12                (1)                 /* rfs */
#define NAND_PART_ENCRYPT_13                (0)
#define NAND_PART_ENCRYPT_14                (0)
#define NAND_PART_ENCRYPT_15                (0)
#define NAND_PART_ENCRYPT_16                (1)                 /* 3rdp */
#define NAND_PART_ENCRYPT_17                (0)
#define NAND_PART_ENCRYPT_18                (0)
#define NAND_PART_ENCRYPT_19                (0)
#define NAND_PART_ENCRYPT_20                (0)
#define NAND_PART_ENCRYPT_21                (0)
#define NAND_PART_ENCRYPT_22                (0)
#define NAND_PART_ENCRYPT_23                (0)
#define NAND_PART_ENCRYPT_24                (0)
#define NAND_PART_ENCRYPT_25                (0)
#define NAND_PART_ENCRYPT_26                (0)
#define NAND_PART_ENCRYPT_27                (0)
#define NAND_PART_ENCRYPT_28                (0)
#define NAND_PART_ENCRYPT_29                (0)
#define NAND_PART_ENCRYPT_30                (0)
#define NAND_PART_ENCRYPT_31                (0)
#define NAND_PART_ENCRYPT_32                (0)
#define NAND_PART_ENCRYPT_33                (0)
#define NAND_PART_ENCRYPT_34                (0)
#define NAND_PART_ENCRYPT_35                (0)
#define NAND_PART_ENCRYPT_36                (0)
#define NAND_PART_ENCRYPT_37                (0)
#define NAND_PART_ENCRYPT_38                (0)
#define NAND_PART_ENCRYPT_39                (0)
#define NAND_PART_ENCRYPT_40                (0)
#define NAND_PART_ENCRYPT_41                (1)
#define NAND_PART_ENCRYPT_42                (0)
#define NAND_PART_ENCRYPT_43                (1)                 /* system */
#define NAND_PART_ENCRYPT_44                (0)
#define NAND_PART_ENCRYPT_45                (0)
#define NAND_PART_ENCRYPT_46                (0)
#define NAND_PART_ENCRYPT_47                (0)
#define NAND_PART_ENCRYPT_48                (0)
#define NAND_PART_ENCRYPT_49                (0)
#define NAND_PART_ENCRYPT_50                (0)
#define NAND_PART_ENCRYPT_51                (0)

#define NAND_PART_ENCRYPT_52                (0)
#define NAND_PART_ENCRYPT_53                (0)
#define NAND_PART_ENCRYPT_54                (0)
#define NAND_PART_ENCRYPT_55                (0)
#define NAND_PART_ENCRYPT_56                (0)
#define NAND_PART_ENCRYPT_57                (0)
#define NAND_PART_ENCRYPT_58                (0)
#define NAND_PART_ENCRYPT_59                (0)
#define NAND_PART_ENCRYPT_60                (0)
#define NAND_PART_ENCRYPT_61                (0)
#define NAND_PART_ENCRYPT_62                (0)

#endif /* endif CC_MTD_ENCRYPT_SUPPORT */

#define NAND_PART_NAME_0                "uboot"
#define NAND_PART_NAME_1                "uboot_env"
#define NAND_PART_NAME_2                "eeprom_A"
#define NAND_PART_NAME_3                "perm"
#define NAND_PART_NAME_4                "boot"
#define NAND_PART_NAME_5                "reserved1"
#define NAND_PART_NAME_6                "channelA"
#define NAND_PART_NAME_7                "channelB"
#define NAND_PART_NAME_8                "pq"
#define NAND_PART_NAME_9                "aq"
#define NAND_PART_NAME_10               "bootlogo"
#ifdef CC_TZBIN_INDIVIDUAL_PARTITION
    #define NAND_PART_NAME_11           "tzbp"
    #define TRUSTZONE_FLASH_PARTITION   (11)
#endif /* endif CC_TZBIN_INDIVIDUAL_PARTITION */
#define NAND_PART_NAME_12               "linux_rootfsA"
#define NAND_PART_NAME_13               "basic"
#define NAND_PART_NAME_14               "3rd_rw"
#define NAND_PART_NAME_15               "hdmi"
#define NAND_PART_NAME_16               "3rd_ro"
#define NAND_PART_NAME_17               "panel"
#define NAND_PART_NAME_18               "ci"
#define NAND_PART_NAME_19               "edid"
#define NAND_PART_NAME_20               "svc"
#define NAND_PART_NAME_21               "ddb"
#define NAND_PART_NAME_22               "epg"
#define NAND_PART_NAME_23               "adsp"
#define NAND_PART_NAME_24               "reserved2"
#define NAND_PART_NAME_25               "wfdp"
#define NAND_PART_NAME_26               "ddri"
#define NAND_PART_NAME_27               "mlfw"
#define NAND_PART_NAME_28               "ldat"
#define NAND_PART_NAME_29               "mafw"
#define NAND_PART_NAME_30               "dfw1"
#define NAND_PART_NAME_31               "dfw2"
#define NAND_PART_NAME_32               "pdat"
#define NAND_PART_NAME_33               "bdat"
#define NAND_PART_NAME_34               "ndat"
#define NAND_PART_NAME_35               "fdat"
#define NAND_PART_NAME_36               "udat"
#define NAND_PART_NAME_37               "bdix"
#define NAND_PART_NAME_38               "minf"
#define NAND_PART_NAME_39               "bedat"
#define NAND_PART_NAME_40               "upgrade"
#define NAND_PART_NAME_41               "misc"
#define NAND_PART_NAME_42               "recovery"
#define NAND_PART_NAME_43               "system"
#define NAND_PART_NAME_44               "userdata"
#define NAND_PART_NAME_45               "cache"
#define NAND_PART_NAME_46               "sdcard"
#define NAND_PART_NAME_47               "udt"
#define NAND_PART_NAME_48               "arib_nvram"
#define NAND_PART_NAME_49               "sapost"
#define NAND_PART_NAME_50               "data_demo"
#define NAND_PART_NAME_51               "version"
#define NAND_PART_NAME_52               "oops"
#define NAND_PART_NAME_53               "spqd"
#define NAND_PART_NAME_54               "spqc"

#define NAND_PART_NAME_55               "reserved3"
#define NAND_PART_NAME_56               "reserved4"
#define NAND_PART_NAME_57               "reserved5"
#define NAND_PART_NAME_58               "reserved6"
#define NAND_PART_NAME_59               "reserved7"
#define NAND_PART_NAME_60               "reserved8"
#define NAND_PART_NAME_61               "reserved9"
#define NAND_PART_NAME_62               "reserved10"

#define NAND_PART_END                   (63)


    #ifdef ADSP_BIN_SUPPORT
        #define FLASH_ADSP_BIN_PARTITION                (23)
        #define FLASH_AARM_BIN_PARTITION                (49)
    #endif

#define NAND_FLASH_STATIC_LAST_PART_ID      (12)

#define NAND_FLASH_STATIC_PART_SIZE \
        ((NAND_PART_SIZE_0) + \
        (NAND_PART_SIZE_1) + (NAND_PART_SIZE_2) + (NAND_PART_SIZE_3) + \
        (NAND_PART_SIZE_4) + (NAND_PART_SIZE_5) + (NAND_PART_SIZE_6) + \
        (NAND_PART_SIZE_7) + (NAND_PART_SIZE_8) + (NAND_PART_SIZE_9) + \
        (NAND_PART_SIZE_10) + (NAND_PART_SIZE_11) + (NAND_PART_SIZE_12))

/*Flash PQ customization*/
#ifdef SUPPORT_FLASH_PQ
#define FLASH_PQ_USE_NAND_FLASH                 (1)
#define FLASH_PQ_BASE_PARTITION                 (8)

#ifndef DEMO_BOARD
/* customer */
#define SUPPORT_FLASH_PQ_ENABLE_QTY_SMART_PIC   (1)
#define SUPPORT_FLASH_PQ_ENABLE_GAMMA           (0)
#define SUPPORT_FLASH_PQ_ENABLE_QTY_MAX_MIN     (1)
#define SUPPORT_NVM_GAMMA                       (1)
#endif
#endif

#ifdef SUPPORT_FLASH_AQ
#define FLASH_AQ_BASE_PARTITION             (9)
#define FLASH_AQ_BASE_ADDRESS               (0)
#endif

/* Flash EDID */
#define HDMIEDID_NAND_FLASH_PART_ID         (19)
#define HDMIEDID_NAND_FLASH_OFFSET          (0)
#define HDMIEDID_NAND_FLASH_PART_SIZE       (NAND_FLASH_EDID_SIZE)
#define VGAEDID_NAND_FLASH_PART_ID          (19)
#define VGAEDID_NAND_FLASH_OFFSET           (0)
#define VGAEDID_NAND_FLASH_PART_SIZE        (NAND_FLASH_EDID_SIZE)

#define HDMI_BOSTON_FW_PART_ID         (50)

/* Flash HDCP */
#define HDCP_NAND_FLASH_PART_ID             (0)
#define HDCP_NAND_FLASH_OFFSET              (0)

//----------------------------------------------------------------------------
// End - Flash Partition configuration
//----------------------------------------------------------------------------

#endif /*FLASH_LAYOUT_H*/
