[PATCH v2] board: ti: am335x: Do not call disabled PMIC functions

Markus Schneider-Pargmann msp at baylibre.com
Mon Nov 17 20:59:54 CET 2025


Hi,

On Mon Sep 22, 2025 at 11:22 AM CEST, Maarten Brock wrote:
> When PMIC drivers are disabled their undefined functions cannot be called.

This patch breaks boot on at least am335x-evm if not more am335x boards.

>
> Signed-off-by: Maarten Brock <maarten.brock at sttls.nl>
> ---
> Changes in v2:
> - use IS_ENABLED instead of CONFIG_IS_ENABLED
> ---
>  board/ti/am335x/board.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
> index 4ada8b534c1..712818ec235 100644
> --- a/board/ti/am335x/board.c
> +++ b/board/ti/am335x/board.c
> @@ -283,7 +283,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
>  
>  static u8 bone_not_connected_to_ac_power(void)
>  {
> -	if (board_is_bone()) {
> +	if (IS_ENABLED(CONFIG_PMIC_TPS65217) && board_is_bone()) {
>  		uchar pmic_status_reg;
>  		if (tps65217_reg_read(TPS65217_STATUS,
>  				      &pmic_status_reg))
> @@ -332,6 +332,9 @@ static void scale_vcores_bone(int freq)
>  {
>  	int usb_cur_lim, mpu_vdd;
>  
> +	if (!IS_ENABLED(CONFIG_PMIC_TPS65217))
> +		return;
> +
>  	/*
>  	 * Only perform PMIC configurations if board rev > A1
>  	 * on Beaglebone White
> @@ -426,6 +429,9 @@ void scale_vcores_generic(int freq)
>  {
>  	int sil_rev, mpu_vdd;
>  
> +	if (!IS_ENABLED(CONFIG_DM_PMIC_TPS65910))
> +		return;
> +

If I understand this function correctly, the functions used for tps65910
in scale_vcores_generic are not depending on CONFIG_DM_PMIC_TPS65910,
but on CONFIG_SPL_POWER_TPS65910:

  obj-$(CONFIG_DM_PMIC_TPS65910) += pmic_tps65910_dm.o
  obj-$(CONFIG_SPL_POWER_TPS65910) += pmic_tps65910.o

I am currently not able to test the TPS65217 parts of this patch.

I will probably send a fix for am335x-evm tomorrow.

Best
Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 289 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251117/e2ad94dd/attachment.sig>


More information about the U-Boot mailing list