Skip to content
Snippets Groups Projects
Commit c24a4e6c authored by Nicola Sparnacci's avatar Nicola Sparnacci Committed by Michele Cirinei
Browse files

[SANTINO][PMIC] Force DDR voltage to 1.35V

Needed because some boards come with PMIC pre-programmed for 1.5V.

Ideally this should be done before initializing the DRAM but, due to
lack of internal SRAM of the MCU, requires a bigger effort to be
implemented.
parent 07497a99
No related branches found
No related tags found
1 merge request!145[SANTINO] Add support to Santino board
......@@ -35,6 +35,7 @@
#include <input.h>
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
#include <power/pfuze3000_pmic.h>
#include "../common/pfuze.h"
#include <usb.h>
#include <usb/ehci-ci.h>
......@@ -82,7 +83,7 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_PUS_47K_UP | PAD_CTL_SPEED_LOW | \
PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
#define PFUZE3000_SW3_REG_to_MVOLTS(x) ((x) * 500 + 9000)
#define I2C_PMIC 1
#define I2C_PAD MUX_PAD_CTRL(I2C_PAD_CTRL)
......@@ -333,6 +334,17 @@ int power_init_board(void)
if (ret < 0)
return ret;
/* set DDR_1_5V to 1.350V */
reg = pmic_reg_read(dev, PFUZE3000_SW3VOLT);
reg &= ~0x0f;
reg |= PFUZE3000_SW3_SETP(13500);
ret = pmic_reg_write(dev, PFUZE3000_SW3VOLT, reg);
reg = pmic_reg_read(dev, PFUZE3000_SW3VOLT);
if (ret)
return ret;
printf("DDR3 Voltage: %u mV\n", PFUZE3000_SW3_REG_to_MVOLTS(reg));
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment