diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2017-05-13 15:57:48 +0200 |
---|---|---|
committer | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2017-05-22 04:38:27 +0900 |
commit | fe2e8ff955ad18a7f7f26d3d56ebaa96167139b6 (patch) | |
tree | e54693fe4809a0f2ed947ed54017bacf5a6cbbed /board | |
parent | 90e53f8b455e762c04cb154a381c8f1513af847f (diff) | |
download | u-boot-fe2e8ff955ad18a7f7f26d3d56ebaa96167139b6.tar.gz |
ARM: rmobile: salvator-x: Add DVFS and PMIC support
Add support for rebooting the board using the ROHM BD9571MWV I2C PMIC,
but keep the CPU reboot option as a fallback.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/renesas/salvator-x/salvator-x.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c index 38ff99a17c..acc541df0c 100644 --- a/board/renesas/salvator-x/salvator-x.c +++ b/board/renesas/salvator-x/salvator-x.c @@ -50,6 +50,7 @@ void s_init(void) #define TMU1_MSTP124 BIT(24) /* non-secure */ #define SCIF2_MSTP310 BIT(10) /* SCIF2 */ #define ETHERAVB_MSTP812 BIT(12) +#define DVFS_MSTP926 BIT(26) #define SD0_MSTP314 BIT(14) #define SD1_MSTP313 BIT(13) #define SD2_MSTP312 BIT(12) /* either MMC0 */ @@ -78,6 +79,10 @@ int board_early_init_f(void) writel(0, SD2CKCR); writel(0, SD3CKCR); +#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH) + /* DVFS for reset */ + mstp_clrbits_le32(MSTPSR9, SMSTPCR9, DVFS_MSTP926); +#endif return 0; } @@ -235,8 +240,12 @@ const struct rmobile_sysinfo sysinfo = { void reset_cpu(ulong addr) { +#if defined(CONFIG_SYS_I2C) && defined(CONFIG_SYS_I2C_SH) + i2c_reg_write(CONFIG_SYS_I2C_POWERIC_ADDR, 0x20, 0x80); +#else /* only CA57 ? */ writel(RST_CODE, RST_CA57RESCNT); +#endif } static const struct sh_serial_platdata serial_platdata = { |