rewrite everything
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) hanai3bi (meha)
|
||||
* Copyright (C) Switch-OC-Suite
|
||||
*
|
||||
* Copyright (c) 2023 hanai3Bi
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
@@ -16,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define CUST_REV 2
|
||||
#define CUST_REV 11
|
||||
|
||||
#include "oc_common.hpp"
|
||||
#include "pcv/pcv_common.hpp"
|
||||
@@ -43,90 +45,58 @@ constexpr uint32_t MARIKO_MTC_MAGIC = 0x43544D4D; // MMTC
|
||||
|
||||
typedef struct CustomizeTable {
|
||||
u8 cust[4] = {'C', 'U', 'S', 'T'};
|
||||
u32 custRev;
|
||||
u32 custRev = CUST_REV;
|
||||
u32 mtcConf;
|
||||
u32 commonCpuBoostClock;
|
||||
u32 commonEmcMemVolt;
|
||||
|
||||
// Erista CPU/EMC
|
||||
u32 eristaCpuMaxVolt;
|
||||
u32 eristaEmcMaxClock;
|
||||
|
||||
// Mariko CPU/EMC
|
||||
u32 marikoCpuMaxVolt;
|
||||
u32 marikoEmcMaxClock;
|
||||
u32 marikoEmcVddqVolt;
|
||||
u32 marikoCpuUV;
|
||||
u32 marikoGpuUV;
|
||||
|
||||
u32 eristaCpuUV;
|
||||
u32 eristaGpuUV;
|
||||
|
||||
u32 enableMarikoGpuUnsafeFreqs;
|
||||
u32 enableEristaGpuUnsafeFreqs;
|
||||
|
||||
u32 enableMarikoCpuUnsafeFreqs;
|
||||
u32 enableEristaCpuUnsafeFreqs;
|
||||
|
||||
u32 commonGpuVoltOffset;
|
||||
u32 marikoCpuHighVoltOffset;
|
||||
u32 marikoCpuHighUV;
|
||||
|
||||
u32 cpuMaxFreq;
|
||||
u32 gpuMaxFreq;
|
||||
u32 gpuVmax;
|
||||
u32 gpuVmin;
|
||||
|
||||
// advanced config
|
||||
u32 marikoEmcDvbShift;
|
||||
u32 ramTimingPresetOne;
|
||||
u32 ramTimingPresetTwo;
|
||||
u32 ramTimingPresetThree;
|
||||
u32 ramTimingPresetFour;
|
||||
u32 ramTimingPresetFive;
|
||||
u32 ramTimingPresetSix;
|
||||
u32 ramTimingPresetSeven;
|
||||
//
|
||||
u32 marikoGpuVoltArray[23];
|
||||
u32 eristaGpuVoltArray[15];
|
||||
|
||||
// RAM timings (u32)
|
||||
u32 latency;
|
||||
u32 BL;
|
||||
u32 WL;
|
||||
u32 RL;
|
||||
u32 tRFCpb;
|
||||
u32 tRFCab;
|
||||
u32 tRAS;
|
||||
u32 tRPpb;
|
||||
u32 tRPab;
|
||||
u32 tRC;
|
||||
u32 tWTR;
|
||||
u32 tWR;
|
||||
u32 tRCD;
|
||||
u32 tREFpb;
|
||||
u32 tMRWCKEL;
|
||||
u32 tSR;
|
||||
u32 tFAW;
|
||||
|
||||
// RAM timings (double)
|
||||
double tR2REF;
|
||||
double tDQSCK_min;
|
||||
double tDQSCK_max;
|
||||
double tWPRE;
|
||||
double tRPST;
|
||||
double tDQSS_max;
|
||||
double tDQS2DQ_max;
|
||||
double tDQSQ;
|
||||
double tRTP;
|
||||
double tRRD;
|
||||
double tXP;
|
||||
double tCMDCKE;
|
||||
double tCKELCS;
|
||||
double tCSCKEH;
|
||||
double tXSR;
|
||||
double tCKE;
|
||||
double tCKCKEH;
|
||||
|
||||
// Mariko GPU voltages
|
||||
u32 marikoGpuVoltArray[24];
|
||||
|
||||
|
||||
CustomizeCpuDvfsTable eristaCpuDvfsTable;
|
||||
CustomizeCpuDvfsTable marikoCpuDvfsTable;
|
||||
CustomizeCpuDvfsTable marikoCpuDvfsTableSLT;
|
||||
|
||||
CustomizeGpuDvfsTable eristaGpuDvfsTable;
|
||||
CustomizeGpuDvfsTable eristaGpuDvfsTableSLT;
|
||||
CustomizeGpuDvfsTable eristaGpuDvfsTableHigh;
|
||||
|
||||
|
||||
CustomizeGpuDvfsTable marikoGpuDvfsTable;
|
||||
CustomizeGpuDvfsTable marikoGpuDvfsTableSLT;
|
||||
CustomizeGpuDvfsTable marikoGpuDvfsTableHiOPT;
|
||||
CustomizeGpuDvfsTable marikoGpuDvfsTableUv3;
|
||||
//EristaMtcTable* eristaMtcTable;
|
||||
//MarikoMtcTable* marikoMtcTable;
|
||||
u32 eristaCPUvMax;
|
||||
u32 marikoCPUvMax;
|
||||
u32 MemVltMax;
|
||||
u32 marikoVDDQMax;
|
||||
u8 marikoB3;
|
||||
|
||||
CustomizeGpuDvfsTable eristaGpuDvfsTableUv3UnsafeFreqs;
|
||||
CustomizeGpuDvfsTable marikoGpuDvfsTableUv3UnsafeFreqs;
|
||||
CustomizeCpuDvfsTable marikoCpuDvfsTableUnsafeFreqs;
|
||||
} CustomizeTable;
|
||||
//static_assert(sizeof(CustomizeTable) == sizeof(u8) * 4 + sizeof(u32) * 10 + sizeof(CustomizeCpuDvfsTable) * 5 + sizeof(void*) * 2);
|
||||
//static_assert(sizeof(CustomizeTable) == 7000);
|
||||
@@ -136,4 +106,4 @@ extern volatile CustomizeTable C;
|
||||
//extern volatile EristaMtcTable EristaMtcTablePlaceholder;
|
||||
//extern volatile MarikoMtcTable MarikoMtcTablePlaceholder;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user