[U-Boot] [RESEND PATCH v7 10/10] ls1088a: Add VID support for QDS and RDB platforms
York Sun
york.sun at nxp.com
Fri Dec 8 17:24:35 UTC 2017
On 11/29/2017 10:31 PM, Rajesh Bhagat wrote:
> This patch adds the support for VID on LS1088AQDS and LS1088ARDB systems.
> It reads the fusesr register and changes the VDD accordingly by adjusting
> the voltage via LTC3882 regulator.
>
> This patch also takes care of the special case of 0.9V VDD is present in
> fusesr register. In that case,it also changes the SERDES voltage by
> disabling the SERDES, changing the SVDD and then re-enabling SERDES.
>
> Signed-off-by: Raghav Dogra <raghav.dogra at nxp.com>
> Signed-off-by: Ashish Kumar <Ashish.Kumar at nxp.com>
> Signed-off-by: Amrita Kumari <amrita.kumari at nxp.com>
> Signed-off-by: Rajesh Bhagat <rajesh.bhagat at nxp.com>
> ---
> Changes in v7:
> - Defined CONFIG_VID in SPL scenario too
> - Defined new API init_func_vid for core voltage adjustment for LS1088A
>
>
<snip>
> +int get_serdes_volt(void)
> +{
> + int ret, vcode = 0;
> + u8 chan = PWM_CHANNEL0;
> +
> + /* Select the PAGE 0 using PMBus commands PAGE for VDD */
> + ret = i2c_write(I2C_SVDD_MONITOR_ADDR,
> + PMBUS_CMD_PAGE, 1, &chan, 1);
> + if (ret) {
> + printf("VID: failed to select VDD Page 0\n");
> + return ret;
> + }
> +
> + /* Read the output voltage using PMBus command READ_VOUT */
> + ret = i2c_read(I2C_SVDD_MONITOR_ADDR,
> + PMBUS_CMD_READ_VOUT, 1, (void *)&vcode, 2);
> + if (ret) {
> + printf("VID: failed to read the volatge\n");
> + return ret;
> + }
nipick
Insert a blank line before return.
> + return vcode;
> +}
York
More information about the U-Boot
mailing list