From: Nobuhiro Iwamatsu Date: Thu, 10 Oct 2013 00:13:41 +0000 (+0900) Subject: arm: lager: Add support reset function X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=b9986be0840d7945f760204bfb1a4b565ba235ff;p=u-boot.git arm: lager: Add support reset function The lager board uses I2C for reset. ned-off-by: Nobuhiro Iwamatsu --- diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c index ba923d520f..cdd5b32135 100644 --- a/board/renesas/lager/lager.c +++ b/board/renesas/lager/lager.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "qos.h" DECLARE_GLOBAL_DATA_PTR; @@ -354,4 +355,11 @@ int board_late_init(void) void reset_cpu(ulong addr) { + u8 val; + + i2c_set_bus_num(3); /* PowerIC connected to ch3 */ + i2c_init(400000, 0); + i2c_read(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1); + val |= 0x02; + i2c_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x13, 1, &val, 1); } diff --git a/include/configs/lager.h b/include/configs/lager.h index dd61ca0dc9..893282540e 100644 --- a/include/configs/lager.h +++ b/include/configs/lager.h @@ -159,6 +159,8 @@ #define CONFIG_SYS_RCAR_I2C3_SPEED 400000 #define CONFIF_SYS_RCAR_I2C_NUM_CONTROLLERS 4 +#define CONFIG_SYS_I2C_POWERIC_ADDR 0x58 /* da9063 */ + /* Board Clock */ #define CONFIG_BASE_CLK_FREQ 20000000u #define CONFIG_SH_TMU_CLK_FREQ (CONFIG_BASE_CLK_FREQ / 2) /* EXT / 2 */