blob: 06b737445d4435858c491e355107c1a65611b2f0 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Lokesh Vutlafaa680f2013-07-30 11:36:27 +05302/*
3 * board.h
4 *
5 * TI AM437x boards information header
6 * Derived from AM335x board.
7 *
8 * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
Lokesh Vutlafaa680f2013-07-30 11:36:27 +05309 */
10
11#ifndef _BOARD_H_
12#define _BOARD_H_
13
Sekhar Nori2ab3c492013-12-10 15:02:15 +053014#include <asm/arch/omap.h>
15
Nishanth Menon757a9a02016-02-24 12:30:56 -060016#define DEV_ATTR_MAX_OFFSET 5
17#define DEV_ATTR_MIN_OFFSET 0
Sekhar Nori2ab3c492013-12-10 15:02:15 +053018
19static inline int board_is_eposevm(void)
20{
Nishanth Menon757a9a02016-02-24 12:30:56 -060021 return board_ti_is("AM43EPOS");
Sekhar Nori2ab3c492013-12-10 15:02:15 +053022}
23
24static inline int board_is_gpevm(void)
25{
Nishanth Menon757a9a02016-02-24 12:30:56 -060026 return board_ti_is("AM43__GP");
Sekhar Nori2ab3c492013-12-10 15:02:15 +053027}
28
Felipe Balbiccc6f842014-06-10 15:01:20 -050029static inline int board_is_sk(void)
30{
Nishanth Menon757a9a02016-02-24 12:30:56 -060031 return board_ti_is("AM43__SK");
Felipe Balbiccc6f842014-06-10 15:01:20 -050032}
33
Felipe Balbi3dcd6d82014-12-22 16:26:17 -060034static inline int board_is_idk(void)
35{
Nishanth Menon757a9a02016-02-24 12:30:56 -060036 return board_ti_is("AM43_IDK");
Felipe Balbi3dcd6d82014-12-22 16:26:17 -060037}
38
Madan Srinivas36235022016-05-19 19:10:48 -050039static inline int board_is_hsevm(void)
40{
41 return board_ti_is("AM43XXHS");
42}
43
44static inline int board_is_evm(void)
45{
46 return board_is_gpevm() || board_is_hsevm();
47}
48
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050049static inline int board_is_evm_14_or_later(void)
50{
Madan Srinivas36235022016-05-19 19:10:48 -050051 return board_is_evm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050052}
53
54static inline int board_is_evm_12_or_later(void)
55{
Madan Srinivas36235022016-05-19 19:10:48 -050056 return board_is_evm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050057}
58
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053059void enable_uart0_pin_mux(void);
60void enable_board_pin_mux(void);
Lokesh Vutla42c213a2013-12-10 15:02:20 +053061void enable_i2c0_pin_mux(void);
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053062#endif