Skip to contentSkip to conversation

ARM: dts: stm32: Drop nWP GPIO hog on DHSOM

PATCH In review Marek Vasut 3 participants 8 messages Oct 23, 2021 – Nov 10, 2021

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

PATCH 1/2 ARM: dts: stm32: Drop nWP GPIO hog on DHSOM

The nWP GPIO hog was used to unlock the SPI NOR write protect when U-Boot used to operate the SPI NOR in 1-1-1 mode. Now that the SPI NOR is operated in 1-1-4 mode, the hog has adverse effects and causes transfer corruption, since the hogged pin is also the IO2 pin. Remove the hogs.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 9 ---------
 arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 9 ---------
 2 files changed, 18 deletions(-)
arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +0 -9
index 11bc247065b..71b0486f02a 100644
@@ -50,15 +50,6 @@
 	};
 };
 
-&gpiof {
-	snor-nwp {
-		gpio-hog;
-		gpios = <7 0>;
-		output-high;
-		line-name = "spi-nor-nwp";
-	};
-};
-
 &i2c4 {
 	u-boot,dm-pre-reloc;
 };
arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi +0 -9
index 9d3db208769..502cd95da05 100644
@@ -25,15 +25,6 @@
 	u-boot,dm-spl;
 };
 
-&gpiof {
-	snor-nwp {
-		gpio-hog;
-		gpios = <7 0>;
-		output-high;
-		line-name = "spi-nor-nwp";
-	};
-};
-
 &i2c4 {
 	u-boot,dm-pre-reloc;
 };
Signature · 1 line
2.33.0
#1 lore raw

PATCH 2/2 ARM: stm32: Increase default SF bus frequency to 50 MHz and enable SFDP

Increase default SPI NOR bus frequency from 1 MHz to 50 MHz and enable SFDP parsing to obtain more accurate SPI NOR configuration.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 configs/stm32mp15_dhcom_basic_defconfig | 4 +++-
 configs/stm32mp15_dhcor_basic_defconfig | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configs/stm32mp15_dhcom_basic_defconfig +3 -1
index 083e199e511..8fe0456a56d 100644
@@ -70,7 +70,7 @@ CONFIG_ENV_SPI_BUS=0
 CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=0
 CONFIG_USE_ENV_SPI_MAX_HZ=y
-CONFIG_ENV_SPI_MAX_HZ=10000000
+CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_USE_ENV_SPI_MODE=y
 CONFIG_ENV_SPI_MODE=0x0
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
@@ -102,6 +102,8 @@ CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_SYS_MTDPARTS_RUNTIME=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_SF_DEFAULT_SPEED=50000000
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/stm32mp15_dhcor_basic_defconfig +3 -1
index 01ac3edb93e..21f5c9e01b2 100644
@@ -67,7 +67,7 @@ CONFIG_ENV_SPI_BUS=0
 CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=0
 CONFIG_USE_ENV_SPI_MAX_HZ=y
-CONFIG_ENV_SPI_MAX_HZ=10000000
+CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_USE_ENV_SPI_MODE=y
 CONFIG_ENV_SPI_MODE=0x0
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
@@ -97,6 +97,8 @@ CONFIG_STM32_SDMMC2=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_SF_DEFAULT_SPEED=50000000
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
Signature · 1 line
2.33.0
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ARM: stm32: Increase default SF bus frequency to 50 MHz and enable SFDP

Hi Marek

Quoted 48 lines · Marek Vasut

Increase default SPI NOR bus frequency from 1 MHz to 50 MHz and enable SFDP parsing to obtain more accurate SPI NOR configuration.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 configs/stm32mp15_dhcom_basic_defconfig | 4 +++-
 configs/stm32mp15_dhcor_basic_defconfig | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configs/stm32mp15_dhcom_basic_defconfig +3 -1
index 083e199e511..8fe0456a56d 100644
@@ -70,7 +70,7 @@ CONFIG_ENV_SPI_BUS=0
 CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=0
 CONFIG_USE_ENV_SPI_MAX_HZ=y
-CONFIG_ENV_SPI_MAX_HZ=10000000
+CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_USE_ENV_SPI_MODE=y
 CONFIG_ENV_SPI_MODE=0x0
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
@@ -102,6 +102,8 @@ CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_SYS_MTDPARTS_RUNTIME=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_SF_DEFAULT_SPEED=50000000
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/stm32mp15_dhcor_basic_defconfig +1 -1
index 01ac3edb93e..21f5c9e01b2 100644
@@ -67,7 +67,7 @@ CONFIG_ENV_SPI_BUS=0
 CONFIG_USE_ENV_SPI_CS=y
 CONFIG_ENV_SPI_CS=0
 CONFIG_USE_ENV_SPI_MAX_HZ=y
-CONFIG_ENV_SPI_MAX_HZ=10000000
+CONFIG_ENV_SPI_MAX_HZ=50000000
 CONFIG_USE_ENV_SPI_MODE=y
 CONFIG_ENV_SPI_MODE=0x0
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y

configs/stm32mp15_dhcor_basic_defconfig CONFIG_STM32_SDMMC2=y · line 104

Quoted 8 lines
configs/stm32mp15_dhcor_basic_defconfig +2 -0
@@ -97,6 +97,8 @@ CONFIG_STM32_SDMMC2=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_SF_DEFAULT_SPEED=50000000
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y

Thanks
Patrice

Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] ARM: stm32: Increase default SF bus frequency to 50 MHz and enable SFDP

In reply to Marek Vasut

Hi,

Quoted 11 lines · Marek Vasut

Increase default SPI NOR bus frequency from 1 MHz to 50 MHz and enable SFDP parsing to obtain more accurate SPI NOR configuration.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  configs/stm32mp15_dhcom_basic_defconfig | 4 +++-
  configs/stm32mp15_dhcor_basic_defconfig | 4 +++-
  2 files changed, 6 insertions(+), 2 deletions(-)

Thanks
Patrick

#4 lore raw

Re: [PATCH 2/2] ARM: stm32: Increase default SF bus frequency to 50 MHz and enable SFDP

Hi Marek

Quoted 15 lines · Patrick DELAUNAY

Hi,

Quoted 11 lines · Marek Vasut

Increase default SPI NOR bus frequency from 1 MHz to 50 MHz and enable SFDP parsing to obtain more accurate SPI NOR configuration.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

---
  configs/stm32mp15_dhcom_basic_defconfig | 4 +++- configs/stm32mp15_dhcor_basic_defconfig | 4 +++-

  2 files changed, 6 insertions(+), 2 deletions(-)
Quoted 5 lines

Thanks
Patrick

Applied on u-boot-stm/master
Thanks

Reviewed-by on v1 1/2
#5 lore raw
In reply to Marek Vasut

Hi Marek

Quoted 44 lines · Marek Vasut

The nWP GPIO hog was used to unlock the SPI NOR write protect when U-Boot used to operate the SPI NOR in 1-1-1 mode. Now that the SPI NOR is operated in 1-1-4 mode, the hog has adverse effects and causes transfer corruption, since the hogged pin is also the IO2 pin. Remove the hogs.

Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 9 ---------
 arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 9 ---------
 2 files changed, 18 deletions(-)
arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +0 -9
index 11bc247065b..71b0486f02a 100644
@@ -50,15 +50,6 @@
 	};
 };
 
-&gpiof {
-	snor-nwp {
-		gpio-hog;
-		gpios = <7 0>;
-		output-high;
-		line-name = "spi-nor-nwp";
-	};
-};
-
 &i2c4 {
 	u-boot,dm-pre-reloc;
 };
arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi +0 -2
index 9d3db208769..502cd95da05 100644
@@ -25,15 +25,6 @@
 	u-boot,dm-spl;
 };
 
-&gpiof {
-	snor-nwp {

arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi line 30

Quoted 10 lines
arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi +0 -7
-		gpio-hog;
-		gpios = <7 0>;
-		output-high;
-		line-name = "spi-nor-nwp";
-	};
-};
-
 &i2c4 {
 	u-boot,dm-pre-reloc;
 };

Thanks
Patrice

Reviewed-by on v1 1/2
#6 lore raw
In reply to Marek Vasut

Hi,

Quoted 5 lines · Marek Vasut

The nWP GPIO hog was used to unlock the SPI NOR write protect when U-Boot used to operate the SPI NOR in 1-1-1 mode. Now that the SPI NOR is operated in 1-1-4 mode, the hog has adverse effects and causes transfer corruption, since the hogged pin is also the IO2 pin. Remove the hogs.

Quoted 8 lines
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
---
  arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 9 ---------
  arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 9 ---------
  2 files changed, 18 deletions(-)

Thanks
Patrick

#7 lore raw

Hi Marek

Quoted 18 lines · Patrick DELAUNAY

Hi,

Quoted 5 lines · Marek Vasut

The nWP GPIO hog was used to unlock the SPI NOR write protect when U-Boot used to operate the SPI NOR in 1-1-1 mode. Now that the SPI NOR is operated in 1-1-4 mode, the hog has adverse effects and causes transfer corruption, since the hogged pin is also the IO2 pin. Remove the hogs.

Quoted 8 lines
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>

---
  arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 9 --------- arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 9 ---------

  2 files changed, 18 deletions(-)
Quoted 4 lines

Thanks
Patrick

Applied on u-boot-stm/master
Thanks