diff options
author | Dan Murphy <dmurphy@ti.com> | 2013-07-11 13:10:28 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-07-30 09:21:42 -0400 |
commit | fdce7b633a1de24456226b18527cc7900c34282a (patch) | |
tree | e7c96da11da04efd0db7ae1bb4ac2399f84829e8 /board/ti/omap5_uevm/evm.c | |
parent | 61c1775f16ed122a07168545afbc1a04ece2bc22 (diff) | |
download | u-boot-imx-fdce7b633a1de24456226b18527cc7900c34282a.zip u-boot-imx-fdce7b633a1de24456226b18527cc7900c34282a.tar.gz u-boot-imx-fdce7b633a1de24456226b18527cc7900c34282a.tar.bz2 |
gpio: omap5-uevm: Configure the tca6424 gpio expander
Configure the tca6424 gpio expander
This allows use of the debug and tri color LEDs.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Diffstat (limited to 'board/ti/omap5_uevm/evm.c')
-rw-r--r-- | board/ti/omap5_uevm/evm.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index ea83e6c..2c00648 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -10,6 +10,7 @@ #include <palmas.h> #include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> +#include <tca642x.h> #include "mux_data.h" @@ -20,6 +21,25 @@ const struct omap_sysinfo sysinfo = { }; /** + * @brief tca642x_init - uEVM default values for the GPIO expander + * input reg, output reg, polarity reg, configuration reg + */ +struct tca642x_bank_info tca642x_init[] = { + { .input_reg = 0x00, + .output_reg = 0x04, + .polarity_reg = 0x00, + .configuration_reg = 0x80 }, + { .input_reg = 0x00, + .output_reg = 0x00, + .polarity_reg = 0x00, + .configuration_reg = 0xff }, + { .input_reg = 0x00, + .output_reg = 0x00, + .polarity_reg = 0x00, + .configuration_reg = 0x40 }, +}; + +/** * @brief board_init * * @return 0 @@ -30,6 +50,8 @@ int board_init(void) gd->bd->bi_arch_number = MACH_TYPE_OMAP5_SEVM; gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */ + tca642x_set_inital_state(CONFIG_SYS_I2C_TCA642X_ADDR, tca642x_init); + return 0; } |