]> git.sur5r.net Git - u-boot/commitdiff
arm: lager: Add support reset function
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Thu, 10 Oct 2013 00:13:41 +0000 (09:13 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Wed, 18 Dec 2013 07:35:45 +0000 (16:35 +0900)
The lager board uses I2C for reset.

ned-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>

board/renesas/lager/lager.c
include/configs/lager.h

index ba923d520f2d9ae64e5d9f74dac78dcc70113a96..cdd5b32135785f6886ea4c29d2c35ebd45716d7f 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/gpio.h>
 #include <asm/arch/rmobile.h>
 #include <miiphy.h>
+#include <i2c.h>
 #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);
 }
index dd61ca0dc90d56a7c775d22d0cf97b0f9ca3743b..893282540e3943ad20cb659c161f67dc1f7a8171 100644 (file)
 #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 */