BeagleBone Black DDR3 RAM Voltage levels

Hello,
I’ve been working to create an industrial temperature derivative of the BBB(BeagleBoneBlack). In doing so I’ve noticed that the DDR3 SDRAM part numbers that are used are DDR3L or 1.35V parts. However, the design uses the TPS65217C device which automatically sets the DDR3 voltage to 1.5 volts upon power up. After going through the Uboot source, I found that software does not change the DCDC1 from it’s default value of 1.5V.

I believe the datasheet for the Micron part says that even though it supports DDR3L 1.35V mode, it can also run at 1.5V range and will be in DDR3 mode.

Was this by design? Mostly I’m just looking for a “Yep, we meant to do that and it’s A-OK”

SW is supposed to set it to 1.35V. Sounds like it got dropped somewhere because initially it did… It was designed this way because when it was designed, the PMIC defaulted to 1.5V. Since the design there is a TPS65217D that was release later that supports the 1.35V initial setting.

Yep, I meant to do that and Yes it is OK, however I prefer the SW folks fix UBoot, if it isn’t too much trouble.

Gerald

It should be set here:

http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/am335x/board.c;h=0739e6021a21e71d7d0f5c840b793ce7fdf98fae;hb=HEAD#l275

269 /*
270 * Increase USB current limit to 1300mA or 1800mA and set
271 * the MPU voltage controller as needed.
272 */
273 if (dpll_mpu_opp100.m == MPUPLL_M_1000) {
274 usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
275 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
276 } else {
277 usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
278 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
279 }

But that only happens if you have the "beaglebone black" header in eeprom:

262 /*
263 * Override what we have detected since we know if we have
264 * a Beaglebone Black it supports 1GHz.
265 */
266 if (board_is_bone_lt(&header))

So you'll have to override that check.

Regards,

Ahh. Correct so that needs to be added to the EEPROM to work or a custom UBoot created for non conforming boards, those without EEPROM or EEPROM with different information in the EEPROM.

Thanks Robert for checking!

Gerald
.

Note that the question was about DCDC1 and DDR voltage not DCDC2/3 (CORE and MPU) voltage. I don’t know what initial bring-up U-Boot was whacking DCDC1 but it never reached the rest of the world so it’s more a happy accident that should be corrected (and wouldn’t be too hard to do, if anyone out there is looking for a reason to get their feet wet ).

SW is supposed to set it to 1.35V. Sounds like it got dropped somewhere
because initially it did… It was designed this way because when it was
designed, the PMIC defaulted to 1.5V. Since the design there is a TPS65217D
that was release later that supports the 1.35V initial setting.

It should be set here:

http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/am335x/board.c;h=0739e6021a21e71d7d0f5c840b793ce7fdf98fae;hb=HEAD#l275

269 /*
270 * Increase USB current limit to 1300mA or 1800mA and set
271 * the MPU voltage controller as needed.
272 */
273 if (dpll_mpu_opp100.m == MPUPLL_M_1000) {
274 usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
275 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
276 } else {
277 usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
278 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
279 }

But that only happens if you have the “beaglebone black” header in eeprom:

262 /*
263 * Override what we have detected since we know if we have
264 * a Beaglebone Black it supports 1GHz.
265 */
266 if (board_is_bone_lt(&header))

So you’ll have to override that check.

Note that the question was about DCDC1 and DDR voltage not DCDC2/3 (CORE and MPU) voltage. I don’t know what initial bring-up U-Boot was whacking DCDC1 but it never reached the rest of the world so it’s more a happy accident that should be corrected (and wouldn’t be too hard to do, if anyone out there is looking for a reason to get their feet wet ).

Yeah, I was looking for DCDC1 and couldn’t find it, so I’m working on adding it now. Not sure how quick I’ll get it posted, so I wouldn’t mind someone else chiming in with the fix.

Well, the original v2013.04 patchset can be seen here:

https://github.com/beagleboard/meta-beagleboard/tree/master/common-bsp/recipes-bsp/u-boot/u-boot-denx

The only thing that touches the pmic, is this hack:

https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recipes-bsp/u-boot/u-boot-denx/0004-beaglebone-HACK-raise-USB-current-limit.patch

I don't have my tps decoder ring, so i'm not sure if that address is
more then just the usb current setting..

Regards,

Here's a fix for the dts..

debian@beaglebone:/opt/source/dtb-3.14-ti/src/arm$ git diff am335x-boneblack.dts
diff --git a/src/arm/am335x-boneblack.dts b/src/arm/am335x-boneblack.dts
index d594da5..c1420f3 100644
--- a/src/arm/am335x-boneblack.dts
+++ b/src/arm/am335x-boneblack.dts
@@ -26,6 +26,15 @@
        pinctrl-0 = <&clkout2_pin>;
};

+&dcdc1_reg {
+ /* VDD_DDR3 voltage 1.35V */
+ regulator-name = "vdd_ddr3";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-boot-on;
+ regulator-always-on;
+};

Here's a fix for the dts..

debian@beaglebone:/opt/source/dtb-3.14-ti/src/arm$ git diff am335x-boneblack.dts
diff --git a/src/arm/am335x-boneblack.dts b/src/arm/am335x-boneblack.dts
index d594da5..c1420f3 100644
--- a/src/arm/am335x-boneblack.dts
+++ b/src/arm/am335x-boneblack.dts
@@ -26,6 +26,15 @@
        pinctrl-0 = <&clkout2_pin>;
};

+&dcdc1_reg {
+ /* VDD_DDR3 voltage 1.35V */
+ regulator-name = "vdd_ddr3";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-boot-on;
+ regulator-always-on;
+};
+
#include "am335x-boneblack-emmc.dtsi"

/* spi0: */

debian@beaglebone:/opt/source/dtb-3.14-ti/src/arm$ dmesg | grep vdd
[ 3.216522] vdd_ddr3: 1350 mV
[ 3.219877] vdd_mpu: 925 <--> 1375 mV at 1325 mV
[ 3.221770] vdd_core: 925 <--> 1150 mV at 1125 mV

and u-boot (off head)

voodoo@hades:/opt/github/u-boot$ git diff
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 0739e60..6b6dea0 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -300,6 +300,15 @@ void am33xx_spl_board_init(void)
                        return;
                }

+ /* Set DCDC1 (DDR3) to 1.35V for Beaglebone Black. */
+ if (board_is_bone_lt(&header)) {
+ if (tps65217_voltage_update(TPS65217_DEFDCDC1,

SW is supposed to set it to 1.35V. Sounds like it got dropped somewhere
because initially it did… It was designed this way because when it was
designed, the PMIC defaulted to 1.5V. Since the design there is a
TPS65217D
that was release later that supports the 1.35V initial setting.

It should be set here:

http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/am335x/board.c;h=0739e6021a21e71d7d0f5c840b793ce7fdf98fae;hb=HEAD#l275

269 /*
270 * Increase USB current limit to 1300mA or 1800mA and
set
271 * the MPU voltage controller as needed.
272 */
273 if (dpll_mpu_opp100.m == MPUPLL_M_1000) {
274 usb_cur_lim =
TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
275 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
276 } else {
277 usb_cur_lim =
TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
278 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
279 }

But that only happens if you have the “beaglebone black” header in eeprom:

262 /*
263 * Override what we have detected since we know if we
have
264 * a Beaglebone Black it supports 1GHz.
265 */
266 if (board_is_bone_lt(&header))

So you’ll have to override that check.

Note that the question was about DCDC1 and DDR voltage not DCDC2/3 (CORE and
MPU) voltage. I don’t know what initial bring-up U-Boot was whacking DCDC1
but it never reached the rest of the world so it’s more a happy accident
that should be corrected (and wouldn’t be too hard to do, if anyone out
there is looking for a reason to get their feet wet ).

Well, the original v2013.04 patchset can be seen here:

https://github.com/beagleboard/meta-beagleboard/tree/master/common-bsp/recipes-bsp/u-boot/u-boot-denx

The only thing that touches the pmic, is this hack:

https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recipes-bsp/u-boot/u-boot-denx/0004-beaglebone-HACK-raise-USB-current-limit.patch

I don’t have my tps decoder ring, so i’m not sure if that address is
more then just the usb current setting…

I believe the equivalent hack to set DCDC1 to 1.35V is

+/* 0x24 is the address of the PMIC /
+/
0x0b is the password register /
+/
0x0e is the DEFDCDC1 register /
+/
0x73 is the password (register 0x0e ^ 0x7d) /
+/
0x12 sets the DCDC1 to 1.35V /
+/
Sequence must be repeated twice for password protection */
#define CONFIG_BOOTCOMMAND \

  • "i2c mw 0x24 0x0b 0x73; " \
  • "i2c mw 0x24 0x0e 0x12; " \
  • "i2c mw 0x24 0x0b 0x73; " \
  • "i2c mw 0x24 0x0e 0x12; " \

I’m just about to try this out, but don’t mind if someone beats me to it. :slight_smile:

Is there an easy to access ddr3_vdd test point?

Regards,

>>
>> > SW is supposed to set it to 1.35V. Sounds like it got dropped
>> > somewhere
>> > because initially it did.. It was designed this way because when
it
>> > was
>> > designed, the PMIC defaulted to 1.5V. Since the design there is a
>> > TPS65217D
>> > that was release later that supports the 1.35V initial setting.
>>
>> It should be set here:
>>
>>
>>
>>
http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/am335x/board.c;h=0739
e6021a21e71d7d0f5c840b793ce7fdf98fae;hb=HEAD#l275
>>
>> 269 /*
>> 270 * Increase USB current limit to 1300mA or
1800mA
>> and
>> set
>> 271 * the MPU voltage controller as needed.
>> 272 */
>> 273 if (dpll_mpu_opp100.m == MPUPLL_M_1000) {
>> 274 usb_cur_lim =
>> TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
>> 275 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
>> 276 } else {
>> 277 usb_cur_lim =
>> TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
>> 278 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
>> 279 }
>>
>>
>> But that only happens if you have the "beaglebone black" header in
>> eeprom:
>>
>> 262 /*
>> 263 * Override what we have detected since we know
if
>> we
>> have
>> 264 * a Beaglebone Black it supports 1GHz.
>> 265 */
>> 266 if (board_is_bone_lt(&header))
>>
>> So you'll have to override that check.
>
>
> Note that the question was about DCDC1 and DDR voltage not DCDC2/3
(CORE
> and
> MPU) voltage. I don't know what initial bring-up U-Boot was whacking
> DCDC1
> but it never reached the rest of the world so it's more a happy
accident
> that should be corrected (and wouldn't be too hard to do, if anyone
out
> there is looking for a reason to get their feet wet ).

Well, the original v2013.04 patchset can be seen here:

https://github.com/beagleboard/meta-beagleboard/tree/master/common-bsp/r
ecipes-bsp/u-boot/u-boot-denx

The only thing that touches the pmic, is this hack:

https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/r
ecipes-bsp/u-boot/u-boot-denx/0004-beaglebone-HACK-raise-USB-current-lim
it.patch

I don't have my tps decoder ring, so i'm not sure if that address is
more then just the usb current setting..

I believe the equivalent hack to set DCDC1 to 1.35V is

+/* 0x24 is the address of the PMIC */
+/* 0x0b is the password register */
+/* 0x0e is the DEFDCDC1 register */
+/* 0x73 is the password (register 0x0e ^ 0x7d) */
+/* 0x12 sets the DCDC1 to 1.35V */
+/* Sequence must be repeated twice for password protection */
#define CONFIG_BOOTCOMMAND \
+ "i2c mw 0x24 0x0b 0x73; " \
+ "i2c mw 0x24 0x0e 0x12; " \
+ "i2c mw 0x24 0x0b 0x73; " \
+ "i2c mw 0x24 0x0e 0x12; " \

I'm just about to try this out, but don't mind if someone beats me to
it.
:slight_smile:

Is there an easy to access ddr3_vdd test point?

Probably the best place is L1 or R6 which is on the bottom of the board
close to the 5V connector

Regards,
John

So I got this to work via this sequence in the terminal..

i2c dev 0;
i2c mw 0x24 0x0b 0x73; /* Password unlock 1 */
i2c mw 0x24 0x0e 0x12; /* Set DCDC1 to 1.35V */
i2c mw 0x24 0x0b 0x73; /* Password unlock 2 */
i2c mw 0x24 0x0e 0x12; /* Set DCDC1 to 1.35V */
i2c mw 0x24 0x0b 0x6c; /* Password unlock 1 */
i2c mw 0x24 0x11 0x86; /* Apply DCDC changes */
i2c mw 0x24 0x0b 0x6c; /* Password unlock 2 */
i2c mw 0x24 0x11 0x86; /* Apply DCDC changes */

The L1/R6 test point is showing 1.35v

Regards,

SW is supposed to set it to 1.35V. Sounds like it got dropped
somewhere
because initially it did… It was designed this way because when it
was
designed, the PMIC defaulted to 1.5V. Since the design there is a
TPS65217D
that was release later that supports the 1.35V initial setting.

It should be set here:

http://git.denx.de/?p=u-boot.git;a=blob;f=board/ti/am335x/board.c;h=0739e6021a21e71d7d0f5c840b793ce7fdf98fae;hb=HEAD#l275

269 /*
270 * Increase USB current limit to 1300mA or 1800mA
and
set
271 * the MPU voltage controller as needed.
272 */
273 if (dpll_mpu_opp100.m == MPUPLL_M_1000) {
274 usb_cur_lim =
TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
275 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1325MV;
276 } else {
277 usb_cur_lim =
TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
278 mpu_vdd = TPS65217_DCDC_VOLT_SEL_1275MV;
279 }

But that only happens if you have the “beaglebone black” header in
eeprom:

262 /*
263 * Override what we have detected since we know if
we
have
264 * a Beaglebone Black it supports 1GHz.
265 */
266 if (board_is_bone_lt(&header))

So you’ll have to override that check.

Note that the question was about DCDC1 and DDR voltage not DCDC2/3 (CORE
and
MPU) voltage. I don’t know what initial bring-up U-Boot was whacking
DCDC1
but it never reached the rest of the world so it’s more a happy accident
that should be corrected (and wouldn’t be too hard to do, if anyone out
there is looking for a reason to get their feet wet ).

Well, the original v2013.04 patchset can be seen here:

https://github.com/beagleboard/meta-beagleboard/tree/master/common-bsp/recipes-bsp/u-boot/u-boot-denx

The only thing that touches the pmic, is this hack:

https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recipes-bsp/u-boot/u-boot-denx/0004-beaglebone-HACK-raise-USB-current-limit.patch

I don’t have my tps decoder ring, so i’m not sure if that address is
more then just the usb current setting…

I believe the equivalent hack to set DCDC1 to 1.35V is

+/* 0x24 is the address of the PMIC /
+/
0x0b is the password register /
+/
0x0e is the DEFDCDC1 register /
+/
0x73 is the password (register 0x0e ^ 0x7d) /
+/
0x12 sets the DCDC1 to 1.35V /
+/
Sequence must be repeated twice for password protection */
#define CONFIG_BOOTCOMMAND \

  • "i2c mw 0x24 0x0b 0x73; " \
  • "i2c mw 0x24 0x0e 0x12; " \
  • "i2c mw 0x24 0x0b 0x73; " \
  • "i2c mw 0x24 0x0e 0x12; " \

So I got this to work via this sequence in the terminal…

i2c dev 0;
i2c mw 0x24 0x0b 0x73; /* Password unlock 1 /
i2c mw 0x24 0x0e 0x12; /
Set DCDC1 to 1.35V /
i2c mw 0x24 0x0b 0x73; /
Password unlock 2 /
i2c mw 0x24 0x0e 0x12; /
Set DCDC1 to 1.35V /
i2c mw 0x24 0x0b 0x6c; /
Password unlock 1 /
i2c mw 0x24 0x11 0x86; /
Apply DCDC changes /
i2c mw 0x24 0x0b 0x6c; /
Password unlock 2 /
i2c mw 0x24 0x11 0x86; /
Apply DCDC changes */

The L1/R6 test point is showing 1.35v

Gerald noticed that the voltage went back to 1.5V after the kernel booted, so I’ve introduced a patch:
http://builds.beagleboard.org/builders/runtests/builds/36

I’ve boot tested it, but don’t have a meter with me to measure the voltage. I did, however, get confirmation from the kernel:

root@beaglebone:~# cat /sys/class/regulator/regulator.3/name
vdd_ddr
root@beaglebone:~# cat /sys/class/regulator/regulator.3/
device/ min_microvolts power/ suspend_disk_state type
max_microvolts name state suspend_mem_state uevent
microvolts num_users subsystem/ suspend_standby_state
root@beaglebone:~# cat /sys/class/regulator/regulator.3/microvolts
1350000

Hopefully we’ll see improved power and EMI conditions with this update!

Oh, don't do that in the common.. (that could cause some issues on the
old bone..)

I've got this version staged:

https://github.com/RobertCNelson/linux-dev/blob/master/patches/beaglebone/dts/0004-ARM-dts-am335x-boneblack-dcdc1-set-to-1.35v-for-ddr3.patch

Just heading out for a trip, so i won't be able to back port it ot the
3.14 tree till late sunday.. (got another lcd too..)

Regards,