[U-Boot] [PATCH 4/4] arm: lager: Add support reset function
Nobuhiro Iwamatsu
nobuhiro.iwamatsu.yj at renesas.com
Wed Dec 11 09:07:30 CET 2013
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
---
board/renesas/lager/lager.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/board/renesas/lager/lager.c b/board/renesas/lager/lager.c
index 8447fe1..7d11c95 100644
--- a/board/renesas/lager/lager.c
+++ b/board/renesas/lager/lager.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <netdev.h>
#include <miiphy.h>
+#include <i2c.h>
#include <asm/processor.h>
#include <asm/mach-types.h>
#include <asm/io.h>
@@ -352,6 +353,15 @@ int board_late_init(void)
return 0;
}
+#define I2C_POWERIC_CHIP 0x58 /* da9063 */
+#define I2C_POWERIC_ADDR 0x13
void reset_cpu(ulong addr)
{
+ u8 val;
+
+ i2c_set_bus_num(3); /* PowerIC connected to ch3 */
+ i2c_init(400000, 0);
+ i2c_read(I2C_POWERIC_CHIP, I2C_POWERIC_ADDR, 1, &val, 1);
+ val |= 0x02;
+ i2c_write(I2C_POWERIC_CHIP, I2C_POWERIC_ADDR, 1, &val, 1);
}
--
1.8.5
More information about the U-Boot
mailing list