Skip to contentSkip to conversation

arm: dts: stm32mp1: Drop fastboot and stm32prog trigger gpios on DHCOM

PATCH Applied Johann Neuhauser 3 participants 5 messages Jun 30, 2022 – Jul 13, 2022

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

PATCH 1/1 arm: dts: stm32mp1: Drop fastboot and stm32prog trigger gpios on DHCOM

PA13 and PA14 are used for USB power control and can't be used to enforce fastboot or stm32prog mode by pressing a button.

Defining CONFIG_FASTBOOT/CONFIG_CMD_STM32PROG without this patch applied results in fastboot/stm32prog always starting, because PA13/PA14 are always low during boot. So drop the wrong trigger gpios definitions.

---

 arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +0 -2
index d73967ac1b5d..ee747a52bb7c 100644
@@ -27,8 +27,6 @@
 	config {
 		u-boot,boot-led = "heartbeat";
 		u-boot,error-led = "error";
-		st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
-		st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
 		dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15 0>;
 		dh,ddr3-coding-gpios = <&gpioz 6 0>, <&gpioz 7 0>;
 	};
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Johann Neuhauser

PA13 and PA14 are used for USB power control and can't be used to enforce fastboot or stm32prog mode by pressing a button.

Defining CONFIG_FASTBOOT/CONFIG_CMD_STM32PROG without this patch applied results in fastboot/stm32prog always starting, because PA13/PA14 are always low during boot. So drop the wrong trigger gpios definitions.

Those GPIOs also likely make no sense on DHCOM , right ?

#2 lore raw
Quoted 8 lines

-----Original Message-----
From: Marek Vasut [mailto:[email protected]]
Sent: Thursday, June 30, 2022 5:20 PM

Quoted 3 lines · Johann Neuhauser

PA13 and PA14 are used for USB power control and can't be used to enforce fastboot or stm32prog mode by pressing a button.

Quoted 7 lines
Quoted 5 lines

Defining CONFIG_FASTBOOT/CONFIG_CMD_STM32PROG without this patch applied results in fastboot/stm32prog always starting, because PA13/PA14 are always low during boot. So drop the wrong trigger gpios definitions.

Those GPIOs also likely make no sense on DHCOM , right ?

They would only make sense on the DHCOM PDK2, since this is the only mainline baseboard with user buttons available in U-Boot.

Quoted 2 lines
Reviewed-by on v1 1/1
#3 lore raw
In reply to Johann Neuhauser

Hi,

Quoted 19 lines · Johann Neuhauser

PA13 and PA14 are used for USB power control and can't be used to enforce fastboot or stm32prog mode by pressing a button.

Defining CONFIG_FASTBOOT/CONFIG_CMD_STM32PROG without this patch applied results in fastboot/stm32prog always starting, because PA13/PA14 are always low during boot. So drop the wrong trigger gpios definitions.

---

  arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 2 --
  1 file changed, 2 deletions(-)
arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +0 -0
index d73967ac1b5d..ee747a52bb7c 100644

arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi line 32

Quoted 8 lines
arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +0 -2
@@ -27,8 +27,6 @@
  	config {
  		u-boot,boot-led = "heartbeat";
  		u-boot,error-led = "error";
-		st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
-		st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
  		dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15 0>;
  		dh,ddr3-coding-gpios = <&gpioz 6 0>, <&gpioz 7 0>;
  	};

The support of these buttons GPIO A13 and A14 have be done for ST boards EVx and DKx;

it is an internal request for Android support on top of OpenSTLinux.

and make no sense on DHCOM STM32MP15

    USB_PWR_STAT USB Host over current indicator (active low) 174 I PA14 - USB_PWR_EN USB Host power enable signal (active low) 176 O PA13 -

moreover, if you never use these properies "st,fastboot-gpios" and "st,stm32prog-gpios" on DH boards,

you can also clean the code in board/dhelectronics/dh_stm32mp1/board.c, board_key_check() can be removed.

=> it is called board_init()

This code was initially copied from 'board/st/stm32mp1/stm32mp1.c'

but after your patch I think it is not needed.

Anyway for this device tree patch

Thanks
Patrick

#4 lore raw
In reply to Johann Neuhauser
Quoted 8 lines · Johann Neuhauser

PA13 and PA14 are used for USB power control and can't be used to enforce fastboot or stm32prog mode by pressing a button.

Defining CONFIG_FASTBOOT/CONFIG_CMD_STM32PROG without this patch applied results in fastboot/stm32prog always starting, because PA13/PA14 are always low during boot. So drop the wrong trigger gpios definitions.

[...]

Applied to stm32/master, thanks!

[1/1] arm: dts: stm32mp1: Drop fastboot and stm32prog trigger gpios on DHCOM

      commit: 48d9eaf6826a1816c5f9839a564ea6338da609a7

Best regards,

Signature · 1 line
Patrick Delaunay <[email protected]>