blob: c54d6ad162d2938a32de31938428cab3b545f69d [file] [log] [blame]
Harald Welte9e38c652016-01-12 23:53:52 +01001#ifndef LG_DIAGCMD_H
2#define LG_DIAGCMD_H
3/*
4This file comes from vendor/qcom-proprietary/diag/src/diagcmd.h
5Don't change previous defines and add new id at the end
6*/
7
8/*--------------------------------------------------------------------------
9
10 Command Codes between the Diagnostic Monitor and the mobile. Packets
11 travelling in each direction are defined here, while the packet templates
12 for requests and responses are distinct. Note that the same packet id
13 value can be used for both a request and a response. These values
14 are used to index a dispatch table in diag.c, so
15
16 DON'T CHANGE THE NUMBERS ( REPLACE UNUSED IDS WITH FILLERS ). NEW IDs
17 MUST BE ASSIGNED AT THE END.
18
19----------------------------------------------------------------------------*/
20
21/* Version Number Request/Response */
22#define DIAG_VERNO_F 0
23
24/* Mobile Station ESN Request/Response */
25#define DIAG_ESN_F 1
26
27/* Peek byte Request/Response */
28#define DIAG_PEEKB_F 2
29
30/* Peek word Request/Response */
31#define DIAG_PEEKW_F 3
32
33/* Peek dword Request/Response */
34#define DIAG_PEEKD_F 4
35
36/* Poke byte Request/Response */
37#define DIAG_POKEB_F 5
38
39/* Poke word Request/Response */
40#define DIAG_POKEW_F 6
41
42/* Poke dword Request/Response */
43#define DIAG_POKED_F 7
44
45/* Byte output Request/Response */
46#define DIAG_OUTP_F 8
47
48/* Word output Request/Response */
49#define DIAG_OUTPW_F 9
50
51/* Byte input Request/Response */
52#define DIAG_INP_F 10
53
54/* Word input Request/Response */
55#define DIAG_INPW_F 11
56
57/* DMSS status Request/Response */
58#define DIAG_STATUS_F 12
59
60/* 13-14 Reserved */
61
62/* Set logging mask Request/Response */
63#define DIAG_LOGMASK_F 15
64
65/* Log packet Request/Response */
66#define DIAG_LOG_F 16
67
68/* Peek at NV memory Request/Response */
69#define DIAG_NV_PEEK_F 17
70
71/* Poke at NV memory Request/Response */
72#define DIAG_NV_POKE_F 18
73
74/* Invalid Command Response */
75#define DIAG_BAD_CMD_F 19
76
77/* Invalid parmaeter Response */
78#define DIAG_BAD_PARM_F 20
79
80/* Invalid packet length Response */
81#define DIAG_BAD_LEN_F 21
82
83/* 22-23 Reserved */
84
85/* Packet not allowed in this mode
86 ( online vs offline ) */
87#define DIAG_BAD_MODE_F 24
88
89/* info for TA power and voice graphs */
90#define DIAG_TAGRAPH_F 25
91
92/* Markov statistics */
93#define DIAG_MARKOV_F 26
94
95/* Reset of Markov statistics */
96#define DIAG_MARKOV_RESET_F 27
97
98/* Return diag version for comparison to
99 detect incompatabilities */
100#define DIAG_DIAG_VER_F 28
101
102/* Return a timestamp */
103#define DIAG_TS_F 29
104
105/* Set TA parameters */
106#define DIAG_TA_PARM_F 30
107
108/* Request for msg report */
109#define DIAG_MSG_F 31
110
111/* Handset Emulation -- keypress */
112#define DIAG_HS_KEY_F 32
113
114/* Handset Emulation -- lock or unlock */
115#define DIAG_HS_LOCK_F 33
116
117/* Handset Emulation -- display request */
118#define DIAG_HS_SCREEN_F 34
119
120/* 35 Reserved */
121
122/* Parameter Download */
123#define DIAG_PARM_SET_F 36
124
125/* 37 Reserved */
126
127/* Read NV item */
128#define DIAG_NV_READ_F 38
129/* Write NV item */
130#define DIAG_NV_WRITE_F 39
131/* 40 Reserved */
132
133/* Mode change request */
134#define DIAG_CONTROL_F 41
135
136/* Error record retreival */
137#define DIAG_ERR_READ_F 42
138
139/* Error record clear */
140#define DIAG_ERR_CLEAR_F 43
141
142/* Symbol error rate counter reset */
143#define DIAG_SER_RESET_F 44
144
145/* Symbol error rate counter report */
146#define DIAG_SER_REPORT_F 45
147
148/* Run a specified test */
149#define DIAG_TEST_F 46
150
151/* Retreive the current dip switch setting */
152#define DIAG_GET_DIPSW_F 47
153
154/* Write new dip switch setting */
155#define DIAG_SET_DIPSW_F 48
156
157/* Start/Stop Vocoder PCM loopback */
158#define DIAG_VOC_PCM_LB_F 49
159
160/* Start/Stop Vocoder PKT loopback */
161#define DIAG_VOC_PKT_LB_F 50
162
163/* 51-52 Reserved */
164
165/* Originate a call */
166#define DIAG_ORIG_F 53
167/* End a call */
168#define DIAG_END_F 54
169/* 55-57 Reserved */
170
171/* Switch to downloader */
172#define DIAG_DLOAD_F 58
173/* Test Mode Commands and FTM commands */
174#define DIAG_TMOB_F 59
175/* Test Mode Commands and FTM commands */
176#define DIAG_FTM_CMD_F 59
177/* 60-62 Reserved */
178
179#ifdef FEATURE_HWTC
180#define DIAG_TEST_STATE_F 61
181#endif /* FEATURE_HWTC */
182
183/* Return the current state of the phone */
184#define DIAG_STATE_F 63
185
186/* Return all current sets of pilots */
187#define DIAG_PILOT_SETS_F 64
188
189/* Send the Service Prog. Code to allow SP */
190#define DIAG_SPC_F 65
191
192/* Invalid nv_read/write because SP is locked */
193#define DIAG_BAD_SPC_MODE_F 66
194
195/* get parms obsoletes PARM_GET */
196#define DIAG_PARM_GET2_F 67
197
198/* Serial mode change Request/Response */
199#define DIAG_SERIAL_CHG_F 68
200
201/* 69 Reserved */
202
203/* Send password to unlock secure operations
204 the phone to be in a security state that
205 is wasn't - like unlocked. */
206#define DIAG_PASSWORD_F 70
207
208/* An operation was attempted which required */
209#define DIAG_BAD_SEC_MODE_F 71
210
211/* Write Preferred Roaming list to the phone. */
212#define DIAG_PR_LIST_WR_F 72
213
214/* Read Preferred Roaming list from the phone.*/
215#define DIAG_PR_LIST_RD_F 73
216
217/* 74 Reserved */
218
219/* Subssytem dispatcher (extended diag cmd) */
220#define DIAG_SUBSYS_CMD_F 75
221
222/* 76-80 Reserved */
223
224/* Asks the phone what it supports */
225#define DIAG_FEATURE_QUERY_F 81
226
227/* 82 Reserved */
228
229/* Read SMS message out of NV */
230#define DIAG_SMS_READ_F 83
231
232/* Write SMS message into NV */
233#define DIAG_SMS_WRITE_F 84
234
235/* info for Frame Error Rate
236 on multiple channels */
237#define DIAG_SUP_FER_F 85
238
239/* Supplemental channel walsh codes */
240#define DIAG_SUP_WALSH_CODES_F 86
241
242/* Sets the maximum # supplemental
243 channels */
244#define DIAG_SET_MAX_SUP_CH_F 87
245
246/* get parms including SUPP and MUX2:
247 obsoletes PARM_GET and PARM_GET_2 */
248#define DIAG_PARM_GET_IS95B_F 88
249
250/* Performs an Embedded File System
251 (EFS) operation. */
252#define DIAG_FS_OP_F 89
253
254/* AKEY Verification. */
255#define DIAG_AKEY_VERIFY_F 90
256
257/* Handset emulation - Bitmap screen */
258#define DIAG_BMP_HS_SCREEN_F 91
259
260/* Configure communications */
261#define DIAG_CONFIG_COMM_F 92
262
263/* Extended logmask for > 32 bits. */
264#define DIAG_EXT_LOGMASK_F 93
265
266/* 94-95 reserved */
267
268/* Static Event reporting. */
269#define DIAG_EVENT_REPORT_F 96
270
271/* Load balancing and more! */
272#define DIAG_STREAMING_CONFIG_F 97
273
274/* Parameter retrieval */
275#define DIAG_PARM_RETRIEVE_F 98
276
277 /* A state/status snapshot of the DMSS. */
278#define DIAG_STATUS_SNAPSHOT_F 99
279
280/* Used for RPC */
281#define DIAG_RPC_F 100
282
283/* Get_property requests */
284#define DIAG_GET_PROPERTY_F 101
285
286/* Put_property requests */
287#define DIAG_PUT_PROPERTY_F 102
288
289/* Get_guid requests */
290#define DIAG_GET_GUID_F 103
291
292/* Invocation of user callbacks */
293#define DIAG_USER_CMD_F 104
294
295/* Get permanent properties */
296#define DIAG_GET_PERM_PROPERTY_F 105
297
298/* Put permanent properties */
299#define DIAG_PUT_PERM_PROPERTY_F 106
300
301/* Permanent user callbacks */
302#define DIAG_PERM_USER_CMD_F 107
303
304/* GPS Session Control */
305#define DIAG_GPS_SESS_CTRL_F 108
306
307/* GPS search grid */
308#define DIAG_GPS_GRID_F 109
309
310/* GPS Statistics */
311#define DIAG_GPS_STATISTICS_F 110
312
313/* Packet routing for multiple instances of diag */
314#define DIAG_ROUTE_F 111
315
316/* IS2000 status */
317#define DIAG_IS2000_STATUS_F 112
318
319/* RLP statistics reset */
320#define DIAG_RLP_STAT_RESET_F 113
321
322/* (S)TDSO statistics reset */
323#define DIAG_TDSO_STAT_RESET_F 114
324
325/* Logging configuration packet */
326#define DIAG_LOG_CONFIG_F 115
327
328/* Static Trace Event reporting */
329#define DIAG_TRACE_EVENT_REPORT_F 116
330
331/* SBI Read */
332#define DIAG_SBI_READ_F 117
333
334/* SBI Write */
335#define DIAG_SBI_WRITE_F 118
336
337/* SSD Verify */
338#define DIAG_SSD_VERIFY_F 119
339
340/* Log on Request */
341#define DIAG_LOG_ON_DEMAND_F 120
342
343/* Request for extended msg report */
344#define DIAG_EXT_MSG_F 121
345
346/* ONCRPC diag packet */
347#define DIAG_ONCRPC_F 122
348
349/* Diagnostics protocol loopback. */
350#define DIAG_PROTOCOL_LOOPBACK_F 123
351
352/* Extended build ID text */
353#define DIAG_EXT_BUILD_ID_F 124
354
355/* Request for extended msg report */
356#define DIAG_EXT_MSG_CONFIG_F 125
357
358/* Extended messages in terse format */
359#define DIAG_EXT_MSG_TERSE_F 126
360
361/* Translate terse format message identifier */
362#define DIAG_EXT_MSG_TERSE_XLATE_F 127
363
364/* Subssytem dispatcher Version 2 (delayed response capable) */
365#define DIAG_SUBSYS_CMD_VER_2_F 128
366
367/* Get the event mask */
368#define DIAG_EVENT_MASK_GET_F 129
369
370/* Set the event mask */
371#define DIAG_EVENT_MASK_SET_F 130
372
373/* RESERVED CODES: 131-139 */
374
375/* Command Code for Changing Port Settings */
376#define DIAG_CHANGE_PORT_SETTINGS 140
377
378/* Country network information for assisted dialing */
379#define DIAG_CNTRY_INFO_F 141
380
381/* Send a Supplementary Service Request */
382#define DIAG_SUPS_REQ_F 142
383
384/* Originate SMS request for MMS */
385#define DIAG_MMS_ORIG_SMS_REQUEST_F 143
386
387/* Change measurement mode*/
388#define DIAG_MEAS_MODE_F 144
389
390/* Request measurements for HDR channels */
391#define DIAG_MEAS_REQ_F 145
392
393/* Send Optimized F3 messages */
394#define DIAG_QSR_EXT_MSG_TERSE_F 146
395
396/* LGE_CHANGES_S [minjong.gong@lge.com] 2010-06-11, LG_FW_DIAG_SCREEN_CAPTURE */
397#define DIAG_LGF_SCREEN_SHOT_F 150
398/* LGE_CHANGES_E [minjong.gong@lge.com] 2010-06-11, LG_FW_DIAG_SCREEN_CAPTURE */
399/* LGE_CHANGE_S [jihoon.lee@lge.com] 2010-02-07, LG_FW_MTC */
400#if 1 //def LG_FW_MTC // defined (CONFIG_MACH_MSM7X27_THUNDERC) || defined (LG_FW_MTC)
401#define DIAG_MTC_F 240
402#endif /*LG_FW_MTC*/
403/* LGE_CHANGE_E [jihoon.lee@lge.com] 2010-02-07, LG_FW_MTC */
404
405/* Number of packets defined. */
406#ifdef CONFIG_LGE_DIAG_WMC
407#define DIAG_WMCSYNC_MAPPING_F 241
408#endif
409
410// LG_FW : 2011.07.07 moon.yongho : saving webdload status variable to eMMC. ----------[[
411#define DIAG_WEBDLOAD_COMMON_F 239 /*==> 0xef*/
412// LG_FW : 2011.07.07 moon.yongho -------------------------------------------]]
413#define DIAG_WIFI_MAC_ADDR 214
414#ifdef CONFIG_LGE_DLOAD_SRD
415#define DIAG_USET_DATA_BACKUP 249
416#endif
417
418/* Number of packets defined. */
419#define DIAG_TEST_MODE_F 250
420
421#define DIAG_SMS_TEST_F 220
422/* LGE_MERGE_S [sunmyoung.lee@lge.com] 2010-07-16. SMS UTS Test */
423#if 1 //defined (CONFIG_MACH_MSM7X27_THUNDERC) || defined (LG_FW_UDM)
424#define DIAG_UDM_SMS_MODE 252
425#endif
426/* LGE_MERGE_E [sunmyoung.lee@lge.com] 2010-07-16. SMS UTS Test */
427
428#define DIAG_LCD_Q_TEST_F 253
429#define DIAG_ERI_CMD_F 254
430
431#define DIAG_MAX_F 255
432
433typedef enum {
434 DIAG_SUBSYS_OEM = 0, /* Reserved for OEM use */
435 DIAG_SUBSYS_ZREX = 1, /* ZREX */
436 DIAG_SUBSYS_SD = 2, /* System Determination */
437 DIAG_SUBSYS_BT = 3, /* Bluetooth */
438 DIAG_SUBSYS_WCDMA = 4, /* WCDMA */
439 DIAG_SUBSYS_HDR = 5, /* 1xEvDO */
440 DIAG_SUBSYS_DIABLO = 6, /* DIABLO */
441 DIAG_SUBSYS_TREX = 7, /* TREX - Off-target testing environments */
442 DIAG_SUBSYS_GSM = 8, /* GSM */
443 DIAG_SUBSYS_UMTS = 9, /* UMTS */
444 DIAG_SUBSYS_HWTC = 10, /* HWTC */
445 DIAG_SUBSYS_FTM = 11, /* Factory Test Mode */
446 DIAG_SUBSYS_REX = 12, /* Rex */
447 DIAG_SUBSYS_OS = DIAG_SUBSYS_REX,
448 DIAG_SUBSYS_GPS = 13, /* Global Positioning System */
449 DIAG_SUBSYS_WMS = 14, /* Wireless Messaging Service (WMS, SMS) */
450 DIAG_SUBSYS_CM = 15, /* Call Manager */
451 DIAG_SUBSYS_HS = 16, /* Handset */
452 DIAG_SUBSYS_AUDIO_SETTINGS = 17, /* Audio Settings */
453 DIAG_SUBSYS_DIAG_SERV = 18, /* DIAG Services */
454 DIAG_SUBSYS_FS = 19, /* File System - EFS2 */
455 DIAG_SUBSYS_PORT_MAP_SETTINGS = 20, /* Port Map Settings */
456 DIAG_SUBSYS_MEDIAPLAYER = 21, /* QCT Mediaplayer */
457 DIAG_SUBSYS_QCAMERA = 22, /* QCT QCamera */
458 DIAG_SUBSYS_MOBIMON = 23, /* QCT MobiMon */
459 DIAG_SUBSYS_GUNIMON = 24, /* QCT GuniMon */
460 DIAG_SUBSYS_LSM = 25, /* Location Services Manager */
461 DIAG_SUBSYS_QCAMCORDER = 26, /* QCT QCamcorder */
462 DIAG_SUBSYS_MUX1X = 27, /* Multiplexer */
463 DIAG_SUBSYS_DATA1X = 28, /* Data */
464 DIAG_SUBSYS_SRCH1X = 29, /* Searcher */
465 DIAG_SUBSYS_CALLP1X = 30, /* Call Processor */
466 DIAG_SUBSYS_APPS = 31, /* Applications */
467 DIAG_SUBSYS_SETTINGS = 32, /* Settings */
468 DIAG_SUBSYS_GSDI = 33, /* Generic SIM Driver Interface */
469 DIAG_SUBSYS_UIMDIAG = DIAG_SUBSYS_GSDI,
470 DIAG_SUBSYS_TMC = 34, /* Task Main Controller */
471 DIAG_SUBSYS_USB = 35, /* Universal Serial Bus */
472 DIAG_SUBSYS_PM = 36, /* Power Management */
473 DIAG_SUBSYS_DEBUG = 37,
474 DIAG_SUBSYS_QTV = 38,
475 DIAG_SUBSYS_CLKRGM = 39, /* Clock Regime */
476 DIAG_SUBSYS_DEVICES = 40,
477 DIAG_SUBSYS_WLAN = 41, /* 802.11 Technology */
478 DIAG_SUBSYS_PS_DATA_LOGGING = 42, /* Data Path Logging */
479 DIAG_SUBSYS_PS = DIAG_SUBSYS_PS_DATA_LOGGING,
480 DIAG_SUBSYS_MFLO = 43, /* MediaFLO */
481 DIAG_SUBSYS_DTV = 44, /* Digital TV */
482 DIAG_SUBSYS_RRC = 45, /* WCDMA Radio Resource Control state */
483 DIAG_SUBSYS_PROF = 46, /* Miscellaneous Profiling Related */
484 DIAG_SUBSYS_TCXOMGR = 47,
485 DIAG_SUBSYS_NV = 48, /* Non Volatile Memory */
486 DIAG_SUBSYS_AUTOCONFIG = 49,
487 DIAG_SUBSYS_PARAMS = 50, /* Parameters required for debugging subsystems */
488 DIAG_SUBSYS_MDDI = 51, /* Mobile Display Digital Interface */
489 DIAG_SUBSYS_DS_ATCOP = 52,
490 DIAG_SUBSYS_L4LINUX = 53, /* L4/Linux */
491 DIAG_SUBSYS_MVS = 54, /* Multimode Voice Services */
492 DIAG_SUBSYS_CNV = 55, /* Compact NV */
493 DIAG_SUBSYS_APIONE_PROGRAM = 56, /* apiOne */
494 DIAG_SUBSYS_HIT = 57, /* Hardware Integration Test */
495 DIAG_SUBSYS_DRM = 58, /* Digital Rights Management */
496 DIAG_SUBSYS_DM = 59, /* Device Management */
497 DIAG_SUBSYS_FC = 60, /* Flow Controller */
498 DIAG_SUBSYS_MEMORY = 61, /* Malloc Manager */
499 DIAG_SUBSYS_FS_ALTERNATE = 62, /* Alternate File System */
500 DIAG_SUBSYS_REGRESSION = 63, /* Regression Test Commands */
501 DIAG_SUBSYS_SENSORS = 64, /* The sensors subsystem */
502 DIAG_SUBSYS_FLUTE = 65, /* FLUTE */
503 DIAG_SUBSYS_ANALOG = 66, /* Analog die subsystem */
504 DIAG_SUBSYS_APIONE_PROGRAM_MODEM = 67, /* apiOne Program On Modem Processor */
505 DIAG_SUBSYS_LTE = 68, /* LTE */
506 DIAG_SUBSYS_BREW = 69, /* BREW */
507 DIAG_SUBSYS_PWRDB = 70, /* Power Debug Tool */
508 DIAG_SUBSYS_CHORD = 71, /* Chaos Coordinator */
509 DIAG_SUBSYS_SEC = 72, /* Security */
510 DIAG_SUBSYS_TIME = 73, /* Time Services */
511 DIAG_SUBSYS_Q6_CORE = 74, /* Q6 core services */
512
513 DIAG_SUBSYS_LAST,
514
515 /* Subsystem IDs reserved for OEM use */
516 DIAG_SUBSYS_RESERVED_OEM_0 = 250,
517 DIAG_SUBSYS_RESERVED_OEM_1 = 251,
518 DIAG_SUBSYS_RESERVED_OEM_2 = 252,
519 DIAG_SUBSYS_RESERVED_OEM_3 = 253,
520 DIAG_SUBSYS_RESERVED_OEM_4 = 254,
521 DIAG_SUBSYS_LEGACY = 255
522} diagpkt_subsys_cmd_enum_type;
523
524#define LG_DIAG_CMD_LINE_LEN 256
525
526struct lg_diag_cmd_dev {
527 char *name;
528 struct device *dev;
529 int index;
530 int state;
531};
532#endif /* LG_DIAGCMD_H */