blob: 3f93d1372702625970f0cdc1881cff525d99f653 [file] [log] [blame]
Lokesh Vutlafbf27282013-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 Nori9f1a8cd2013-12-10 15:02:15 +053015#include <asm/arch/omap.h>
16
Nishanth Menon5f8bb932016-02-24 12:30:56 -060017#define DEV_ATTR_MAX_OFFSET 5
18#define DEV_ATTR_MIN_OFFSET 0
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053019
20static inline int board_is_eposevm(void)
21{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060022 return board_ti_is("AM43EPOS");
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053023}
24
25static inline int board_is_gpevm(void)
26{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060027 return board_ti_is("AM43__GP");
Sekhar Nori9f1a8cd2013-12-10 15:02:15 +053028}
29
Felipe Balbi9cb9f332014-06-10 15:01:20 -050030static inline int board_is_sk(void)
31{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060032 return board_ti_is("AM43__SK");
Felipe Balbi9cb9f332014-06-10 15:01:20 -050033}
34
Felipe Balbi403d70a2014-12-22 16:26:17 -060035static inline int board_is_idk(void)
36{
Nishanth Menon5f8bb932016-02-24 12:30:56 -060037 return board_ti_is("AM43_IDK");
Felipe Balbi403d70a2014-12-22 16:26:17 -060038}
39
Madan Srinivasa5051b72016-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 Jr2c952112014-06-27 13:31:14 -050050static inline int board_is_evm_14_or_later(void)
51{
Madan Srinivasa5051b72016-05-19 19:10:48 -050052 return board_is_evm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jr2c952112014-06-27 13:31:14 -050053}
54
55static inline int board_is_evm_12_or_later(void)
56{
Madan Srinivasa5051b72016-05-19 19:10:48 -050057 return board_is_evm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0;
Franklin S. Cooper Jr2c952112014-06-27 13:31:14 -050058}
59
Lokesh Vutlafbf27282013-07-30 11:36:27 +053060void enable_uart0_pin_mux(void);
61void enable_board_pin_mux(void);
Lokesh Vutlacf04d032013-12-10 15:02:20 +053062void enable_i2c0_pin_mux(void);
Lokesh Vutlafbf27282013-07-30 11:36:27 +053063#endif