blob: 1a768490c8c82265f71670ad615aba73c6c37956 [file] [log] [blame]
Biju Das40e80732020-12-07 16:29:22 +00001/*
Lad Prabhakare1c0f742020-12-21 13:51:58 +00002 * Copyright (c) 2020-2021, Renesas Electronics Corporation. All rights reserved.
Biju Das40e80732020-12-07 16:29:22 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef RZ_G2_BOARD_H
8#define RZ_G2_BOARD_H
9
10enum rzg2_board_id {
11 BOARD_HIHOPE_RZ_G2M = 0,
Lad Prabhakare1c0f742020-12-21 13:51:58 +000012 BOARD_HIHOPE_RZ_G2H,
Lad Prabhakar21d04f02021-03-19 12:01:00 +000013 BOARD_HIHOPE_RZ_G2N,
Lad Prabhakarea647342021-03-19 12:14:01 +000014 BOARD_EK874_RZ_G2E,
Biju Das40e80732020-12-07 16:29:22 +000015 BOARD_UNKNOWN
16};
17
18#define BOARD_REV_UNKNOWN (0xFFU)
19
20extern const char *g_board_tbl[];
21
22/************************************************************************
23 * Revisions are expressed in 8 bits.
24 * The upper 4 bits are major version.
25 * The lower 4 bits are minor version.
26 ************************************************************************/
27#define GET_BOARD_MAJOR(a) ((uint32_t)(a) >> 0x4)
28#define GET_BOARD_MINOR(a) ((uint32_t)(a) & 0xF)
29#define GET_BOARD_NAME(a) (g_board_tbl[(a)])
30
31void rzg_get_board_type(uint32_t *type, uint32_t *rev);
32
33#endif /* RZ_G2_BOARD_H */