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.do...@nxp.com>
> Signed-off-by: Ashish Kumar <ashish.ku...@nxp.com>
> Signed-off-by: Amrita Kumari <amrita.kum...@nxp.com>
> Signed-off-by: Rajesh Bhagat <rajesh.bha...@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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to