aboutsummaryrefslogtreecommitdiff
path: root/include/linux/project_info.h
blob: 5b17f60a1900a2b9741c3c53207856bfdafbff1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef _PROJECT_INFO_H_
#define _PROJECT_INFO_H_ 1
typedef		__u32		uint32;
typedef     __u8        uint8;

/*******SECURE_BOOTn = 0x00786078+ 0x4*n, n=[1..14]******/
#define SECURE_BOOT_BASE		0x00786078
#define SECURE_BOOT1			(SECURE_BOOT_BASE + 0x4*1)
#define BUF_SIZE		64

extern uint32_t chip_serial_num;
extern unsigned long totalram_pages;


struct project_info {
	char project_name[8];
	uint32  hw_version;
	uint32  rf_v1;
	uint32  rf_v2;
	uint32  rf_v3;
	uint32  modem;
	uint32  operator;
	uint32  ddr_manufacture_info;
	uint32  ddr_row;
	uint32  ddr_column;
	uint32  ddr_fw_version;
	uint32  ddr_reserve_info;
	uint32  platform_id;
	uint32  ftm_uart_boot_mode;
	uint32  feature_id;
};

struct component_info {
	char *version;
	char *manufacture;
};

enum {
	HW_VERSION__UNKNOWN,
	HW_VERSION__11 = 11,
	HW_VERSION__12,
};

enum COMPONENT_TYPE {
	DDR,
	EMMC,
	F_CAMERA,
	R_CAMERA,
	SECOND_R_CAMERA,
	TP,
	LCD,
	WCN,
	I_SENSOR,
	G_SENSOR,
	M_SENSOR,
	GYRO,
	BACKLIGHT,
	MAINBOARD,
	/*Add new component here*/
	FINGERPRINTS,
	TOUCH_KEY,
	UFS,
	ABOARD,
	NFC,
	FAST_CHARGE,
	CPU,
	COMPONENT_MAX,
};


int push_component_info(enum COMPONENT_TYPE type,
	char *version, char *manufacture);
int reset_component_info(enum COMPONENT_TYPE type);
uint32 get_hw_version(void);


#endif