@@ -6,7 +6,7 @@ use crate::f32;
66
77use super :: * ;
88
9- const fn iomaps ( mcc_count : usize ) -> [ Option < IOMapping > ; 24 ] {
9+ const fn iomaps ( chip_id : u32 , mcc_count : usize ) -> [ Option < IOMapping > ; 24 ] {
1010 [
1111 Some ( IOMapping :: new ( 0x404d00000 , 0x144000 , 0x144000 , true ) ) , // Fender
1212 Some ( IOMapping :: new ( 0x20e100000 , 0x4000 , 0x4000 , false ) ) , // AICTimer
@@ -15,18 +15,26 @@ const fn iomaps(mcc_count: usize) -> [Option<IOMapping>; 24] {
1515 None , // UVD
1616 None , // unused
1717 None , // DisplayUnderrunWA
18- Some ( IOMapping :: new ( 0x28e478000 , 0x4000 , 0x4000 , false ) ) , // AnalogTempSensorControllerRegs
19- None , // PMPDoorbell
20- Some ( IOMapping :: new ( 0x404e08000 , 0x8000 , 0x8000 , true ) ) , // MetrologySensorRegs
21- None , // GMGIFAFRegs
18+ Some ( IOMapping :: new (
19+ match chip_id {
20+ 0x6020 => 0x28e460000 ,
21+ _ => 0x28e478000 ,
22+ } ,
23+ 0x4000 ,
24+ 0x4000 ,
25+ false ,
26+ ) ) , // AnalogTempSensorControllerRegs
27+ None , // PMPDoorbell
28+ Some ( IOMapping :: new ( 0x404e08000 , 0x8000 , 0x8000 , true ) ) , // MetrologySensorRegs
29+ None , // GMGIFAFRegs
2230 Some ( IOMapping :: new (
2331 0x200000000 ,
2432 mcc_count * 0xd8000 ,
2533 0xd8000 ,
2634 true ,
2735 ) ) , // MCache registers
28- Some ( IOMapping :: new ( 0x28e118000 , 0x4000 , 0x4000 , false ) ) , // AICBankedRegisters
29- None , // PMGRScratch
36+ Some ( IOMapping :: new ( 0x28e118000 , 0x4000 , 0x4000 , false ) ) , // AICBankedRegisters
37+ None , // PMGRScratch
3038 None , // NIA Special agent idle register die 0
3139 None , // NIA Special agent idle register die 1
3240 None , // CRE registers
@@ -79,6 +87,7 @@ pub(crate) const HWCONFIG_T6022: super::HwConfig = HwConfig {
7987 unk_e24 : 125 ,
8088 } ,
8189 db : HwConfigB {
90+ unk_454 : 1 ,
8291 unk_4e0 : 4 ,
8392 unk_534 : 0 ,
8493 unk_ab8 : 0 , // Unused
@@ -136,7 +145,7 @@ pub(crate) const HWCONFIG_T6022: super::HwConfig = HwConfig {
136145 fast_sensor_mask : [ 0x40005000c000d00 , 0x40005000c000d00 ] ,
137146 fast_sensor_mask_alt : [ 0x140015001d001d00 , 0x140015001d001d00 ] ,
138147 fast_die0_sensor_present : 0 , // Unused
139- io_mappings : & iomaps ( 16 ) ,
148+ io_mappings : & iomaps ( 0x6022 , 16 ) ,
140149 sram_base : Some ( 0x404d60000 ) ,
141150 sram_size : Some ( 0x20000 ) ,
142151} ;
@@ -150,7 +159,7 @@ pub(crate) const HWCONFIG_T6021: super::HwConfig = HwConfig {
150159 max_num_clusters : 4 ,
151160 fast_sensor_mask : [ 0x40005000c000d00 , 0 ] ,
152161 fast_sensor_mask_alt : [ 0x140015001d001d00 , 0 ] ,
153- io_mappings : & iomaps ( 8 ) ,
162+ io_mappings : & iomaps ( 0x6021 , 8 ) ,
154163 ..HWCONFIG_T6022
155164} ;
156165
@@ -159,9 +168,14 @@ pub(crate) const HWCONFIG_T6020: super::HwConfig = HwConfig {
159168 gpu_variant : GpuVariant :: S ,
160169 gpu_core : GpuCore :: G14S ,
161170
171+ db : HwConfigB {
172+ unk_454 : 0 ,
173+ ..HWCONFIG_T6021 . db
174+ } ,
175+
162176 max_num_clusters : 2 ,
163177 fast_sensor_mask : [ 0xc000d00 , 0 ] ,
164178 fast_sensor_mask_alt : [ 0x1d001d00 , 0 ] ,
165- io_mappings : & iomaps ( 4 ) ,
179+ io_mappings : & iomaps ( 0x6020 , 4 ) ,
166180 ..HWCONFIG_T6021
167181} ;
0 commit comments