TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
|
#include "cat.h"
#include "reg.h"
#include "timer.h"
#include <stdbool.h>
#include <tenstorrent/post_code.h>
#include <tenstorrent/sys_init_defines.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/init.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/sensor/tenstorrent/pvt_tt_bh.h>
Data Structures | |
struct | RESET_UNIT_CATMON_THERM_TRIP_CNTL_reg_t |
union | RESET_UNIT_CATMON_THERM_TRIP_CNTL_reg_u |
Macros | |
#define | RESET_UNIT_CATMON_THERM_TRIP_STATUS_REG_ADDR 0x80030164 |
#define | RESET_UNIT_CATMON_THERM_TRIP_CNTL_REG_ADDR 0x80030168 |
#define | RESET_UNIT_CATMON_THERM_TRIP_CNTL_REG_DEFAULT 0x00000318 |
#define | CAT_EARLY_TRIP_TEMP 100 |
#define | DEFAULT_CALIBRATION (CAT_EARLY_TRIP_TEMP - T_J_SHUTDOWN) |
#define | TRIM_CODE_BITS 6 |
Functions | |
static uint8_t | TempToTrimCode (float temp) |
static float | TrimCodeToTemp (int32_t trim_code) |
static void | WaitCATUpdate (void) |
static void | EnableCAT (uint8_t trim_code, bool shutdown_on_trip) |
static int | CATEarlyInit (void) |
SYS_INIT_APP (CATEarlyInit) | |
static float | CalibrateCAT (void) |
static int | CATInit (void) |
SYS_INIT_APP (CATInit) |
Variables | |
static const struct device * | gpio1 = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpio1)) |
#define CAT_EARLY_TRIP_TEMP 100 |
#define DEFAULT_CALIBRATION (CAT_EARLY_TRIP_TEMP - T_J_SHUTDOWN) |
#define RESET_UNIT_CATMON_THERM_TRIP_CNTL_REG_ADDR 0x80030168 |
#define RESET_UNIT_CATMON_THERM_TRIP_CNTL_REG_DEFAULT 0x00000318 |
#define RESET_UNIT_CATMON_THERM_TRIP_STATUS_REG_ADDR 0x80030164 |
#define TRIM_CODE_BITS 6 |
|
static |
|
static |
|
static |
SYS_INIT_APP | ( | CATEarlyInit | ) |
SYS_INIT_APP | ( | CATInit | ) |
|
static |
|
static |
|
static |
|
static |