TT-System-Firmware APIs 19.15.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 (bits 36-55, up to 5 hex digits) */
34#define BOARDTYPE_FROM_BOARD_ID(board_id) ((uint32_t)(((board_id) >> 36) & 0xFFFFF))
35#define BOARDTYPE_ORION_SLT 0x37
36#define BOARDTYPE_P100A 0x43
37#define BOARDTYPE_P150A 0x40
38#define BOARDTYPE_P150 0x41
39#define BOARDTYPE_P150C 0x42
40#define BOARDTYPE_P300 0x44
41#define BOARDTYPE_P300A 0x45
42#define BOARDTYPE_P300C 0x46
43#define BOARDTYPE_UBB 0x47
44#define BOARDTYPE_GALAXY_BIN6 0x202
45
54
59void tt_bh_fwtable_apply_ccfgovr(const struct device *dev);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif /* BH_FWTABLE_H*/
uint32_t tt_bh_fwtable_get_asic_location(const struct device *dev)
Definition bh_fwtable.c:144
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)
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:139
uint32_t tt_bh_fwtable_get_board_type(const struct device *dev)
Definition bh_fwtable.c:126
const struct _ReadOnly * tt_bh_fwtable_get_read_only_table(const struct device *dev)
Definition bh_fwtable.c:72
PcbType
Definition bh_fwtable.h:46
@ PcbTypeP100
Definition bh_fwtable.h:48
@ PcbTypeUBB
Definition bh_fwtable.h:51
@ PcbTypeOrionSLT
Definition bh_fwtable.h:47
@ PcbTypeP150
Definition bh_fwtable.h:49
@ PcbTypeUnknown
Definition bh_fwtable.h:52
@ PcbTypeP300
Definition bh_fwtable.h:50
const struct _FwTable * tt_bh_fwtable_get_fw_table(const struct device *dev)
Definition bh_fwtable.c:52
__UINT32_TYPE__ uint32_t