summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/include/gaudi/gaudi_fw_if.h
blob: 25acd9e87e209c4bb2826aab80890a1c1a1d7e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* SPDX-License-Identifier: GPL-2.0
 *
 * Copyright 2019-2020 HabanaLabs, Ltd.
 * All Rights Reserved.
 *
 */

#ifndef GAUDI_FW_IF_H
#define GAUDI_FW_IF_H

#include <linux/types.h>

#define GAUDI_EVENT_QUEUE_MSI_IDX	8
#define GAUDI_NIC_PORT1_MSI_IDX		10
#define GAUDI_NIC_PORT3_MSI_IDX		12
#define GAUDI_NIC_PORT5_MSI_IDX		14
#define GAUDI_NIC_PORT7_MSI_IDX		16
#define GAUDI_NIC_PORT9_MSI_IDX		18

#define UBOOT_FW_OFFSET			0x100000	/* 1MB in SRAM */
#define LINUX_FW_OFFSET			0x800000	/* 8MB in HBM */

enum gaudi_pll_index {
	CPU_PLL = 0,
	PCI_PLL,
	SRAM_PLL,
	HBM_PLL,
	NIC_PLL,
	DMA_PLL,
	MESH_PLL,
	MME_PLL,
	TPC_PLL,
	IF_PLL,
	PLL_MAX
};

enum gaudi_nic_axi_error {
	RXB,
	RXE,
	TXS,
	TXE,
	QPC_RESP,
	NON_AXI_ERR,
};

/*
 * struct eq_nic_sei_event - describes an AXI error cause.
 * @axi_error_cause: one of the events defined in enum gaudi_nic_axi_error.
 * @id: can be either 0 or 1, to further describe unit with interrupt cause
 *      (i.e. TXE0 or TXE1).
 * @pad[6]: padding structure to 64bit.
 */
struct eq_nic_sei_event {
	__u8 axi_error_cause;
	__u8 id;
	__u8 pad[6];
};

#define GAUDI_PLL_FREQ_LOW		200000000 /* 200 MHz */

#endif /* GAUDI_FW_IF_H */