TT-System-Firmware APIs 19.13.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
bh_fwtable.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Tenstorrent AI ULC
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#ifndef BH_FWTABLE_H
7#define BH_FWTABLE_H
8
9#include <stdbool.h>
10#include <stdint.h>
11#include <zephyr/device.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/*
18 * The generated nanopb headers only exist when the bh_fwtable driver is built.
19 * SMC recovery builds disable the driver (see drivers/misc/bh_fwtable/Kconfig),
20 * but still pull in this header transitively for the plain chip enums below
21 * (e.g. PcbType via regulator.h).
22 */
23#ifdef CONFIG_BH_FWTABLE
24#include "fw_table.pb.h"
25#include "flash_info.pb.h"
26#include "read_only.pb.h"
27#endif
28
29const struct _FwTable *tt_bh_fwtable_get_fw_table(const struct device *dev);
30const struct _FlashInfoTable *tt_bh_fwtable_get_flash_info_table(const struct device *dev);
31const struct _ReadOnly *tt_bh_fwtable_get_read_only_table(const struct device *dev);
32
33/* Board type values extracted from board_id */
34#define BOARDTYPE_ORION_SLT 0x37
35#define BOARDTYPE_P100A 0x43
36#define BOARDTYPE_P150A 0x40
37#define BOARDTYPE_P150 0x41
38#define BOARDTYPE_P150C 0x42
39#define BOARDTYPE_P300 0x44
40#define BOARDTYPE_P300A 0x45
41#define BOARDTYPE_P300C 0x46
42#define BOARDTYPE_UBB 0x47
43
52
57void tt_bh_fwtable_apply_ccfgovr(const struct device *dev);
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif /* BH_FWTABLE_H*/
uint32_t tt_bh_fwtable_get_asic_location(const struct device *dev)
Definition bh_fwtable.c:143
const struct _FlashInfoTable * tt_bh_fwtable_get_flash_info_table(const struct device *dev)
Definition bh_fwtable.c:62
void tt_bh_fwtable_apply_ccfgovr(const struct device *dev)
uint8_t tt_bh_fwtable_get_board_type(const struct device *dev)
Definition bh_fwtable.c:125
PcbType tt_bh_fwtable_get_pcb_type(const struct device *dev)
Definition bh_fwtable.c:83
bool tt_bh_fwtable_is_p300_left_chip(void)
Definition bh_fwtable.c:138
const struct _ReadOnly * tt_bh_fwtable_get_read_only_table(const struct device *dev)
Definition bh_fwtable.c:72
PcbType
Definition bh_fwtable.h:44
@ PcbTypeP100
Definition bh_fwtable.h:46
@ PcbTypeUBB
Definition bh_fwtable.h:49
@ PcbTypeOrionSLT
Definition bh_fwtable.h:45
@ PcbTypeP150
Definition bh_fwtable.h:47
@ PcbTypeUnknown
Definition bh_fwtable.h:50
@ PcbTypeP300
Definition bh_fwtable.h:48
const struct _FwTable * tt_bh_fwtable_get_fw_table(const struct device *dev)
Definition bh_fwtable.c:52
__UINT32_TYPE__ uint32_t
__UINT8_TYPE__ uint8_t