blob: 3f93d1372702625970f0cdc1881cff525d99f653 [file] [log] [blame]
Lokesh Vutlafaa680f2013-07-30 11:36:27 +05301/*
2 * board.h
3 *
4 * TI AM437x boards information header
5 * Derived from AM335x board.
6 *
7 * Copyright (C) 2013, Texas Instruments, Incorporated - http://www.ti.com/
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11
12#ifndef _BOARD_H_
13#define _BOARD_H_
14
Sekhar Nori2ab3c492013-12-10 15:02:15 +053015#include <asm/arch/omap.h>
16
Nishanth Menon757a9a02016-02-24 12:30:56 -060017#define DEV_ATTR_MAX_OFFSET 5
18#define DEV_ATTR_MIN_OFFSET 0
Sekhar Nori2ab3c492013-12-10 15:02:15 +053019
20static inline int board_is_eposevm(void)
21{
Nishanth Menon757a9a02016-02-24 12:30:56 -060022 return board_ti_is("AM43EPOS");
Sekhar Nori2ab3c492013-12-10 15:02:15 +053023}
24
25static inline int board_is_gpevm(void)
26{
Nishanth Menon757a9a02016-02-24 12:30:56 -060027 return board_ti_is("AM43__GP");
Sekhar Nori2ab3c492013-12-10 15:02:15 +053028}
29
Felipe Balbiccc6f842014-06-10 15:01:20 -050030static inline int board_is_sk(void)
31{
Nishanth Menon757a9a02016-02-24 12:30:56 -060032 return board_ti_is("AM43__SK");
Felipe Balbiccc6f842014-06-10 15:01:20 -050033}
34
Felipe Balbi3dcd6d82014-12-22 16:26:17 -060035static inline int board_is_idk(void)
36{
Nishanth Menon757a9a02016-02-24 12:30:56 -060037 return board_ti_is("AM43_IDK");
Felipe Balbi3dcd6d82014-12-22 16:26:17 -060038}
39
Madan Srinivas36235022016-05-19 19:10:48 -050040static inline int board_is_hsevm(void)
41{
42 return board_ti_is("AM43XXHS");
43}
44
45static inline int board_is_evm(void)
46{
47 return board_is_gpevm() || board_is_hsevm();
48}
49
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050050static inline int board_is_evm_14_or_later(void)
51{
Madan Srinivas36235022016-05-19 19:10:48 -050052 return board_is_evm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050053}
54
55static inline int board_is_evm_12_or_later(void)
56{
Madan Srinivas36235022016-05-19 19:10:48 -050057 return board_is_evm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050058}
59
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053060void enable_uart0_pin_mux(void);
61void enable_board_pin_mux(void);
Lokesh Vutla42c213a2013-12-10 15:02:20 +053062void enable_i2c0_pin_mux(void);
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053063#endif