mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 11:04:20 +00:00
feat(st): search pinctrl node by compatible
Instead of searching pinctrl node with its name, search with its compatible. This will be necessary before pin-controller name changes to pinctrl due to kernel yaml changes. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I00590414fa65e193c6a72941a372bcecac673f60
This commit is contained in:
parent
65a5e1c04d
commit
b14d3e22b4
1 changed files with 12 additions and 4 deletions
|
@ -199,6 +199,8 @@ unsigned long stm32_get_gpio_bank_clock(unsigned int bank)
|
|||
|
||||
int stm32_get_gpio_bank_pinctrl_node(void *fdt, unsigned int bank)
|
||||
{
|
||||
const char *node_compatible = NULL;
|
||||
|
||||
switch (bank) {
|
||||
case GPIO_BANK_A:
|
||||
case GPIO_BANK_B:
|
||||
|
@ -209,18 +211,24 @@ int stm32_get_gpio_bank_pinctrl_node(void *fdt, unsigned int bank)
|
|||
case GPIO_BANK_G:
|
||||
case GPIO_BANK_H:
|
||||
case GPIO_BANK_I:
|
||||
#if STM32MP13
|
||||
node_compatible = "st,stm32mp135-pinctrl";
|
||||
break;
|
||||
#endif
|
||||
#if STM32MP15
|
||||
case GPIO_BANK_J:
|
||||
case GPIO_BANK_K:
|
||||
#endif
|
||||
return fdt_path_offset(fdt, "/soc/pin-controller");
|
||||
#if STM32MP15
|
||||
node_compatible = "st,stm32mp157-pinctrl";
|
||||
break;
|
||||
case GPIO_BANK_Z:
|
||||
return fdt_path_offset(fdt, "/soc/pin-controller-z");
|
||||
node_compatible = "st,stm32mp157-z-pinctrl";
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
panic();
|
||||
}
|
||||
|
||||
return fdt_node_offset_by_compatible(fdt, -1, node_compatible);
|
||||
}
|
||||
|
||||
#if STM32MP_UART_PROGRAMMER || !defined(IMAGE_BL2)
|
||||
|
|
Loading…
Add table
Reference in a new issue