1 #ifndef UAPI_UFS_H_ 2 #define UAPI_UFS_H_ 3 4 #define MAX_QUERY_IDN 0x12 5 6 /* Flag idn for Query Requests*/ 7 enum flag_idn { 8 QUERY_FLAG_IDN_FDEVICEINIT = 0x01, 9 QUERY_FLAG_IDN_PERMANENT_WPE = 0x02, 10 QUERY_FLAG_IDN_PWR_ON_WPE = 0x03, 11 QUERY_FLAG_IDN_BKOPS_EN = 0x04, 12 QUERY_FLAG_IDN_RESERVED1 = 0x05, 13 QUERY_FLAG_IDN_PURGE_ENABLE = 0x06, 14 QUERY_FLAG_IDN_RESERVED2 = 0x07, 15 QUERY_FLAG_IDN_FPHYRESOURCEREMOVAL = 0x08, 16 QUERY_FLAG_IDN_BUSY_RTC = 0x09, 17 }; 18 19 /* Attribute idn for Query requests */ 20 enum attr_idn { 21 QUERY_ATTR_IDN_BOOT_LU_EN = 0x00, 22 QUERY_ATTR_IDN_RESERVED = 0x01, 23 QUERY_ATTR_IDN_POWER_MODE = 0x02, 24 QUERY_ATTR_IDN_ACTIVE_ICC_LVL = 0x03, 25 QUERY_ATTR_IDN_OOO_DATA_EN = 0x04, 26 QUERY_ATTR_IDN_BKOPS_STATUS = 0x05, 27 QUERY_ATTR_IDN_PURGE_STATUS = 0x06, 28 QUERY_ATTR_IDN_MAX_DATA_IN = 0x07, 29 QUERY_ATTR_IDN_MAX_DATA_OUT = 0x08, 30 QUERY_ATTR_IDN_DYN_CAP_NEEDED = 0x09, 31 QUERY_ATTR_IDN_REF_CLK_FREQ = 0x0A, 32 QUERY_ATTR_IDN_CONF_DESC_LOCK = 0x0B, 33 QUERY_ATTR_IDN_MAX_NUM_OF_RTT = 0x0C, 34 QUERY_ATTR_IDN_EE_CONTROL = 0x0D, 35 QUERY_ATTR_IDN_EE_STATUS = 0x0E, 36 QUERY_ATTR_IDN_SECONDS_PASSED = 0x0F, 37 QUERY_ATTR_IDN_CNTX_CONF = 0x10, 38 QUERY_ATTR_IDN_CORR_PRG_BLK_NUM = 0x11, 39 }; 40 41 #define QUERY_ATTR_IDN_BOOT_LU_EN_MAX 0x02 42 43 /* Descriptor idn for Query requests */ 44 enum desc_idn { 45 QUERY_DESC_IDN_DEVICE = 0x0, 46 QUERY_DESC_IDN_CONFIGURAION = 0x1, 47 QUERY_DESC_IDN_UNIT = 0x2, 48 QUERY_DESC_IDN_RFU_0 = 0x3, 49 QUERY_DESC_IDN_INTERCONNECT = 0x4, 50 QUERY_DESC_IDN_STRING = 0x5, 51 QUERY_DESC_IDN_RFU_1 = 0x6, 52 QUERY_DESC_IDN_GEOMETRY = 0x7, 53 QUERY_DESC_IDN_POWER = 0x8, 54 QUERY_DESC_IDN_RFU_2 = 0x9, 55 QUERY_DESC_IDN_MAX, 56 }; 57 58 /* UTP QUERY Transaction Specific Fields OpCode */ 59 enum query_opcode { 60 UPIU_QUERY_OPCODE_NOP = 0x0, 61 UPIU_QUERY_OPCODE_READ_DESC = 0x1, 62 UPIU_QUERY_OPCODE_WRITE_DESC = 0x2, 63 UPIU_QUERY_OPCODE_READ_ATTR = 0x3, 64 UPIU_QUERY_OPCODE_WRITE_ATTR = 0x4, 65 UPIU_QUERY_OPCODE_READ_FLAG = 0x5, 66 UPIU_QUERY_OPCODE_SET_FLAG = 0x6, 67 UPIU_QUERY_OPCODE_CLEAR_FLAG = 0x7, 68 UPIU_QUERY_OPCODE_TOGGLE_FLAG = 0x8, 69 UPIU_QUERY_OPCODE_MAX, 70 }; 71 #endif /* UAPI_UFS_H_ */ 72