Lokesh Vutla | faa680f | 2013-07-30 11:36:27 +0530 | [diff] [blame] | 1 | /* |
| 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 Nori | 2ab3c49 | 2013-12-10 15:02:15 +0530 | [diff] [blame] | 15 | #include <asm/arch/omap.h> |
| 16 | |
Nishanth Menon | 757a9a0 | 2016-02-24 12:30:56 -0600 | [diff] [blame] | 17 | #define DEV_ATTR_MAX_OFFSET 5 |
| 18 | #define DEV_ATTR_MIN_OFFSET 0 |
Sekhar Nori | 2ab3c49 | 2013-12-10 15:02:15 +0530 | [diff] [blame] | 19 | |
| 20 | static inline int board_is_eposevm(void) |
| 21 | { |
Nishanth Menon | 757a9a0 | 2016-02-24 12:30:56 -0600 | [diff] [blame] | 22 | return board_ti_is("AM43EPOS"); |
Sekhar Nori | 2ab3c49 | 2013-12-10 15:02:15 +0530 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | static inline int board_is_gpevm(void) |
| 26 | { |
Nishanth Menon | 757a9a0 | 2016-02-24 12:30:56 -0600 | [diff] [blame] | 27 | return board_ti_is("AM43__GP"); |
Sekhar Nori | 2ab3c49 | 2013-12-10 15:02:15 +0530 | [diff] [blame] | 28 | } |
| 29 | |
Felipe Balbi | ccc6f84 | 2014-06-10 15:01:20 -0500 | [diff] [blame] | 30 | static inline int board_is_sk(void) |
| 31 | { |
Nishanth Menon | 757a9a0 | 2016-02-24 12:30:56 -0600 | [diff] [blame] | 32 | return board_ti_is("AM43__SK"); |
Felipe Balbi | ccc6f84 | 2014-06-10 15:01:20 -0500 | [diff] [blame] | 33 | } |
| 34 | |
Felipe Balbi | 3dcd6d8 | 2014-12-22 16:26:17 -0600 | [diff] [blame] | 35 | static inline int board_is_idk(void) |
| 36 | { |
Nishanth Menon | 757a9a0 | 2016-02-24 12:30:56 -0600 | [diff] [blame] | 37 | return board_ti_is("AM43_IDK"); |
Felipe Balbi | 3dcd6d8 | 2014-12-22 16:26:17 -0600 | [diff] [blame] | 38 | } |
| 39 | |
Madan Srinivas | 3623502 | 2016-05-19 19:10:48 -0500 | [diff] [blame] | 40 | static inline int board_is_hsevm(void) |
| 41 | { |
| 42 | return board_ti_is("AM43XXHS"); |
| 43 | } |
| 44 | |
| 45 | static inline int board_is_evm(void) |
| 46 | { |
| 47 | return board_is_gpevm() || board_is_hsevm(); |
| 48 | } |
| 49 | |
Franklin S. Cooper Jr | cc76fc4 | 2014-06-27 13:31:14 -0500 | [diff] [blame] | 50 | static inline int board_is_evm_14_or_later(void) |
| 51 | { |
Madan Srinivas | 3623502 | 2016-05-19 19:10:48 -0500 | [diff] [blame] | 52 | return board_is_evm() && strncmp("1.4", board_ti_get_rev(), 3) <= 0; |
Franklin S. Cooper Jr | cc76fc4 | 2014-06-27 13:31:14 -0500 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | static inline int board_is_evm_12_or_later(void) |
| 56 | { |
Madan Srinivas | 3623502 | 2016-05-19 19:10:48 -0500 | [diff] [blame] | 57 | return board_is_evm() && strncmp("1.2", board_ti_get_rev(), 3) <= 0; |
Franklin S. Cooper Jr | cc76fc4 | 2014-06-27 13:31:14 -0500 | [diff] [blame] | 58 | } |
| 59 | |
Lokesh Vutla | faa680f | 2013-07-30 11:36:27 +0530 | [diff] [blame] | 60 | void enable_uart0_pin_mux(void); |
| 61 | void enable_board_pin_mux(void); |
Lokesh Vutla | 42c213a | 2013-12-10 15:02:20 +0530 | [diff] [blame] | 62 | void enable_i2c0_pin_mux(void); |
Lokesh Vutla | faa680f | 2013-07-30 11:36:27 +0530 | [diff] [blame] | 63 | #endif |