ls1046ardb: cpld: add API for selecting core volt
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Fri, 9 Dec 2016 08:08:59 +0000 (16:08 +0800)
committerYork Sun <york.sun@nxp.com>
Wed, 18 Jan 2017 17:29:02 +0000 (09:29 -0800)
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/ls1046ardb/cpld.c
board/freescale/ls1046ardb/cpld.h

index 81a646e28ca02503c88ba5ac568f5166b2ca4b36..c0500f474f6b2559f605130678140ac4e5f3b8b5 100644 (file)
@@ -82,6 +82,15 @@ void cpld_set_sd(void)
 
        CPLD_WRITE(system_rst, 1);
 }
+
+void cpld_select_core_volt(bool en_0v9)
+{
+       u8 reg17 = en_0v9;
+
+       CPLD_WRITE(vdd_en, 1);
+       CPLD_WRITE(vdd_sel, reg17);
+}
+
 #ifdef DEBUG
 static void cpld_dump_regs(void)
 {
index 458da7e8926a38f1652663f1bd00d16e85db227b..f6a1a61e61fece033c2ede4a8ad85f6c81bd3710 100644 (file)
@@ -35,6 +35,7 @@ struct cpld_data {
 u8 cpld_read(unsigned int reg);
 void cpld_write(unsigned int reg, u8 value);
 void cpld_rev_bit(unsigned char *value);
+void cpld_select_core_volt(bool en_0v9);
 
 #define CPLD_READ(reg) cpld_read(offsetof(struct cpld_data, reg))
 #define CPLD_WRITE(reg, value)  \