summaryrefslogtreecommitdiff
path: root/board/bds/board.h
blob: 7a32a6f60293651c77f92c3064ca7a835a7fdaa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/* Stellaris EKB-LM4F-EAC board configuration */

#ifndef __BOARD_H
#define __BOARD_H

/* Debug features */
#define CONFIG_PANIC_HELP
#define CONFIG_PANIC_NEW_STACK
#define CONFIG_ASSERT_HELP

/* Optional features */
#define CONFIG_CONSOLE_CMDHELP
#define CONFIG_RW_B  /* RW firmware A *and* B */
#define CONFIG_SYSTEM_UNLOCKED  /* Allow dangerous commands */
#define CONFIG_VBOOT
#define CONFIG_VBOOT_SIG

#ifndef __ASSEMBLER__

enum adc_channel
{
	ADC_CH_EC_TEMP = 0,  /* EC internal die temperature in degrees K. */
	ADC_CH_BDS_POT,      /* BDS pot input. */
	ADC_CH_COUNT
};

/* I2C ports */
#define I2C_PORT_LIGHTBAR 5  // port 5 / PA6:7 on link, but PG6:7 on badger
/* Number of I2C ports used */
#define I2C_PORTS_USED 1

/* GPIO signal list */
enum gpio_signal {
	GPIO_RECOVERYn = 0,       /* Recovery signal from DOWN button */
	GPIO_DEBUG_LED,           /* Debug LED */
	/* Signals which aren't implemented on BDS but we'll emulate anyway, to
	 * make it more convenient to debug other code. */
	GPIO_WRITE_PROTECT,       /* Write protect input */

	/* Number of GPIOs; not an actual GPIO */
	GPIO_COUNT
};

/* Target value for BOOTCFG.  This currently toggles the polarity bit without
 * enabling the boot loader, simply to prove we can program it. */
#define BOOTCFG_VALUE 0xfffffdfe

void configure_board(void);

#endif /* !__ASSEMBLER__ */

#endif /* __BOARD_H */