|
TT Zephyr Platforms 19.5.0-rc1
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 | |
| SENSOR_DT_READ_IODEV (cat_ts_avg_iodev, DT_NODELABEL(pvt), {SENSOR_CHAN_PVT_TT_BH_TS_AVG, 0}) | |
| RTIO_DEFINE (cat_ts_avg_ctx, 1, 1) | |
| 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 *const | pvt = DEVICE_DT_GET(DT_NODELABEL(pvt)) |
| static uint8_t | cat_ts_avg_buf [sizeof(struct sensor_value)] |
| 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 |
| RTIO_DEFINE | ( | cat_ts_avg_ctx | , |
| 1 | , | ||
| 1 | ) |
| SENSOR_DT_READ_IODEV | ( | cat_ts_avg_iodev | , |
| DT_NODELABEL(pvt) | , | ||
| {SENSOR_CHAN_PVT_TT_BH_TS_AVG, 0} | ) |
| SYS_INIT_APP | ( | CATEarlyInit | ) |
| SYS_INIT_APP | ( | CATInit | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |