diff options
author | Randall Spangler <rspangler@chromium.org> | 2011-12-07 18:51:09 +0000 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2011-12-07 19:10:02 +0000 |
commit | bdf7da5b082f6d18dd27f1e5d8cca0b12154a28c (patch) | |
tree | 6f14312a6cc70d056efc2bede8728c0868266719 /board | |
parent | abe5786058f4b60dc6d30e7d7c964aae850caa1f (diff) | |
download | chrome-ec-bdf7da5b082f6d18dd27f1e5d8cca0b12154a28c.tar.gz |
Initial sources import 1/3
source files mainly done by Randall.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Change-Id: Iaff83a842b17f3350fb6f2a3f1597ad4c29bd12a
Diffstat (limited to 'board')
-rw-r--r-- | board/bds/board.h | 50 | ||||
-rw-r--r-- | board/link/board.h | 26 |
2 files changed, 76 insertions, 0 deletions
diff --git a/board/bds/board.h b/board/bds/board.h new file mode 100644 index 0000000000..d485980b8f --- /dev/null +++ b/board/bds/board.h @@ -0,0 +1,50 @@ +/* Stellaris EKB-LM4F-EAC board configuration */ + +#ifndef __BOARD_H +#define __BOARD_H + +/* 66.667 Mhz clock frequency */ +#define CPU_CLOCK 66666667 + +/* Fan PWM channels */ +#define FAN_CH_KBLIGHT 1 /* Keyboard backlight */ +#define FAN_CH_POWER_LED 3 /* Power adapter LED */ +#define FAN_CH_CPU 4 /* CPU fan */ + +/* LPC channels */ +#define LPC_CH_KERNEL 0 /* Kernel commands */ +#define LPC_CH_PORT80 1 /* Port 80 debug output */ +#define LPC_CH_CMD_DATA 2 /* Data for kernel/user-mode commands */ +#define LPC_CH_KEYBOARD 3 /* 8042 keyboard emulation */ +#define LPC_CH_USER 4 /* User-mode commands */ +#define LPC_CH_COMX 7 /* UART emulation */ +/* LPC pool offsets */ +#define LPC_POOL_OFFS_KERNEL 0 /* Kernel commands - 0=in, 1=out */ +#define LPC_POOL_OFFS_PORT80 4 /* Port 80 - 4=in, 5=out */ +#define LPC_POOL_OFFS_COMX 8 /* UART emulation range - 8-15 */ +#define LPC_POOL_OFFS_KEYBOARD 16 /* Keyboard - 16=in, 17=out */ +#define LPC_POOL_OFFS_CMD_DATA 512 /* Data range for commands - 512-1023 */ +/* LPC pool data pointers */ +#define LPC_POOL_KERNEL (LM4_LPC_LPCPOOL + LPC_POOL_OFFS_KERNEL) +#define LPC_POOL_PORT80 (LM4_LPC_LPCPOOL + LPC_POOL_OFFS_PORT80) +#define LPC_POOL_COMX (LM4_LPC_LPCPOOL + LPC_POOL_OFFS_COMX) +#define LPC_POOL_KEYBOARD (LM4_LPC_LPCPOOL + LPC_POOL_OFFS_KEYBOARD) +#define LPC_POOL_CMD_DATA (LM4_LPC_LPCPOOL + LPC_POOL_OFFS_CMD_DATA) + +/* ADC inputs */ +/* TODO: really just need a lookup table for channels to inputs */ +#define ADC_IN_POT 0 /* Turn POT on badger board */ + +/* I2C ports */ +#define I2C_PORT_BATTERY 5 // port 0 / PB2:3 on Link, open on badger +#define I2C_PORT_CHARGER 5 // port 1 / PA6:7 on Link, user LED on badger +#define I2C_PORT_THERMAL 5 // port 5 / PB6:7 on link, but PG6:7 on badger +/* I2C port speeds in kbps */ +#define I2C_SPEED_BATTERY 100 +#define I2C_SPEED_CHARGER 100 +#define I2C_SPEED_THERMAL 400 /* TODO: TMP007 supports 3.4Mbps + operation; use faster speed? */ + +void configure_board(void); + +#endif /* __BOARD_H */ diff --git a/board/link/board.h b/board/link/board.h new file mode 100644 index 0000000000..45ea36833e --- /dev/null +++ b/board/link/board.h @@ -0,0 +1,26 @@ +/* configuration for Link mainboard */ + +#ifndef __BOARD_H +#define __BOARD_H + +/* 66.667 Mhz clock frequency */ +#define CPU_CLOCK 66666667 + +/* Fan PWM channels */ +#define FAN_CH_CPU 0 /* CPU fan */ +#define FAN_CH_KBLIGHT 1 /* Keyboard backlight */ +#define FAN_CH_POWER_LED 5 /* Power adapter LED */ + +/* I2C ports */ +#define I2C_PORT_BATTERY 0 +#define I2C_PORT_CHARGER 1 +#define I2C_PORT_THERMAL 5 +/* I2C port speeds in kbps */ +#define I2C_SPEED_BATTERY 100 +#define I2C_SPEED_CHARGER 100 +#define I2C_SPEED_THERMAL 400 /* TODO: TMP007 supports 3.4Mbps + operation; use faster speed? */ + +void configure_board(void); + +#endif /* __BOARD_H */ |