/*
**	include/configs/product_cfg.h
@@	By TengFei, 13/06/20
*/

#ifndef	__TP_PRODUCT_H
#define	__TP_PRODUCT_H

/*
**	The following Macros define ART data(used for WLAN calibration) writable feature.
**
**	If FLASH size equals 4M, PRODUCT_FLASH_ART_OFFSET should equal 0x3f0000,
**	else if FLASH size equals 8M, PRODUCT_FLASH_ART_OFFSET should equals 0x7f0000.
**
**	used in rt2880.h by Macro "CFG_ARTDATA_ADDR".
*/
#define	PRODUCT_WR_ARTDATA_SPT
#define	PRODUCT_FLASH_KERN_SIZE			0x10000
#define	PRODUCT_FLASH_ART_SIZE			0x10000
#define	PRODUCT_FLASH_ROOTFS_OFFSET		0x120000
#if defined (FLASH_SIZE_4M)
	#define	PRODUCT_FLASH_UC_OFFSET		0x3e0000
	#define	PRODUCT_FLASH_ART_OFFSET	0x3f0000
#elif defined (FLASH_SIZE_8M)
	#define	PRODUCT_FLASH_UC_OFFSET		0x7e0000
	#define	PRODUCT_FLASH_ART_OFFSET	0x7f0000
#else
	#define	PRODUCT_FLASH_UC_OFFSET		0x7e0000
	#define	PRODUCT_FLASH_ART_OFFSET	0x7f0000
	#error not present
#endif


/*
**	Products dependency relations
*/
#if defined (PRODUCT_WR810N_EU) || defined (PRODUCT_WR810N_US)
	#define	PRODUCT_WR810N
#endif

/*
**	The following Macros define TP GPIO features.
**
**	used in gpio_led.c && gpio_led.h
*/
#define	PRODUCT_GPIO_FEATURE
#if defined (PRODUCT_RE210)
	#define	PRODUCT_GPIO_RE210 
#else
	#error not present
#endif


/*
**	The following Macros define Prefix of product image name for fw recovery feature.
**
**	used in do_fw_recovery()/board.c
*/
#ifdef	FW_RECOVERY
#if defined (PRODUCT_RE210)
	#define	FW_IMG_PREFIX		"re210v1"  
#else
	#error not present
#endif	
#endif	/* FW_RECOVERY */


/*
**	The following Macros related about cpu freq.
**
**	0x00070a0a	-->		580 MHz
**	0x00070a07	-->		580 * (0x07/0x0a) MHz
**	0x00070a05	-->		580 * (0x05/0x0a) MHz
**	etc..
**
**	used to adjust CPU frequnce for power-saving in board.c
*/
#define	PRODUCT_NOR_CPU_FREQ_VAR		0x00070a0a
#define	PRODUCT_ACTUAL_CPU_FREQ			0x00070a0a


/*
**	Only when actual cpu freq we used is not equal with nomal freq, 
**	define PRODUCT_RESET_CPU_FREQ
*/
#if (PRODUCT_ACTUAL_CPU_FREQ != PRODUCT_NOR_CPU_FREQ_VAR)
	#define	PRODUCT_RESET_CPU_FREQ
#endif

#endif	/* __TP_PRODUCT_H */

