blob: 2cf7a7751d414e53855ebfdb7e73bc4c0fdb4c03 [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
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050040static inline int board_is_evm_14_or_later(void)
41{
Nishanth Menon757a9a02016-02-24 12:30:56 -060042 return (board_is_gpevm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0);
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050043}
44
45static inline int board_is_evm_12_or_later(void)
46{
Nishanth Menon757a9a02016-02-24 12:30:56 -060047 return (board_is_gpevm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0);
Franklin S. Cooper Jrcc76fc42014-06-27 13:31:14 -050048}
49
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053050void enable_uart0_pin_mux(void);
51void enable_board_pin_mux(void);
Lokesh Vutla42c213a2013-12-10 15:02:20 +053052void enable_i2c0_pin_mux(void);
Lokesh Vutlafaa680f2013-07-30 11:36:27 +053053#endif