I took a break from figuring out memory controller registers and added R9 strap format to ohgodadecode through a compile-time flag.
CFLAGS=-DSTRAP_R9=1 make
https://github.com/nerdralph/OhGodADecodeHere it is decoding a strap (1500Mhz) from my custom Tonga BIOS. Next I'll probably do a new version of the Tonga bios with tuned straps.
./ohgodadecode 7771332000000000EF516A3790550F1232179A05006AE40022AA1C0874021420CA89C0A8020000C01510232859283315
TRCDW=15 TRCDWA=15 TRCDR=20 TRCDRA=20 TRRD=6 TRC=55 Pad0=0
TNOPW=0 TNOPR=0 TR2W=25 TCCDL=2 TR2R=5 TW2R=15 Pad0=0 TCL=18 Pad1=0
TRP_WRA=50 TRP_RDA=23 TRP=104 TRFC=44 Pad0=0
PA2RDATA=2 Pad0=1 PA2WDATA=6 Pad1=0 TFAW=4 TCRCRL=7 TCRCWL=0 TFAW32=0
MC_SEQ_MISC1: 0xCA201402
MC_SEQ_MISC3: 0x02A8C089
MC_SEQ_MISC8: 0x15C00000
ACTRD=16 ACTWR=35 RASMACTRD=40 RASMACTWR=89
RAS2RAS=40 RP=51 WRPLUSRP=21 BUS_TURN=0
p.s. just noticed there might be a bug in MC_SEQ_MISC_TIMING2 decoding, since Pad0=1. May have to dig through the amdgpu register initialization code to make sure I have the right offset in the strap for it.
Which card has this timing string for 1500 strap?
I only saw this timing string for 1375 strap in Elpida EDW4032BABG in R9 290X/380/390/390X.
Decoding for MC_SEQ_MISC_TIMING looks wrong (at least not consistent with decoding of timing string for the same strap and memory type in RX).
MC_SEQ_MISC_TIMING2 looks wrong too, the way a see it (my tool does not work with timing strings only tables and bioses, so some hacks):
$ python atom_timings_editor.py --type R9 -r -I db/R9/Elpida/EDW4032BABG/01.straps -O - |grep 137500 | sed -r "s/[ ,]\[/\n\n[/g"
137500 0 7771332000000000ef516a3790550f1232179a05006ae40022aa1c0874021420ca89c0a8020000c01510232859283315
[TRCDW=015,TRCDWA=015,TRCDR=020,TRCDRA=020,TRRD=006,TRC=055,unused1=000]
[TNOPW=000,TNOPR=000,TR2W=025,TCCDL=002,TR2R=005,TW2R=015,unused1=000,TCL=018,unused2=000]
[TRP_WRA=050,unused1=000,TRP_RDA=023,unused2=000,TRP=020,TRFC=089,unused3=000]
[PA2RDATA=000,unused1=000,PA2WDATA=000,unused2=000,FAW=010,TREDC=003,TWEDC=004,T32AW=007,unused3=000,TWDATATR=000]
[TCKSRE=002,unused1=000,TCKSRX=002,unused2=000,TCKE_PULSE=010,TCKE=010,SEQ_IDLE=007,unused3=000,TCKE_PULSE_MSB=000,SEQ_IDLE_SS=008]
[ACTRD=021,ACTWR=016,RASMACTRD=035,RASMACTWR=040]
[RAS2RAS=089,RP=040,WRPLUSRP=051,BUS_TURN=021]
$ python atom_timings_editor.py --type RX -r -I db/RX/Elpida/EDW4032BABG/01.straps -O - |grep 137500 | sed -r "s/[ ,]\[/\n[/g"
137500 0 777000000000000022aa1c00ef516a3790550f14b20b9505006ae40074021420ca89c0a8020004c01510232859283315
[TRCDW=015,TRCDWA=015,TRCDR=020,TRCDRA=020,TRRD=006,TRC=055,unused1=000]
[TNOPW=000,TNOPR=000,TR2W=025,TCCDL=002,TR2R=005,TW2R=015,unused1=000,TCL=020,unused2=000]
[TRP_WRA=050,TRP_RDA=023,unused1=000,TRP=020,unused2=000,TRFC=089,unused3=000]
[PA2RDATA=000,unused1=000,PA2WDATA=000,unused2=000,FAW=010,TREDC=003,TWEDC=004,T32AW=007,unused3=000,TWDATATR=000]
[TCKSRE=002,unused1=000,TCKSRX=002,unused2=000,TCKE_PULSE=010,TCKE=010,SEQ_IDLE=007,unused3=000,TCKE_PULSE_MSB=000,SEQ_IDLE_SS=000]
[ACTRD=021,ACTWR=016,RASMACTRD=035,RASMACTWR=040]
[RAS2RAS=089,RP=040,WRPLUSRP=051,BUS_TURN=021]
EDIT: MC_ARB_DRAM_TIMING2, MC_ARB_DRAM_TIMING looks misaligned too.
Or at least i think 59283315 should be decoded as 89, 40, 51, 21.