Commit 1eed8270 authored by Peng Fan's avatar Peng Fan Committed by Jason Liu
Browse files

MLK-15957 imx8m: evk: default enable tzc380



Default enable TZC380.
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
parent da908406
......@@ -39,6 +39,18 @@ int timer_init(void)
return 0;
}
void enable_tzc380(void)
{
u32 val;
/* Enable TZASC and lock setting */
val = readl(IOMUXC_GPR10);
val |= GPR_TZASC_EN;
writel(val, IOMUXC_GPR10);
val |= GPR_TZASC_EN_LOCK;
writel(val, IOMUXC_GPR10);
}
void set_wdog_reset(struct wdog_regs *wdog)
{
u32 reg = readw(&wdog->wcr);
......
......@@ -127,6 +127,11 @@
#define IOMUXC_GPR6 (IOMUXC_GPR_BASE_ADDR + 0x18)
#define IOMUXC_GPR7 (IOMUXC_GPR_BASE_ADDR + 0x1c)
#define IOMUXC_GPR8 (IOMUXC_GPR_BASE_ADDR + 0x20)
#define IOMUXC_GPR9 (IOMUXC_GPR_BASE_ADDR + 0x24)
#define IOMUXC_GPR10 (IOMUXC_GPR_BASE_ADDR + 0x28)
#define GPR_TZASC_EN (1 << 0)
#define GPR_TZASC_EN_LOCK (1 << 16)
#define SCTR_BASE_ADDR 0x306C0000
#define CNTCR_OFF 0x00
......
......@@ -7,3 +7,4 @@
#include <asm/imx-common/sys_proto.h>
void set_wdog_reset(struct wdog_regs *wdog);
void enable_tzc380(void);
......@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <asm/imx-common/iomux-v3.h>
#include <asm/arch/ddr_memory_map.h>
#include <asm/arch/sys_proto.h>
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
#include "../common/pfuze.h"
......@@ -29,6 +30,8 @@ extern struct i2c_pads_info i2c_pad_info1;
void spl_board_init(void)
{
enable_tzc380();
/* Adjust pmic voltage to 1.0V for 800M */
setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment