Skip to contentSkip to conversation

ARM: dts: stm32: drop "st,button1" compatible

PATCH In review Dario Binacchi 2 participants 8 messages Feb 24, 2025 – Mar 10, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 ARM: dts: stm32: drop "st,button1" compatible

It is pointless to use the custom compatible "st,button1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-keys" compatible, which is specifically used for button management.

---

Changes in v2:
- Drop gpio-keys node from stm32f746-disco-u-boot.dtsi

 arch/arm/dts/stm32746g-eval-u-boot.dtsi    |  5 -----
 arch/arm/dts/stm32f746-disco-u-boot.dtsi   |  5 -----
 arch/arm/dts/stm32f769-disco-u-boot.dtsi   |  5 -----
 board/st/stm32f746-disco/stm32f746-disco.c | 15 ---------------
 4 files changed, 30 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
index 1c288acec992..f64329287357 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioc 13 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpiof 10 0>;
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
index 1b42d6cbbc19..a79fca261a2c 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioi 11 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioi 1 0>;
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
index add55c96e21f..a50fba64dcd2 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioa 0 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioj 5 0>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -15
index 8966a09501ed..65a39d965c72 100644
@@ -94,21 +94,6 @@ int board_late_init(void)
 		dm_gpio_set_value(&gpio, 1);
 	}
 
-	/* read button 1*/
-	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,button1");
-	if (node < 0)
-		return -1;
-
-	gpio_request_by_name_nodev(offset_to_ofnode(node), "button-gpio", 0,
-				   &gpio, GPIOD_IS_IN);
-
-	if (dm_gpio_is_valid(&gpio)) {
-		if (dm_gpio_get_value(&gpio))
-			puts("usr button is at HIGH LEVEL\n");
-		else
-			puts("usr button is at LOW LEVEL\n");
-	}
-
 	return 0;
 }
 
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 2/3 ARM: dts: stm32: drop "st,led1" compatible

It is pointless to use the custom compatible "st,led1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-leds" compatible, which is specifically used for GPIO LEDs management.

---

Changes in v2:
- Drop leds node from stm32f746-disco-u-boot.dtsi

 arch/arm/dts/stm32746g-eval-u-boot.dtsi    |  5 -----
 arch/arm/dts/stm32f746-disco-u-boot.dtsi   |  5 -----
 arch/arm/dts/stm32f769-disco-u-boot.dtsi   |  5 -----
 board/st/stm32f746-disco/stm32f746-disco.c | 16 ----------------
 4 files changed, 31 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
index f64329287357..32b5c7cea4b8 100644
@@ -22,11 +22,6 @@
 		mmc0 = &sdio1;
 		spi0 = &qspi;
 	};
-
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpiof 10 0>;
-	};
 };
 
 &fmc {
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
index a79fca261a2c..38d797e49a0a 100644
@@ -22,11 +22,6 @@
 		mmc0 = &sdio1;
 		spi0 = &qspi;
 	};
-
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpioi 1 0>;
-	};
 };
 
 &ltdc {
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
index a50fba64dcd2..7c99a6e61b68 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpioj 5 0>;
-	};
-
 	panel: panel {
 		compatible = "orisetech,otm8009a";
 		reset-gpios = <&gpioj 15 1>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -16
index 65a39d965c72..72f479cea66f 100644
@@ -78,22 +78,6 @@ u32 spl_boot_device(void)
 
 int board_late_init(void)
 {
-	struct gpio_desc gpio = {};
-	int node;
-
-	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,led1");
-	if (node < 0)
-		return -1;
-
-	gpio_request_by_name_nodev(offset_to_ofnode(node), "led-gpio", 0, &gpio,
-				   GPIOD_IS_OUT);
-
-	if (dm_gpio_is_valid(&gpio)) {
-		dm_gpio_set_value(&gpio, 0);
-		mdelay(10);
-		dm_gpio_set_value(&gpio, 1);
-	}
-
 	return 0;
 }
 
Signature · 1 line
2.43.0
Reviewed-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] ARM: dts: stm32: drop "st,led1" compatible

Quoted 83 lines · Dario Binacchi

It is pointless to use the custom compatible "st,led1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-leds" compatible, which is specifically used for GPIO LEDs management.

---

Changes in v2:
- Drop leds node from stm32f746-disco-u-boot.dtsi

 arch/arm/dts/stm32746g-eval-u-boot.dtsi    |  5 -----
 arch/arm/dts/stm32f746-disco-u-boot.dtsi   |  5 -----
 arch/arm/dts/stm32f769-disco-u-boot.dtsi   |  5 -----
 board/st/stm32f746-disco/stm32f746-disco.c | 16 ----------------
 4 files changed, 31 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
index f64329287357..32b5c7cea4b8 100644
@@ -22,11 +22,6 @@
 		mmc0 = &sdio1;
 		spi0 = &qspi;
 	};
-
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpiof 10 0>;
-	};
 };
 
 &fmc {
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
index a79fca261a2c..38d797e49a0a 100644
@@ -22,11 +22,6 @@
 		mmc0 = &sdio1;
 		spi0 = &qspi;
 	};
-
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpioi 1 0>;
-	};
 };
 
 &ltdc {
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
index a50fba64dcd2..7c99a6e61b68 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpioj 5 0>;
-	};
-
 	panel: panel {
 		compatible = "orisetech,otm8009a";
 		reset-gpios = <&gpioj 15 1>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -9
index 65a39d965c72..72f479cea66f 100644
@@ -78,22 +78,6 @@ u32 spl_boot_device(void)
 
 int board_late_init(void)
 {
-	struct gpio_desc gpio = {};
-	int node;
-
-	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,led1");
-	if (node < 0)
-		return -1;
-
-	gpio_request_by_name_nodev(offset_to_ofnode(node), "led-gpio", 0, &gpio,
-				   GPIOD_IS_OUT);

board/st/stm32f746-disco/stm32f746-disco.c u32 spl_boot_device(void) · line 83

Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0 -7
-
-	if (dm_gpio_is_valid(&gpio)) {
-		dm_gpio_set_value(&gpio, 0);
-		mdelay(10);
-		dm_gpio_set_value(&gpio, 1);
-	}
-
 	return 0;
 }
 

Thanks
Patrice

#3 lore raw

Re: [PATCH v2 2/3] ARM: dts: stm32: drop "st,led1" compatible

Quoted 99 lines · Patrice CHOTARD
Quoted 83 lines · Dario Binacchi

It is pointless to use the custom compatible "st,led1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-leds" compatible, which is specifically used for GPIO LEDs management.

---

Changes in v2:
- Drop leds node from stm32f746-disco-u-boot.dtsi

 arch/arm/dts/stm32746g-eval-u-boot.dtsi    |  5 -----
 arch/arm/dts/stm32f746-disco-u-boot.dtsi   |  5 -----
 arch/arm/dts/stm32f769-disco-u-boot.dtsi   |  5 -----
 board/st/stm32f746-disco/stm32f746-disco.c | 16 ----------------
 4 files changed, 31 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
index f64329287357..32b5c7cea4b8 100644
@@ -22,11 +22,6 @@
 		mmc0 = &sdio1;
 		spi0 = &qspi;
 	};
-
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpiof 10 0>;
-	};
 };
 
 &fmc {
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
index a79fca261a2c..38d797e49a0a 100644
@@ -22,11 +22,6 @@
 		mmc0 = &sdio1;
 		spi0 = &qspi;
 	};
-
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpioi 1 0>;
-	};
 };
 
 &ltdc {
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
index a50fba64dcd2..7c99a6e61b68 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	led1 {
-		compatible = "st,led1";
-		led-gpio = <&gpioj 5 0>;
-	};
-
 	panel: panel {
 		compatible = "orisetech,otm8009a";
 		reset-gpios = <&gpioj 15 1>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -9
index 65a39d965c72..72f479cea66f 100644
@@ -78,22 +78,6 @@ u32 spl_boot_device(void)
 
 int board_late_init(void)
 {
-	struct gpio_desc gpio = {};
-	int node;
-
-	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,led1");
-	if (node < 0)
-		return -1;
-
-	gpio_request_by_name_nodev(offset_to_ofnode(node), "led-gpio", 0, &gpio,
-				   GPIOD_IS_OUT);

board/st/stm32f746-disco/stm32f746-disco.c u32 spl_boot_device(void) · line 83

Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0 -7
-
-	if (dm_gpio_is_valid(&gpio)) {
-		dm_gpio_set_value(&gpio, 0);
-		mdelay(10);
-		dm_gpio_set_value(&gpio, 1);
-	}
-
 	return 0;
 }
 
Quoted 2 lines

Thanks
Patrice

Applied to u-boot-stm32/next

Thanks
Patrice

#4 lore raw

PATCH v2 3/3 board: stm32f746-disco: drop board_late_init()

In reply to Dario Binacchi

The removal of the "st,button1" and "st,led1" compatibles has emptied the board_late_init(), so let's remove it along with the configuration that allows its invocation.

---

Changes in v2:
- Add Reviewed-by of Patrice Chotard

 board/st/stm32f746-disco/stm32f746-disco.c | 5 -----
 configs/stm32746g-eval_defconfig           | 1 -
 configs/stm32746g-eval_spl_defconfig       | 1 -
 configs/stm32f746-disco_defconfig          | 1 -
 configs/stm32f746-disco_spl_defconfig      | 1 -
 5 files changed, 9 deletions(-)
board/st/stm32f746-disco/stm32f746-disco.c +0 -5
index 72f479cea66f..07bc8a5f0a27 100644
@@ -76,11 +76,6 @@ u32 spl_boot_device(void)
 }
 #endif
 
-int board_late_init(void)
-{
-	return 0;
-}
-
 int board_init(void)
 {
 #ifdef CONFIG_ETH_DESIGNWARE
configs/stm32746g-eval_defconfig +0 -1
index 4346ecd6e42b..bd3a48b20a2b 100644
@@ -21,7 +21,6 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
 CONFIG_SYS_PBSIZE=1050
 # CONFIG_DISPLAY_CPUINFO is not set
-CONFIG_BOARD_LATE_INIT=y
 CONFIG_SYS_PROMPT="U-Boot > "
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
configs/stm32746g-eval_spl_defconfig +0 -1
index 2756ad5508fc..d47d059d23b1 100644
@@ -30,7 +30,6 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
 CONFIG_SYS_PBSIZE=1050
 # CONFIG_DISPLAY_CPUINFO is not set
-CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_PAD_TO=0x9000
 CONFIG_SPL_NO_BSS_LIMIT=y
 CONFIG_SPL_BOARD_INIT=y
configs/stm32f746-disco_defconfig +0 -1
index 35a489c34e00..f6fbf83f68f1 100644
@@ -21,7 +21,6 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
 CONFIG_SYS_PBSIZE=1050
 # CONFIG_DISPLAY_CPUINFO is not set
-CONFIG_BOARD_LATE_INIT=y
 CONFIG_SYS_PROMPT="U-Boot > "
 CONFIG_CMD_GPT=y
 CONFIG_CMD_MMC=y
configs/stm32f746-disco_spl_defconfig +0 -1
index 6826b1cb7559..dcf077dbfeec 100644
@@ -30,7 +30,6 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk consoleblank=0 ignore_loglevel"
 CONFIG_SYS_PBSIZE=1050
 # CONFIG_DISPLAY_CPUINFO is not set
-CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_PAD_TO=0x9000
 CONFIG_SPL_NO_BSS_LIMIT=y
 CONFIG_SPL_BOARD_INIT=y
Signature · 1 line
2.43.0
Reviewed-by on v2 1/3
#5 lore raw
In reply to Dario Binacchi
Quoted 82 lines · Dario Binacchi

It is pointless to use the custom compatible "st,button1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-keys" compatible, which is specifically used for button management.

---

Changes in v2:
- Drop gpio-keys node from stm32f746-disco-u-boot.dtsi

 arch/arm/dts/stm32746g-eval-u-boot.dtsi    |  5 -----
 arch/arm/dts/stm32f746-disco-u-boot.dtsi   |  5 -----
 arch/arm/dts/stm32f769-disco-u-boot.dtsi   |  5 -----
 board/st/stm32f746-disco/stm32f746-disco.c | 15 ---------------
 4 files changed, 30 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
index 1c288acec992..f64329287357 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioc 13 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpiof 10 0>;
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
index 1b42d6cbbc19..a79fca261a2c 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioi 11 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioi 1 0>;
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
index add55c96e21f..a50fba64dcd2 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioa 0 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioj 5 0>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -8
index 8966a09501ed..65a39d965c72 100644
@@ -94,21 +94,6 @@ int board_late_init(void)
 		dm_gpio_set_value(&gpio, 1);
 	}
 
-	/* read button 1*/
-	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,button1");
-	if (node < 0)
-		return -1;
-
-	gpio_request_by_name_nodev(offset_to_ofnode(node), "button-gpio", 0,
-				   &gpio, GPIOD_IS_IN);
-

board/st/stm32f746-disco/stm32f746-disco.c int board_late_init(void) · line 99

Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0 -7
-	if (dm_gpio_is_valid(&gpio)) {
-		if (dm_gpio_get_value(&gpio))
-			puts("usr button is at HIGH LEVEL\n");
-		else
-			puts("usr button is at LOW LEVEL\n");
-	}
-
 	return 0;
 }
 

Thanks
Patrice

#6 lore raw
Quoted 97 lines · Patrice CHOTARD
Quoted 82 lines · Dario Binacchi

It is pointless to use the custom compatible "st,button1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-keys" compatible, which is specifically used for button management.

---

Changes in v2:
- Drop gpio-keys node from stm32f746-disco-u-boot.dtsi

 arch/arm/dts/stm32746g-eval-u-boot.dtsi    |  5 -----
 arch/arm/dts/stm32f746-disco-u-boot.dtsi   |  5 -----
 arch/arm/dts/stm32f769-disco-u-boot.dtsi   |  5 -----
 board/st/stm32f746-disco/stm32f746-disco.c | 15 ---------------
 4 files changed, 30 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
index 1c288acec992..f64329287357 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioc 13 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpiof 10 0>;
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
index 1b42d6cbbc19..a79fca261a2c 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioi 11 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioi 1 0>;
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
index add55c96e21f..a50fba64dcd2 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioa 0 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioj 5 0>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -8
index 8966a09501ed..65a39d965c72 100644
@@ -94,21 +94,6 @@ int board_late_init(void)
 		dm_gpio_set_value(&gpio, 1);
 	}
 
-	/* read button 1*/
-	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,button1");
-	if (node < 0)
-		return -1;
-
-	gpio_request_by_name_nodev(offset_to_ofnode(node), "button-gpio", 0,
-				   &gpio, GPIOD_IS_IN);
-

board/st/stm32f746-disco/stm32f746-disco.c int board_late_init(void) · line 99

Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0 -7
-	if (dm_gpio_is_valid(&gpio)) {
-		if (dm_gpio_get_value(&gpio))
-			puts("usr button is at HIGH LEVEL\n");
-		else
-			puts("usr button is at LOW LEVEL\n");
-	}
-
 	return 0;
 }
 
Quoted 2 lines

Thanks
Patrice

Applied to u-boot-stm32/next

Thanks
Patrice

#7 lore raw
Quoted 100 lines · Patrice CHOTARD
Quoted 97 lines · Patrice CHOTARD
Quoted 82 lines · Dario Binacchi

It is pointless to use the custom compatible "st,button1" when stm32746g-eval.dts and stm32f769-disco.dts already contain the "gpio-keys" compatible, which is specifically used for button management.

---

Changes in v2:
- Drop gpio-keys node from stm32f746-disco-u-boot.dtsi

 arch/arm/dts/stm32746g-eval-u-boot.dtsi    |  5 -----
 arch/arm/dts/stm32f746-disco-u-boot.dtsi   |  5 -----
 arch/arm/dts/stm32f769-disco-u-boot.dtsi   |  5 -----
 board/st/stm32f746-disco/stm32f746-disco.c | 15 ---------------
 4 files changed, 30 deletions(-)
arch/arm/dts/stm32746g-eval-u-boot.dtsi +0 -5
index 1c288acec992..f64329287357 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioc 13 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpiof 10 0>;
arch/arm/dts/stm32f746-disco-u-boot.dtsi +0 -5
index 1b42d6cbbc19..a79fca261a2c 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioi 11 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioi 1 0>;
arch/arm/dts/stm32f769-disco-u-boot.dtsi +0 -5
index add55c96e21f..a50fba64dcd2 100644
@@ -23,11 +23,6 @@
 		spi0 = &qspi;
 	};
 
-	button1 {
-		compatible = "st,button1";
-		button-gpio = <&gpioa 0 0>;
-	};
-
 	led1 {
 		compatible = "st,led1";
 		led-gpio = <&gpioj 5 0>;
board/st/stm32f746-disco/stm32f746-disco.c +0 -8
index 8966a09501ed..65a39d965c72 100644
@@ -94,21 +94,6 @@ int board_late_init(void)
 		dm_gpio_set_value(&gpio, 1);
 	}
 
-	/* read button 1*/
-	node = fdt_node_offset_by_compatible(gd->fdt_blob, 0, "st,button1");
-	if (node < 0)
-		return -1;
-
-	gpio_request_by_name_nodev(offset_to_ofnode(node), "button-gpio", 0,
-				   &gpio, GPIOD_IS_IN);
-

board/st/stm32f746-disco/stm32f746-disco.c int board_late_init(void) · line 99

Quoted 10 lines
board/st/stm32f746-disco/stm32f746-disco.c +0 -7
-	if (dm_gpio_is_valid(&gpio)) {
-		if (dm_gpio_get_value(&gpio))
-			puts("usr button is at HIGH LEVEL\n");
-		else
-			puts("usr button is at LOW LEVEL\n");
-	}
-
 	return 0;
 }
 
Quoted 6 lines
Quoted 2 lines

Thanks
Patrice

Applied to u-boot-stm32/next

Thanks
Patrice

Applied to u-boot-stm32/next

Thanks
Patrice