Skip to content

Commit e1cb084

Browse files
erwangofabiobaltieri
authored andcommitted
drivers: gpio: stm32: Apply GPIOG specific code to U5 series
In STM32U5 as well it is required to enable VDD before use. Difference is that U5 enables this under PWR_SVMCR_IO2SV flag. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 83f0ba7 commit e1cb084

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpio/gpio_stm32.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,8 @@ static int gpio_stm32_init(const struct device *dev)
706706
return -ENODEV;
707707
}
708708

709-
#if defined(PWR_CR2_IOSV) && DT_NODE_HAS_STATUS(DT_NODELABEL(gpiog), okay)
709+
#if (defined(PWR_CR2_IOSV) || defined(PWR_SVMCR_IO2SV)) && \
710+
DT_NODE_HAS_STATUS(DT_NODELABEL(gpiog), okay)
710711
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
711712
/* Port G[15:2] requires external power supply */
712713
/* Cf: L4/L5 RM, Chapter "Independent I/O supply rail" */

0 commit comments

Comments
 (0)