Dhanalakshmi Siddani | 01e94a3 | 2020-02-04 22:16:05 +0530 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2014 NXP Semiconductors, All Rights Reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | typedef struct TfaBfName { |
| 11 | unsigned short bfEnum; |
| 12 | char *bfName; |
| 13 | } tfaBfName_t; |
| 14 | |
| 15 | typedef struct TfaIrqName { |
| 16 | unsigned short irqEnum; |
| 17 | char *irqName; |
| 18 | } tfaIrqName_t; |
| 19 | |
| 20 | #include "tfa1_tfafieldnames.h" |
| 21 | #include "tfa2_tfafieldnames_N1C.h" |
| 22 | /* diffs for specific devices */ |
| 23 | #include "tfa9887_tfafieldnames.h" |
| 24 | #include "tfa9890_tfafieldnames.h" |
| 25 | #include "tfa9891_tfafieldnames.h" |
| 26 | #include "tfa9872_tfafieldnames.h" |
| 27 | #include "tfa9912_tfafieldnames.h" |
| 28 | #include "tfa9896_tfafieldnames.h" |
| 29 | #include "tfa9874_tfafieldnames.h" |
| 30 | #include "tfa9878_tfafieldnames.h" |
| 31 | #include "tfa9894_tfafieldnames.h" |
| 32 | #include "tfa9894_tfafieldnames_N2.h" |
| 33 | |
| 34 | /* missing 'common' defs break the build but unused in TFA1 context */ |
| 35 | #define TFA1_BF_AMPINSEL -1 |
| 36 | #define TFA1_BF_MANSCONF -1 |
| 37 | #define TFA1_BF_MANCOLD -1 |
| 38 | #define TFA1_BF_INTSMUTE -1 |
| 39 | #define TFA1_BF_CFSMR -1 |
| 40 | #define TFA1_BF_CFSML -1 |
| 41 | #define TFA1_BF_DCMCCAPI -1 |
| 42 | #define TFA1_BF_DCMCCSB -1 |
| 43 | #define TFA1_BF_USERDEF -1 |
| 44 | #define TFA1_BF_MANSTATE -1 |
| 45 | #define TFA1_BF_MANOPER -1 |
| 46 | #define TFA1_BF_REFCKSEL -1 |
| 47 | #define TFA1_BF_VOLSEC -1 |
| 48 | #define TFA1_BF_FRACTDEL -1 |
| 49 | #define TFA1_BF_ACKDMG -1 |
| 50 | #define TFA1_BF_SSRIGHTE -1 |
| 51 | #define TFA1_BF_SSLEFTE -1 |
| 52 | #define TFA1_BF_R25CL -1 |
| 53 | #define TFA1_BF_R25CR -1 |
| 54 | #define TFA1_BF_SWPROFIL 0x8045 /*!< profile save */ |
| 55 | #define TFA1_BF_SWVSTEP 0x80a5 /*!< vstep save */ |
| 56 | |
| 57 | /* missing 'common' defs break the build */ |
| 58 | #define TFA2_BF_CFSM -1 |
| 59 | |
| 60 | |
| 61 | /* MTP access uses registers |
| 62 | * defs are derived from corresponding bitfield names as used in the BF macros |
| 63 | */ |
| 64 | #define MTPKEY2 MTPK /* unlock key2 MTPK */ |
| 65 | #define MTP0 MTPOTC /* MTP data */ |
| 66 | #define MTP_CONTROL CIMTP /* copy i2c to mtp */ |
| 67 | |
| 68 | /* interrupt enable register uses HW name in TFA2 */ |
| 69 | #define TFA2_BF_INTENVDDS TFA2_BF_IEVDDS |
| 70 | |
| 71 | |
| 72 | /* TFA9891 specific bit field names */ |
| 73 | #define TFA1_BF_SAAMGAIN 0x2202 |
| 74 | #define TFA2_BF_SAAMGAIN -1 |
| 75 | |
| 76 | /* TFA9872 specific bit field names */ |
| 77 | #define TFA2_BF_IELP0 TFA9872_BF_IELP0 |
| 78 | #define TFA2_BF_ISTLP0 TFA9872_BF_ISTLP0 |
| 79 | #define TFA2_BF_IPOLP0 TFA9872_BF_IPOLP0 |
| 80 | #define TFA2_BF_IELP1 TFA9872_BF_IELP1 |
| 81 | #define TFA2_BF_ISTLP1 TFA9872_BF_ISTLP1 |
| 82 | #define TFA2_BF_IPOLP1 TFA9872_BF_IPOLP1 |
| 83 | #define TFA2_BF_LP0 TFA9872_BF_LP0 |
| 84 | #define TFA2_BF_LP1 TFA9872_BF_LP1 |
| 85 | #define TFA2_BF_R25C TFA9872_BF_R25C |
| 86 | #define TFA2_BF_SAMMODE TFA9872_BF_SAMMODE |
| 87 | |
| 88 | /* interrupt bit field names of TFA2 and TFA1 do not match */ |
| 89 | #define TFA1_BF_IEACS TFA1_BF_INTENACS |
| 90 | #define TFA1_BF_IPOACS TFA1_BF_INTPOLACS |
| 91 | #define TFA1_BF_ISTACS TFA1_BF_INTOACS |
| 92 | #define TFA1_BF_ISTVDDS TFA1_BF_INTOVDDS |
| 93 | #define TFA1_BF_ICLVDDS TFA1_BF_INTIVDDS |
| 94 | #define TFA1_BF_IPOVDDS TFA1_BF_INTPOLVDDS |
| 95 | #define TFA1_BF_IENOCLK TFA1_BF_INTENNOCLK |
| 96 | #define TFA1_BF_ISTNOCLK TFA1_BF_INTONOCLK |
| 97 | #define TFA1_BF_IPONOCLK TFA1_BF_INTPOLNOCLK |
| 98 | |
| 99 | /* interrupt bit fields not available on TFA1 */ |
| 100 | #define TFA1_BF_IECLKOOR -1 |
| 101 | #define TFA1_BF_ISTCLKOOR -1 |
| 102 | #define TFA1_BF_IEMWSRC -1 |
| 103 | #define TFA1_BF_ISTMWSRC -1 |
| 104 | #define TFA1_BF_IPOMWSRC -1 |
| 105 | #define TFA1_BF_IEMWSMU -1 |
| 106 | #define TFA1_BF_ISTMWSMU -1 |
| 107 | #define TFA1_BF_IPOMWSMU -1 |
| 108 | #define TFA1_BF_IEMWCFC -1 |
| 109 | #define TFA1_BF_ISTMWCFC -1 |
| 110 | #define TFA1_BF_IPOMWCFC -1 |
| 111 | #define TFA1_BF_CLKOOR -1 |
| 112 | #define TFA1_BF_MANWAIT1 -1 |
| 113 | #define TFA1_BF_MANWAIT2 -1 |
| 114 | #define TFA1_BF_MANMUTE -1 |
| 115 | #define TFA1_BF_IPCLKOOR -1 |
| 116 | #define TFA1_BF_ICLCLKOOR -1 |
| 117 | #define TFA1_BF_IPOSWS -1 |
| 118 | #define TFA1_BF_IESWS -1 |
| 119 | #define TFA1_BF_ISTSWS -1 |
| 120 | #define TFA1_BF_IESPKS -1 |
| 121 | #define TFA1_BF_ISTSPKS -1 |
| 122 | #define TFA1_BF_IPOSPKS -1 |
| 123 | #define TFA1_BF_IECLKS -1 |
| 124 | #define TFA1_BF_ISTCLKS -1 |
| 125 | #define TFA1_BF_IPOCLKS -1 |
| 126 | #define TFA1_BF_IEAMPS -1 |
| 127 | #define TFA1_BF_ISTAMPS -1 |
| 128 | #define TFA1_BF_IPOAMPS -1 |
| 129 | #define TFA1_BF_IELP0 -1 |
| 130 | #define TFA1_BF_ISTLP0 -1 |
| 131 | #define TFA1_BF_IPOLP0 -1 |
| 132 | #define TFA1_BF_IELP1 -1 |
| 133 | #define TFA1_BF_ISTLP1 -1 |
| 134 | #define TFA1_BF_IPOLP1 -1 |
| 135 | #define TFA1_BF_LP0 -1 |
| 136 | #define TFA1_BF_LP1 -1 |
| 137 | #define TFA1_BF_R25C -1 |
| 138 | #define TFA1_BF_SAMMODE -1 |
| 139 | |
| 140 | /* TDM STATUS fields not available on TFA1 */ |
| 141 | #define TFA1_BF_TDMLUTER -1 |
| 142 | #define TFA1_BF_TDMERR -1 |