
-----Original Message----- From: Wasim Khan (OSS) wasim.khan@oss.nxp.com Sent: Thursday, February 4, 2021 11:44 AM To: Stephen Carlson stcarlso@microsoft.com; Varun Sethi V.Sethi@nxp.com; Priyanka Jain priyanka.jain@nxp.com; Thirupathaiah Annapureddy thiruan@microsoft.com Cc: u-boot@lists.denx.de; Stephen Carlson stcarlso@linux.microsoft.com; Wasim Khan wasim.khan@nxp.com Subject: [PATCH v4] arm: fsl: common: Improve NXP VID driver PMBus support
From: Stephen Carlson stcarlso@linux.microsoft.com
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
Changes in v4:
- Included upstream commit ada19fd2
- compilation fix for platforms using IR36021
- read_voltage() fix for devices using INA220
- compilation fix for ls1088
- removed soc_get_fuse_vid() support for ls1028
board/freescale/common/Kconfig | 27 +- board/freescale/common/vid.c | 816 ++++++++++++------------------ board/freescale/common/vid.h | 11 +- board/freescale/ls1088a/ls1088a.c | 40 ++ board/freescale/ls2080a/ls2080a.c | 49 ++ board/freescale/lx2160a/lx2160a.c | 42 ++ include/configs/ls1088aqds.h | 6 - include/configs/ls1088ardb.h | 8 +- 8 files changed, 480 insertions(+), 519 deletions(-)
<snip> Kindly fix build issue on all powerpc platforms (T2080RDB T2080RDB_NAND T2080RDB_SDCARD T2080RDB_SECURE_BOOT T2080RDB_SPIFLASH T2080RDB_SRIO_PCIE_BOOT, and others) and layerscape (ls2080a_emu ls2080a_simu) platforms. Observing build error like below:
2021-02-04T15:45:01.1295212Z powerpc: + T2080RDB 2021-02-04T15:45:01.1295768Z +board/freescale/common/vid.c: In function 'adjust_vdd': 2021-02-04T15:45:01.1296428Z +board/freescale/common/vid.c:579:24: error: 'I2C_VOL_MONITOR_ADDR' undeclared (first use in this function); did you mean 'I2C_VOL_MONITOR_BUS'? 2021-02-04T15:45:01.1296854Z + 579 | int ret, i2caddress = I2C_VOL_MONITOR_ADDR; 2021-02-04T15:45:01.1297145Z + | ^~~~~~~~~~~~~~~~~~~~ 2021-02-04T15:45:01.1297413Z + | I2C_VOL_MONITOR_BUS 2021-02-04T15:45:01.1297774Z +board/freescale/common/vid.c:579:24: note: each undeclared identifier is reported only once for each function it appears in 2021-02-04T15:45:01.1298319Z +board/freescale/common/vid.c: In function 'print_vdd': 2021-02-04T15:45:01.1298926Z +board/freescale/common/vid.c:752:34: error: 'I2C_VOL_MONITOR_ADDR' undeclared (first use in this function); did you mean 'I2C_VOL_MONITOR_BUS'? 2021-02-04T15:45:01.1299348Z + 752 | int vdd_last, ret, i2caddress = I2C_VOL_MONITOR_ADDR; 2021-02-04T15:45:01.1299642Z + | ^~~~~~~~~~~~~~~~~~~~ 2021-02-04T15:45:01.1299956Z + | I2C_VOL_MONITOR_BUS 2021-02-04T15:45:01.1300239Z +make[2]: *** [board/freescale/common/vid.o] Error 1 2021-02-04T15:45:01.1300527Z +make[1]: *** [board/freescale/common] Error 2 2021-02-04T15:45:01.1300894Z +make: *** [sub-make] Error 2 2021-02-04T15:45:01.1301006Z
2021-02-04T15:14:59.9216814Z Summary of current source for 16 boards (2 threads, 1 job per thread) 2021-02-04T15:14:59.9218141Z aarch64: w+ ls2080aqds ls2080aqds_nand ls2080aqds_qspi ls2080aqds_sdcard ls2080ardb ls2080ardb_nand ls2081ardb ls2080aqds_SECURE_BOOT ls2080ardb_SECURE_BOOT + ls2080a_emu ls2080a_simu 2021-02-04T15:14:59.9219888Z +aarch64-linux-ld.bfd: board/freescale/ls2080a/built-in.o: in function `arch_misc_init': 2021-02-04T15:14:59.9221287Z +board/freescale/ls2080a/ls2080a.c:57: multiple definition of `arch_misc_init'; arch/arm/cpu/armv8/built-in.o:arch/arm/cpu/armv8/fsl-layerscape/cpu.c:1650: first defined here 2021-02-04T15:14:59.9223228Z +make[1]: *** [u-boot] Error 1
Regards Priyanka