aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLokesh Vutla2017-04-04 23:19:48 -0500
committerVishal Mahaveer2017-04-13 09:26:44 -0500
commit5add3416563848784ebee445dbeb61de440010f4 (patch)
treea18a9aaf3bb611f5c069bb596421938ee59bfecb
parentac9b0c4edead4f846ea38cdca5c9905c4be900a0 (diff)
downloadu-boot-5add3416563848784ebee445dbeb61de440010f4.tar.gz
u-boot-5add3416563848784ebee445dbeb61de440010f4.tar.xz
u-boot-5add3416563848784ebee445dbeb61de440010f4.zip
board: dra71: Fix selection of OPPs
As per the DM[1] Dated June 2016–Revised February 2017, Table 5-3, DRA71 supports the following OPPs for various voltage domains: VDD_MPU: OPP_NOM VDD_CORE: OPP_NOM VDD_GPU: OPP_NOM VDD_DSPEVE: OPP_NOM, OPP_HIGH VDD_IVA: OPP_NOM, OPP_HIGH This patch add support for selection of the above OPPs instead of using OPP_NOM for all voltage domains. [1] http://www.ti.com/lit/ds/symlink/dra718.pdf Reported-by: Vishal Mahaveer <vishalm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
-rw-r--r--board/ti/dra7xx/evm.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index c3a015f6b8..aac2ec8a18 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -501,27 +501,44 @@ int get_voltrail_opp(int rail_offset)
501{ 501{
502 int opp; 502 int opp;
503 503
504 /*
505 * DRA71x supports only OPP_NOM.
506 */
507 if (board_is_dra71x_evm())
508 return OPP_NOM;
509
510 switch (rail_offset) { 504 switch (rail_offset) {
511 case VOLT_MPU: 505 case VOLT_MPU:
512 opp = DRA7_MPU_OPP; 506 opp = DRA7_MPU_OPP;
507 /* DRA71x supports only OPP_NOM for MPU */
508 if (board_is_dra71x_evm())
509 opp = OPP_NOM;
513 break; 510 break;
514 case VOLT_CORE: 511 case VOLT_CORE:
515 opp = DRA7_CORE_OPP; 512 opp = DRA7_CORE_OPP;
513 /* DRA71x supports only OPP_NOM for CORE */
514 if (board_is_dra71x_evm())
515 opp = OPP_NOM;
516 break; 516 break;
517 case VOLT_GPU: 517 case VOLT_GPU:
518 opp = DRA7_GPU_OPP; 518 opp = DRA7_GPU_OPP;
519 /* DRA71x supports only OPP_NOM for GPU */
520 if (board_is_dra71x_evm())
521 opp = OPP_NOM;
519 break; 522 break;
520 case VOLT_EVE: 523 case VOLT_EVE:
521 opp = DRA7_DSPEVE_OPP; 524 opp = DRA7_DSPEVE_OPP;
525 /*
526 * DRA71x does not support OPP_OD for EVE.
527 * If OPP_OD is selected by menuconfig, fallback
528 * to OPP_NOM.
529 */
530 if (board_is_dra71x_evm() && opp == OPP_OD)
531 opp = OPP_NOM;
522 break; 532 break;
523 case VOLT_IVA: 533 case VOLT_IVA:
524 opp = DRA7_IVA_OPP; 534 opp = DRA7_IVA_OPP;
535 /*
536 * DRA71x does not support OPP_OD for IVA.
537 * If OPP_OD is selected by menuconfig, fallback
538 * to OPP_NOM.
539 */
540 if (board_is_dra71x_evm() && opp == OPP_OD)
541 opp = OPP_NOM;
525 break; 542 break;
526 default: 543 default:
527 opp = OPP_NOM; 544 opp = OPP_NOM;