1*b843c749SSergey Zigachev /* 2*b843c749SSergey Zigachev * Copyright 2012-15 Advanced Micro Devices, Inc. 3*b843c749SSergey Zigachev * 4*b843c749SSergey Zigachev * Permission is hereby granted, free of charge, to any person obtaining a 5*b843c749SSergey Zigachev * copy of this software and associated documentation files (the "Software"), 6*b843c749SSergey Zigachev * to deal in the Software without restriction, including without limitation 7*b843c749SSergey Zigachev * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*b843c749SSergey Zigachev * and/or sell copies of the Software, and to permit persons to whom the 9*b843c749SSergey Zigachev * Software is furnished to do so, subject to the following conditions: 10*b843c749SSergey Zigachev * 11*b843c749SSergey Zigachev * The above copyright notice and this permission notice shall be included in 12*b843c749SSergey Zigachev * all copies or substantial portions of the Software. 13*b843c749SSergey Zigachev * 14*b843c749SSergey Zigachev * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*b843c749SSergey Zigachev * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*b843c749SSergey Zigachev * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*b843c749SSergey Zigachev * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*b843c749SSergey Zigachev * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*b843c749SSergey Zigachev * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*b843c749SSergey Zigachev * OTHER DEALINGS IN THE SOFTWARE. 21*b843c749SSergey Zigachev * 22*b843c749SSergey Zigachev * Authors: AMD 23*b843c749SSergey Zigachev * 24*b843c749SSergey Zigachev */ 25*b843c749SSergey Zigachev 26*b843c749SSergey Zigachev #ifndef __DAL_ASIC_ID_H__ 27*b843c749SSergey Zigachev #define __DAL_ASIC_ID_H__ 28*b843c749SSergey Zigachev 29*b843c749SSergey Zigachev /* 30*b843c749SSergey Zigachev * ASIC internal revision ID 31*b843c749SSergey Zigachev */ 32*b843c749SSergey Zigachev 33*b843c749SSergey Zigachev /* DCE80 (based on ci_id.h in Perforce) */ 34*b843c749SSergey Zigachev #define CI_BONAIRE_M_A0 0x14 35*b843c749SSergey Zigachev #define CI_BONAIRE_M_A1 0x15 36*b843c749SSergey Zigachev #define CI_HAWAII_P_A0 0x28 37*b843c749SSergey Zigachev 38*b843c749SSergey Zigachev #define CI_UNKNOWN 0xFF 39*b843c749SSergey Zigachev 40*b843c749SSergey Zigachev #define ASIC_REV_IS_BONAIRE_M(rev) \ 41*b843c749SSergey Zigachev ((rev >= CI_BONAIRE_M_A0) && (rev < CI_HAWAII_P_A0)) 42*b843c749SSergey Zigachev 43*b843c749SSergey Zigachev #define ASIC_REV_IS_HAWAII_P(rev) \ 44*b843c749SSergey Zigachev (rev >= CI_HAWAII_P_A0) 45*b843c749SSergey Zigachev 46*b843c749SSergey Zigachev /* KV1 with Spectre GFX core, 8-8-1-2 (CU-Pix-Primitive-RB) */ 47*b843c749SSergey Zigachev #define KV_SPECTRE_A0 0x01 48*b843c749SSergey Zigachev 49*b843c749SSergey Zigachev /* KV2 with Spooky GFX core, including downgraded from Spectre core, 50*b843c749SSergey Zigachev * 3-4-1-1 (CU-Pix-Primitive-RB) */ 51*b843c749SSergey Zigachev #define KV_SPOOKY_A0 0x41 52*b843c749SSergey Zigachev 53*b843c749SSergey Zigachev /* KB with Kalindi GFX core, 2-4-1-1 (CU-Pix-Primitive-RB) */ 54*b843c749SSergey Zigachev #define KB_KALINDI_A0 0x81 55*b843c749SSergey Zigachev 56*b843c749SSergey Zigachev /* KB with Kalindi GFX core, 2-4-1-1 (CU-Pix-Primitive-RB) */ 57*b843c749SSergey Zigachev #define KB_KALINDI_A1 0x82 58*b843c749SSergey Zigachev 59*b843c749SSergey Zigachev /* BV with Kalindi GFX core, 2-4-1-1 (CU-Pix-Primitive-RB) */ 60*b843c749SSergey Zigachev #define BV_KALINDI_A2 0x85 61*b843c749SSergey Zigachev 62*b843c749SSergey Zigachev /* ML with Godavari GFX core, 2-4-1-1 (CU-Pix-Primitive-RB) */ 63*b843c749SSergey Zigachev #define ML_GODAVARI_A0 0xA1 64*b843c749SSergey Zigachev 65*b843c749SSergey Zigachev /* ML with Godavari GFX core, 2-4-1-1 (CU-Pix-Primitive-RB) */ 66*b843c749SSergey Zigachev #define ML_GODAVARI_A1 0xA2 67*b843c749SSergey Zigachev 68*b843c749SSergey Zigachev #define KV_UNKNOWN 0xFF 69*b843c749SSergey Zigachev 70*b843c749SSergey Zigachev #define ASIC_REV_IS_KALINDI(rev) \ 71*b843c749SSergey Zigachev ((rev >= KB_KALINDI_A0) && (rev < KV_UNKNOWN)) 72*b843c749SSergey Zigachev 73*b843c749SSergey Zigachev #define ASIC_REV_IS_BHAVANI(rev) \ 74*b843c749SSergey Zigachev ((rev >= BV_KALINDI_A2) && (rev < ML_GODAVARI_A0)) 75*b843c749SSergey Zigachev 76*b843c749SSergey Zigachev #define ASIC_REV_IS_GODAVARI(rev) \ 77*b843c749SSergey Zigachev ((rev >= ML_GODAVARI_A0) && (rev < KV_UNKNOWN)) 78*b843c749SSergey Zigachev 79*b843c749SSergey Zigachev /* VI Family */ 80*b843c749SSergey Zigachev /* DCE10 */ 81*b843c749SSergey Zigachev #define VI_TONGA_P_A0 20 82*b843c749SSergey Zigachev #define VI_TONGA_P_A1 21 83*b843c749SSergey Zigachev #define VI_FIJI_P_A0 60 84*b843c749SSergey Zigachev 85*b843c749SSergey Zigachev /* DCE112 */ 86*b843c749SSergey Zigachev #define VI_POLARIS10_P_A0 80 87*b843c749SSergey Zigachev #define VI_POLARIS11_M_A0 90 88*b843c749SSergey Zigachev #define VI_POLARIS12_V_A0 100 89*b843c749SSergey Zigachev #define VI_VEGAM_A0 110 90*b843c749SSergey Zigachev 91*b843c749SSergey Zigachev #define VI_UNKNOWN 0xFF 92*b843c749SSergey Zigachev 93*b843c749SSergey Zigachev #define ASIC_REV_IS_TONGA_P(eChipRev) ((eChipRev >= VI_TONGA_P_A0) && \ 94*b843c749SSergey Zigachev (eChipRev < 40)) 95*b843c749SSergey Zigachev #define ASIC_REV_IS_FIJI_P(eChipRev) ((eChipRev >= VI_FIJI_P_A0) && \ 96*b843c749SSergey Zigachev (eChipRev < 80)) 97*b843c749SSergey Zigachev 98*b843c749SSergey Zigachev #define ASIC_REV_IS_POLARIS10_P(eChipRev) ((eChipRev >= VI_POLARIS10_P_A0) && \ 99*b843c749SSergey Zigachev (eChipRev < VI_POLARIS11_M_A0)) 100*b843c749SSergey Zigachev #define ASIC_REV_IS_POLARIS11_M(eChipRev) ((eChipRev >= VI_POLARIS11_M_A0) && \ 101*b843c749SSergey Zigachev (eChipRev < VI_POLARIS12_V_A0)) 102*b843c749SSergey Zigachev #define ASIC_REV_IS_POLARIS12_V(eChipRev) ((eChipRev >= VI_POLARIS12_V_A0) && \ 103*b843c749SSergey Zigachev (eChipRev < VI_VEGAM_A0)) 104*b843c749SSergey Zigachev #define ASIC_REV_IS_VEGAM(eChipRev) (eChipRev >= VI_VEGAM_A0) 105*b843c749SSergey Zigachev 106*b843c749SSergey Zigachev /* DCE11 */ 107*b843c749SSergey Zigachev #define CZ_CARRIZO_A0 0x01 108*b843c749SSergey Zigachev 109*b843c749SSergey Zigachev #define STONEY_A0 0x61 110*b843c749SSergey Zigachev #define CZ_UNKNOWN 0xFF 111*b843c749SSergey Zigachev 112*b843c749SSergey Zigachev #define ASIC_REV_IS_STONEY(rev) \ 113*b843c749SSergey Zigachev ((rev >= STONEY_A0) && (rev < CZ_UNKNOWN)) 114*b843c749SSergey Zigachev 115*b843c749SSergey Zigachev /* DCE12 */ 116*b843c749SSergey Zigachev #define AI_UNKNOWN 0xFF 117*b843c749SSergey Zigachev 118*b843c749SSergey Zigachev #define AI_GREENLAND_P_A0 1 119*b843c749SSergey Zigachev #define AI_GREENLAND_P_A1 2 120*b843c749SSergey Zigachev #define AI_UNKNOWN 0xFF 121*b843c749SSergey Zigachev 122*b843c749SSergey Zigachev #define AI_VEGA12_P_A0 20 123*b843c749SSergey Zigachev #define AI_VEGA20_P_A0 40 124*b843c749SSergey Zigachev #define ASICREV_IS_GREENLAND_M(eChipRev) (eChipRev < AI_VEGA12_P_A0) 125*b843c749SSergey Zigachev #define ASICREV_IS_GREENLAND_P(eChipRev) (eChipRev < AI_VEGA12_P_A0) 126*b843c749SSergey Zigachev 127*b843c749SSergey Zigachev #define ASICREV_IS_VEGA12_P(eChipRev) ((eChipRev >= AI_VEGA12_P_A0) && (eChipRev < AI_VEGA20_P_A0)) 128*b843c749SSergey Zigachev #define ASICREV_IS_VEGA20_P(eChipRev) ((eChipRev >= AI_VEGA20_P_A0) && (eChipRev < AI_UNKNOWN)) 129*b843c749SSergey Zigachev 130*b843c749SSergey Zigachev /* DCN1_0 */ 131*b843c749SSergey Zigachev #define INTERNAL_REV_RAVEN_A0 0x00 /* First spin of Raven */ 132*b843c749SSergey Zigachev #define RAVEN_A0 0x01 133*b843c749SSergey Zigachev #define RAVEN_B0 0x21 134*b843c749SSergey Zigachev #define RAVEN_UNKNOWN 0xFF 135*b843c749SSergey Zigachev 136*b843c749SSergey Zigachev #define ASIC_REV_IS_RAVEN(eChipRev) ((eChipRev >= RAVEN_A0) && eChipRev < RAVEN_UNKNOWN) 137*b843c749SSergey Zigachev #define RAVEN1_F0 0xF0 138*b843c749SSergey Zigachev #define ASICREV_IS_RV1_F0(eChipRev) ((eChipRev >= RAVEN1_F0) && (eChipRev < RAVEN_UNKNOWN)) 139*b843c749SSergey Zigachev 140*b843c749SSergey Zigachev 141*b843c749SSergey Zigachev #define FAMILY_RV 142 /* DCN 1*/ 142*b843c749SSergey Zigachev 143*b843c749SSergey Zigachev /* 144*b843c749SSergey Zigachev * ASIC chip ID 145*b843c749SSergey Zigachev */ 146*b843c749SSergey Zigachev /* DCE80 */ 147*b843c749SSergey Zigachev #define DEVICE_ID_KALINDI_9834 0x9834 148*b843c749SSergey Zigachev #define DEVICE_ID_TEMASH_9839 0x9839 149*b843c749SSergey Zigachev #define DEVICE_ID_TEMASH_983D 0x983D 150*b843c749SSergey Zigachev 151*b843c749SSergey Zigachev /* Asic Family IDs for different asic family. */ 152*b843c749SSergey Zigachev #define FAMILY_CI 120 /* Sea Islands: Hawaii (P), Bonaire (M) */ 153*b843c749SSergey Zigachev #define FAMILY_KV 125 /* Fusion => Kaveri: Spectre, Spooky; Kabini: Kalindi */ 154*b843c749SSergey Zigachev #define FAMILY_VI 130 /* Volcanic Islands: Iceland (V), Tonga (M) */ 155*b843c749SSergey Zigachev #define FAMILY_CZ 135 /* Carrizo */ 156*b843c749SSergey Zigachev 157*b843c749SSergey Zigachev #define FAMILY_AI 141 158*b843c749SSergey Zigachev 159*b843c749SSergey Zigachev #define FAMILY_UNKNOWN 0xFF 160*b843c749SSergey Zigachev 161*b843c749SSergey Zigachev #endif /* __DAL_ASIC_ID_H__ */ 162