cancel
Showing results for 
Search instead for 
Did you mean: 

TF-A VDD and phandle errors

JMour.2
Associate II

Hi,

I have upgraded to Ecosystem 3.1.1 and have started to get warnings in TF-A when booting up my stm32mp151c. These are the warnings:

NOTICE:  CPU: STM32MP151CAA Rev.B
NOTICE:  Model: STMicroelectronics custom STM32CubeMX board
NOTICE:  Bootrom authentication failed
WARNING: regulator_get_by_phandle: phandle 14 not found
WARNING: VDD unknown
INFO:    Reset reason (0x15):
INFO:      Power-on Reset (rst_por)
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffdd000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
INFO:    FCONF: Reading firmware configuration information for: tbbr
INFO:    Using EMMC
INFO:      Instance 2
INFO:    Boot used partition fsbl1
WARNING: regulator_get_by_phandle: phandle 19 not found

Everything works as expected and the board boots as normal. But I don't understand why these warnings appear. I have localized in the source code that there are some patches added to the TF-A in ecosystem 3.1.1.

In tf-a-stm32mp/plat/st/stm32mp1/stm32mp1_syscfg.c

/* Get VDD supply */
	vdd_voltage = dt_get_pwr_vdd_voltage();
 
	/* Check if VDD is Low Voltage */
	if (vdd_voltage == 0U) {
		WARN("VDD unknown\n");

And in tf-a-stm32mp/plat/st/common/stm32mp_dt.c

struct rdev *dt_get_vdd_regulator(void)
{
	int node = fdt_node_offset_by_compatible(fdt, -1, DT_PWR_COMPAT);
 
	if (node < 0) {
		return NULL;
	}
 
	return regulator_get_by_supply_name(fdt, node, "vdd");
}

Where DT_PWR_COMPAT is defined in tf-a-stm32mp/plat/st/stm32mp1/stm32mp1_def.h

#define DT_PWR_COMPAT			"st,stm32mp1,pwr-reg"

The phandle error is related to the vdd node in my dts:

vdd: regulator-vdd {
       compatible = "regulator-fixed";
       regulator-name = "vdd";
       regulator-min-microvolt = <3300000>;
       regulator-max-microvolt = <3300000>;
       regulator-always-on;
    };
 
&pwr_regulators {      
	compatible = "st,stm32mp1,pwr-reg";
	system_suspend_supported_soc_modes = <
		STM32_PM_CSLEEP_RUN
		STM32_PM_CSTOP_ALLOW_LP_STOP
		STM32_PM_CSTOP_ALLOW_LPLV_STOP
		STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR
	>;
	system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>;
	vdd-supply = <&vdd>;
	vdd_3v3_usbfs-supply = <&vdd_usb>;
	status = "okay";
};

I have tries several different versions of the dts but I still keep getting the same warnings. I have also tried to set vdd-supply to <&usb33> from arch/arm/boot/dts/stm32mp151.dtsi.

Do you have any suggestions on how to solve this?

1 REPLY 1
Kevin HUBER
ST Employee

Hello @Community member​ ,

Is there a reason why you made the declaration of vdd outside of the "regulator" node from the PMIC?

I advice you to follow the example visible in "stm32mp15xx-dkx.dtsi".

In this file, the vdd is described in the node:

regulators {
			compatible = "st,stpmic1-regulators";

Hope it helps you,

Best Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.