Skip to main content
damien1
Associate II
April 18, 2023
Solved

Can ST please provide a guide for bringing up a custom board without using the STPMIC?

  • April 18, 2023
  • 2 replies
  • 1188 views

Can ST please provide a guide for bringing up a custom board without using the STPMIC? 

We are extremely space constrained and unable to fit the PMIC. For our use case we just want simple LDO's with bucks as required.

There is no material I can find that outlines what the device tree should look like for TF-A, U-Boot and Kernel when STPMIC is omitted.

This topic has been closed for replies.
Best answer by damien1

I did manage to solve this in the end. Thanks for the links Patrick.

In the end I had to bypass a function call in TF-A that was searching the devicetree for a supported SOC operating mode. If I included the mode in the devicetree, the devicetree compiler failed so it was a catch-22.

I added a return 0; to the top of static int dt_fill_lp_state(uint32_t *lp_state_config, const char *lp_state) to prevent boot stalling.

static int dt_fill_lp_state(uint32_t *lp_state_config, const char *lp_state)
{
	NOTICE("Bypassed function\n");
	return 0;
	int pwr_node;
	void *fdt;
	const fdt32_t *cuint;
 
	if (fdt_get_address(&fdt) == 0) {
		return -ENOENT;
	}
 
	pwr_node = dt_get_pwr_node(fdt);
	if (pwr_node < 0) {
		return -FDT_ERR_NOTFOUND;
	}
 
	cuint = fdt_getprop(fdt, pwr_node, lp_state, NULL);
	if (cuint == NULL) {
		return -FDT_ERR_NOTFOUND;
	}
 
	*lp_state_config = fdt32_to_cpu(*cuint);
 
	save_supported_mode(fdt, pwr_node);
 
	return 0;
}

2 replies

PatrickF
Technical Moderator
May 5, 2023

@damien1​ ,

Sorry for late answer, did you got a solution to your problems.

Some related information:

https://wiki.st.com/stm32mpu/wiki/Regulator_overview

AN5256 - STM32MP151, STM32MP153 and STM32MP157 discrete power supply hardware integration

Regards,

In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

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.NEW ! Sidekick STM32 AI agent, see here
damien1
damien1AuthorBest answer
Associate II
May 8, 2023

I did manage to solve this in the end. Thanks for the links Patrick.

In the end I had to bypass a function call in TF-A that was searching the devicetree for a supported SOC operating mode. If I included the mode in the devicetree, the devicetree compiler failed so it was a catch-22.

I added a return 0; to the top of static int dt_fill_lp_state(uint32_t *lp_state_config, const char *lp_state) to prevent boot stalling.

static int dt_fill_lp_state(uint32_t *lp_state_config, const char *lp_state)
{
	NOTICE("Bypassed function\n");
	return 0;
	int pwr_node;
	void *fdt;
	const fdt32_t *cuint;
 
	if (fdt_get_address(&fdt) == 0) {
		return -ENOENT;
	}
 
	pwr_node = dt_get_pwr_node(fdt);
	if (pwr_node < 0) {
		return -FDT_ERR_NOTFOUND;
	}
 
	cuint = fdt_getprop(fdt, pwr_node, lp_state, NULL);
	if (cuint == NULL) {
		return -FDT_ERR_NOTFOUND;
	}
 
	*lp_state_config = fdt32_to_cpu(*cuint);
 
	save_supported_mode(fdt, pwr_node);
 
	return 0;
}