blob: 06b737445d4435858c491e355107c1a65611b2f0 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Lokesh Vutlafbf27282013-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 Vutlafbf27282013-07-30 11:36:27 +05309 */
10
11#ifndef _BOARD_H_
12#define _BOARD_H_
13
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053014#include <asm/arch/omap.h>
15
Nishanth Menon5f8bb932016-02-24 12:30:56 -060016#define DEV_ATTR_MAX_OFFSET 5
17#define DEV_ATTR_MIN_OFFSET 0
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053018
19static inline int board_is_eposevm(void)
20{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060021 return board_ti_is("AM43EPOS");
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053022}
23
24static inline int board_is_gpevm(void)
25{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060026 return board_ti_is("AM43__GP");
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053027}
28
Felipe Balbi9cb9f332014-06-10 15:01:20 -050029static inline int board_is_sk(void)
30{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060031 return board_ti_is("AM43__SK");
Felipe Balbi9cb9f332014-06-10 15:01:20 -050032}
33
Felipe Balbi403d70a2014-12-22 16:26:17 -060034static inline int board_is_idk(void)
35{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060036 return board_ti_is("AM43_IDK");
Felipe Balbi403d70a2014-12-22 16:26:17 -060037}
38
Madan Srinivasa5051b72016-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 Jr2c952112014-06-27 13:31:14 -050049static inline int board_is_evm_14_or_later(void)
50{
Madan Srinivasa5051b72016-05-19 19:10:48 -050051 return board_is_evm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jr2c952112014-06-27 13:31:14 -050052}
53
54static inline int board_is_evm_12_or_later(void)
55{
Madan Srinivasa5051b72016-05-19 19:10:48 -050056 return board_is_evm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jr2c952112014-06-27 13:31:14 -050057}
58
Lokesh Vutlafbf27282013-07-30 11:36:27 +053059void enable_uart0_pin_mux(void);
60void enable_board_pin_mux(void);
Lokesh Vutlacf04d032013-12-10 15:02:20 +053061void enable_i2c0_pin_mux(void);
Lokesh Vutlafbf27282013-07-30 11:36:27 +053062#endif