summaryrefslogtreecommitdiff
path: root/board/freescale/ls2080ardb
diff options
context:
space:
mode:
authorStephen Carlson <stcarlso@linux.microsoft.com>2021-02-08 13:11:29 +0300
committerPriyanka Jain <priyanka.jain@nxp.com>2021-03-05 07:55:41 +0300
commitb5ee48c099e4036fc0336cf66a0d324b8225d53e (patch)
tree12904b64d213e6a83588e9acdafa180b598a6b36 /board/freescale/ls2080ardb
parent6a026e5649f00c0b157a935279dfd625889db675 (diff)
downloadu-boot-b5ee48c099e4036fc0336cf66a0d324b8225d53e.tar.xz
arm: fsl: common: Improve NXP VID driver PMBus support
This patch adds support for more PMBus compatible devices to the NXP drivers for its QorIQ family devices. At runtime, the voltage regulator is queried over I2C, and the required voltage multiplier determined. This change supports the DIRECT and LINEAR PMBus voltage reporting modes. Previously, the driver only supported a few specific devices such as the IR36021 and LTC3882, so this change allows the QorIQ series to be used with a much larger variety of core voltage regulator devices. checkpatch warning "Use if (IS_DEFINED (...))" was ignored to maintain consistency with the existing code. Signed-off-by: Stephen Carlson <stcarlso@linux.microsoft.com> Signed-off-by: Wasim Khan <wasim.khan@nxp.com> Tested-by: Wasim Khan <wasim.khan@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'board/freescale/ls2080ardb')
-rw-r--r--board/freescale/ls2080ardb/ls2080ardb.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index c5ae02bc93..3a026b0827 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -43,6 +43,48 @@ enum {
MUX_TYPE_DSPI,
};
+#ifdef CONFIG_VID
+u16 soc_get_fuse_vid(int vid_index)
+{
+ static const u16 vdd[32] = {
+ 10500,
+ 0, /* reserved */
+ 9750,
+ 0, /* reserved */
+ 9500,
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 9000, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 10000, /* 1.0000V */
+ 0, /* reserved */
+ 10250,
+ 0, /* reserved */
+ 10500,
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ 0, /* reserved */
+ };
+
+ return vdd[vid_index];
+};
+#endif
+
unsigned long long get_qixis_addr(void)
{
unsigned long long addr;