blob: 23469114f36e1fc64daf3410cfa3a5bca921c52a [file] [log] [blame]
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +02001/*
Marek Vasut9607c722023-01-22 19:28:43 +01002 * Copyright (c) 2015-2023, Renesas Electronics Corporation. All rights
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +02003 * reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00008#ifndef BOARD_H
9#define BOARD_H
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +020010
11#define BOARD_SALVATOR_X (0x00)
12#define BOARD_KRIEK (0x01)
13#define BOARD_STARTER_KIT (0x02)
Marek Vasut9607c722023-01-22 19:28:43 +010014#define BOARD_EAGLE (0x03)
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +020015#define BOARD_SALVATOR_XS (0x04)
Marek Vasut9607c722023-01-22 19:28:43 +010016#define BOARD_DRAAK (0x07)
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +020017#define BOARD_EBISU (0x08)
18#define BOARD_STARTER_KIT_PRE (0x0B)
Marek Vasut9607c722023-01-22 19:28:43 +010019#define BOARD_EBISU_4D (0x0D)
20#define BOARD_UNKNOWN (BOARD_EBISU_4D + 1U)
Jorge Ramirez-Ortiz268162f2018-09-23 09:39:11 +020021
22#define BOARD_REV_UNKNOWN (0xFF)
23
24extern const char *g_board_tbl[];
25
26/************************************************************************
27 * Revisions are expressed in 8 bits.
28 * The upper 4 bits are major version.
29 * The lower 4 bits are minor version.
30 ************************************************************************/
31#define GET_BOARD_MAJOR(a) ((uint32_t)(a) >> 0x4)
32#define GET_BOARD_MINOR(a) ((uint32_t)(a) & 0xF)
33#define GET_BOARD_NAME(a) (g_board_tbl[(a)])
34
35int32_t rcar_get_board_type(uint32_t *type, uint32_t *rev);
36
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000037#endif /* BOARD_H */