summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>2016-12-09 16:09:01 +0800
committerYork Sun <york.sun@nxp.com>2017-01-18 09:29:13 -0800
commitdccef2ec01cdf5403d78223fd60a4ccd761ae6b0 (patch)
treeef8a68d018e6361d5e2fe4bde2065fb0e67a8968 /board/freescale
parent031acdbae89515371f794d01df819b490ff7ca9c (diff)
ls1046ardb: Add support power initialization
Add the chip power supply voltage initialization on LS1046ARDB. Add function power_init_board(), and it will initialize the PMIC and call the chip power initialization function. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/ls1046ardb/ls1046ardb.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c
index 585c807818..33a58cf440 100644
--- a/board/freescale/ls1046ardb/ls1046ardb.c
+++ b/board/freescale/ls1046ardb/ls1046ardb.c
@@ -19,6 +19,7 @@
#include <fm_eth.h>
#include <fsl_csu.h>
#include <fsl_esdhc.h>
+#include <power/mc34vr500_pmic.h>
#include "cpld.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -87,6 +88,39 @@ int board_init(void)
return 0;
}
+int board_setup_core_volt(u32 vdd)
+{
+ bool en_0v9;
+
+ en_0v9 = (vdd == 900) ? true : false;
+ cpld_select_core_volt(en_0v9);
+
+ return 0;
+}
+
+int get_serdes_volt(void)
+{
+ return mc34vr500_get_sw_volt(SW4);
+}
+
+int set_serdes_volt(int svdd)
+{
+ return mc34vr500_set_sw_volt(SW4, svdd);
+}
+
+int power_init_board(void)
+{
+ int ret;
+
+ ret = power_mc34vr500_init(0);
+ if (ret)
+ return ret;
+
+ setup_chip_volt();
+
+ return 0;
+}
+
void config_board_mux(void)
{
#ifdef CONFIG_HAS_FSL_XHCI_USB