hocclk: fixes and other stuff

This commit is contained in:
souldbminersmwc
2026-05-08 15:53:53 -04:00
parent 848a788c5f
commit 598136c64b
18 changed files with 291 additions and 206 deletions

View File

@@ -27,6 +27,9 @@ DATA := data
INCLUDES := ../common/include
EXEFS_SRC := exefs_src
LIBNAMES := minIni nxExt
# major minor patch
KIP_VERSION := 220
CUST_REV := 2
#---------------------------------------------------------------------------------
# version control constants
@@ -36,7 +39,7 @@ TARGET_VERSION := $(shell git describe --dirty --always --tags)
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
DEFINES := -DDISABLE_IPC -DTARGET="\"$(TARGET)\"" -DTARGET_VERSION="\"$(TARGET_VERSION)\"" -DCONFIG_DIR="\"$(CONFIG_DIR)\""
DEFINES := -DDISABLE_IPC -DKIP_VERSION=$(KIP_VERSION) -DCUST_REV=$(CUST_REV) -DTARGET="\"$(TARGET)\"" -DTARGET_VERSION="\"$(TARGET_VERSION)\"" -DCONFIG_DIR="\"$(CONFIG_DIR)\""
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE

View File

@@ -33,7 +33,7 @@
#include "board.hpp"
#include "../tsensor/soctherm.hpp"
#include "../tsensor/aotag.hpp"
#include "bq24193.hpp"
#include "../tsensor/bq24193.hpp"
#include "../config.hpp"
namespace board {
@@ -81,7 +81,7 @@ namespace board {
}
case HocClkThermalSensor_MEM: {
if (board::GetSocType() == HocClkSocType_Mariko && tsensor::IsInitialized() && tsensor::ReadAotag() > 0) {
millis = (temps.gpu * 0.45f) + (temps.pllx * 0.30f) + (temps.cpu * 0.15f) + (tsensor::ReadAotag() * 0.10f) + 3000;
millis = (temps.pllx * 0.10f) + (tsensor::ReadAotag() * 0.90f);
} else {
millis = board::GetSocType() == HocClkSocType_Mariko ? temps.pllx : temps.mem;
}

View File

@@ -20,9 +20,6 @@
#include "file_utils.hpp"
#include "clock_manager.hpp"
#define CUST_REV 2
#define KIP_VERSION 220
namespace kip {
bool kipAvailable = false;

View File

@@ -211,7 +211,7 @@ namespace tsensor {
s32 ReadAotag() {
if (!wasInit) {
return -125;
return -126;
}
u32 regval = 0, abs = 0, fraction = 0, valid = 0, sign = 0;

View File

@@ -17,7 +17,7 @@
*
*/
#include "board.hpp"
#include "../board/board.hpp"
#include <i2c.h>
namespace bq24193 {