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