From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lokesh Vutla Date: Sun, 16 Apr 2017 10:13:55 +0530 Subject: [U-Boot] [PATCH] board: dra71: Fix selection of OPPs Message-ID: <20170416044355.17629-1-lokeshvutla@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de As per the DM[1] Dated June 2016=E2=80=93Revised 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 Signed-off-by: Lokesh Vutla --- board/ti/dra7xx/evm.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index ae2d59da43..0984475d3b 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -456,27 +456,44 @@ int get_voltrail_opp(int rail_offset) { int opp; =20 - /* - * DRA71x supports only OPP_NOM. - */ - if (board_is_dra71x_evm()) - return OPP_NOM; - switch (rail_offset) { case VOLT_MPU: opp =3D DRA7_MPU_OPP; + /* DRA71x supports only OPP_NOM for MPU */ + if (board_is_dra71x_evm()) + opp =3D OPP_NOM; break; case VOLT_CORE: opp =3D DRA7_CORE_OPP; + /* DRA71x supports only OPP_NOM for CORE */ + if (board_is_dra71x_evm()) + opp =3D OPP_NOM; break; case VOLT_GPU: opp =3D DRA7_GPU_OPP; + /* DRA71x supports only OPP_NOM for GPU */ + if (board_is_dra71x_evm()) + opp =3D OPP_NOM; break; case VOLT_EVE: opp =3D DRA7_DSPEVE_OPP; + /* + * DRA71x does not support OPP_OD for EVE. + * If OPP_OD is selected by menuconfig, fallback + * to OPP_NOM. + */ + if (board_is_dra71x_evm() && opp =3D=3D OPP_OD) + opp =3D OPP_NOM; break; case VOLT_IVA: opp =3D DRA7_IVA_OPP; + /* + * DRA71x does not support OPP_OD for IVA. + * If OPP_OD is selected by menuconfig, fallback + * to OPP_NOM. + */ + if (board_is_dra71x_evm() && opp =3D=3D OPP_OD) + opp =3D OPP_NOM; break; default: opp =3D OPP_NOM; --=20 2.11.0