summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajesh Bhagat <rajesh.bhagat@nxp.com>2017-11-30 06:30:50 (GMT)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>2018-01-18 05:29:08 (GMT)
commit094c483a63349230ec8eb4b159d17af480aa389e (patch)
tree25431dd2e6f5dd63dc3b849d1be3b58677f2c493
parent9d25d532fca42e50eccf387c2f9f368c3d14b764 (diff)
downloadu-boot-094c483a63349230ec8eb4b159d17af480aa389e.tar.xz
board: common: vid: Add board specific vdd adjust API
Adds a board specific API namely board_adjust_vdd which is required to define the board VDD adjust settings. Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
-rw-r--r--board/freescale/common/vid.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c
index f4fc95b..921841f 100644
--- a/board/freescale/common/vid.c
+++ b/board/freescale/common/vid.c
@@ -34,6 +34,14 @@ int __weak board_vdd_drop_compensation(void)
}
/*
+ * Board specific settings for specific voltage value
+ */
+int __weak board_adjust_vdd(int vdd)
+{
+ return 0;
+}
+
+/*
* Get the i2c address configuration for the IR regulator chip
*
* There are some variance in the RDB HW regarding the I2C address configuration
@@ -453,6 +461,11 @@ int adjust_vdd(ulong vdd_override)
vdd_last = set_voltage(i2caddress, vdd_current);
}
+ if (board_adjust_vdd(vdd_target) < 0) {
+ ret = -1;
+ goto exit;
+ }
+
if (vdd_last > 0)
printf("VID: Core voltage after adjustment is at %d mV\n",
vdd_last);