board: ti: am335x: Fix scale_vcore for beaglebones
PATCH 1/1 board: ti: am335x: Fix scale_vcore for beaglebones
commit 0650798824 ("board: am335x: Introduce scale_vcores") updated voltages of each board based on efuse. It updated beagle bone specific voltages under the condition board_is_bone(). But this is true only for BeagleBoneWhite. Due to which voltages are not configured for BBB, BBW as wrong device is being probed.
So create a common function board_is_beaglebonex() which includes am335x based beagle family. Use this for updating voltages.
Also remove extra if condition for selecting voltages which is done later using a switch case and match usb current limit as before the commit 0650798824.
---
- I am running an overnight stress test on BBB.
board/ti/am335x/board.c | 15 ++++----------- board/ti/am335x/board.h | 5 +++++ 2 files changed, 9 insertions(+), 11 deletions(-)
board/ti/am335x/board.c +4 -11
@@ -343,14 +343,6 @@ static void scale_vcores_bone(int freq)if (board_is_bone_lt ()) freq =MPUPLL_M_1000 ; -if (freq ==MPUPLL_M_1000 ) { - usb_cur_lim =TPS65217_USB_INPUT_CUR_LIMIT_1800MA ; - mpu_vdd =TPS65217_DCDC_VOLT_SEL_1325MV ; - }else { - usb_cur_lim =TPS65217_USB_INPUT_CUR_LIMIT_1300MA ; - mpu_vdd =TPS65217_DCDC_VOLT_SEL_1275MV ; - } -switch (freq) {case MPUPLL_M_1000 : mpu_vdd =TPS65217_DCDC_VOLT_SEL_1325MV ;
@@ -358,15 +350,16 @@ static void scale_vcores_bone(int freq)break ;case MPUPLL_M_800 : mpu_vdd =TPS65217_DCDC_VOLT_SEL_1275MV ; - usb_cur_lim =TPS65217_USB_INPUT_CUR_LIMIT_1800MA ; + usb_cur_lim =TPS65217_USB_INPUT_CUR_LIMIT_1300MA ;break ;case MPUPLL_M_720 : mpu_vdd =TPS65217_DCDC_VOLT_SEL_1200MV ; - usb_cur_lim =TPS65217_USB_INPUT_CUR_LIMIT_1800MA ; + usb_cur_lim =TPS65217_USB_INPUT_CUR_LIMIT_1300MA ;break ;case MPUPLL_M_600 :case MPUPLL_M_500 :case MPUPLL_M_300 : +default : mpu_vdd =TPS65217_DCDC_VOLT_SEL_1100MV ; usb_cur_lim =TPS65217_USB_INPUT_CUR_LIMIT_1300MA ;break ;
@@ -469,7 +462,7 @@ void scale_vcores(void)gpi2c_init (); freq =am335x_get_efuse_mpu_max_freq (cdev); -if (board_is_bone ()) +if (board_is_beaglebonex ())scale_vcores_bone (freq);else scale_vcores_generic (freq);
board/ti/am335x/board.h +5 -0
@@ -39,6 +39,11 @@ static inline int board_is_bbg1(void)return board_is_bone_lt () && !strncmp (board_ti_get_rev (),"BBG1" ,4 ); } +static inline int board_is_beaglebonex (void ) +{ +return board_is_bone () ||board_is_bone_lt () ||board_is_bbg1 (); +} +static inline int board_is_evm_sk (void ) {return board_ti_is ("A335X_SK" );
Signature · 1 line
2.11.0
PATCH 1/1 board: ti: am335x: Fix scale_vcore for beaglebones
Quoted 9 lines · On Sat, 10 Jun 2017 13:22:56 +0530 Lokesh Vutla <[email protected]> wrote:
commit 0650798824 ("board: am335x: Introduce
scale_vcores") updated voltages of each board based on efuse. It updated beagle bone specific voltages under the conditionboard_is_bone(). But this is true only for BeagleBoneWhite. Due to which voltages are not configured for BBB, BBW as wrong device is being probed.So create a common function
board_is_beaglebonex()which includes am335x based beagle family. Use this for updating voltages.
Quoted 7 lines
Also remove extra if condition for selecting voltages which is done later using a switch case and match usb current limit as before the commit 0650798824.
Fixes 0650798824 ("board: am335x: Introduce scale_vcores")Reported-by Emmanuel Vadot <[email protected]>Signed-off-by Lokesh Vutla <[email protected]>
Thanks, my BBB works again now :)
Signature · 1 line
Emmanuel Vadot <[email protected]> <[email protected]>
Quoted 9 lines · Lokesh Vutla
commit 0650798824 ("board: am335x: Introduce
scale_vcores") updated voltages of each board based on efuse. It updated beagle bone specific voltages under the conditionboard_is_bone(). But this is true only for BeagleBoneWhite. Due to which voltages are not configured for BBB, BBW as wrong device is being probed.So create a common function
board_is_beaglebonex()which includes am335x based beagle family. Use this for updating voltages.
Quoted 7 lines
Also remove extra if condition for selecting voltages which is done later using a switch case and match usb current limit as before the commit 0650798824.
Fixes 0650798824 ("board: am335x: Introduce scale_vcores")Reported-by Emmanuel Vadot <[email protected]>Signed-off-by Lokesh Vutla <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170612/57538308/attachment.sig>