]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ls1046ardb: Add support power initialization
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Fri, 9 Dec 2016 08:09:01 +0000 (16:09 +0800)
committerYork Sun <york.sun@nxp.com>
Wed, 18 Jan 2017 17:29:13 +0000 (09:29 -0800)
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>
arch/arm/Kconfig
board/freescale/ls1046ardb/ls1046ardb.c
include/configs/ls1046ardb.h

index 0ed36cded4860114ce1bb34ddd0af96e09706f06..80038ecb2472b71178a5dd3b3beb937dd9683867 100644 (file)
@@ -844,6 +844,7 @@ config TARGET_LS1046ARDB
        select ARMV8_MULTIENTRY
        select SUPPORT_SPL
        select DM_SPI_FLASH if DM_SPI
+       select POWER_MC34VR500
        help
          Support for Freescale LS1046ARDB platform.
          The LS1046A Reference Design Board (RDB) is a high-performance
index 585c807818550538165b1bba7ececb7850ddd289..33a58cf4404e223ca727c74756ce4139effdfc55 100644 (file)
@@ -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
index 8a8f942e0d867ee865428e695a0df293aedfb656..2bfd83c758f61efa8382f9899b21f25310effe87 100644 (file)
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  5
 #define I2C_RETIMER_ADDR                       0x18
 
+/* PMIC */
+#define CONFIG_POWER
+#ifdef CONFIG_POWER
+#define CONFIG_POWER_I2C
+#endif
+
 /*
  * Environment
  */