Skip to contentSkip to conversation

ARM: stm32: Define I2C EEPROM bus and address on DHCOM

PATCH New Marek Vasut 2 participants 6 messages Apr 27, 2020 – May 14, 2020

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

PATCH 1/2 ARM: stm32: Define I2C EEPROM bus and address on DHCOM

Define I2C EEPROM bus and address, so that the 'eeprom' command uses the correct ones and does not generate the following error:
eeprom_rw_block: Cannot find udev for a bus 0

Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
---
 configs/stm32mp15_dhcom_basic_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/stm32mp15_dhcom_basic_defconfig +2 -0
index f830feb306..28824cf813 100644
@@ -76,6 +76,8 @@ CONFIG_LED_GPIO=y
 CONFIG_DM_MAILBOX=y
 CONFIG_STM32_IPCC=y
 CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x50
+CONFIG_SYS_I2C_EEPROM_BUS=3
 CONFIG_DM_MMC=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_STM32_SDMMC2=y
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 ARM: stm32: Hog GPIO PF7 high on DHCOM to unlock SPI NOR nWP

The SPI NOR nWP line is connected to GPIO PF7 on the SoM, pull the GPIO line high by default to clear SPI NOR WP.

Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 9 +++++++++
 configs/stm32mp15_dhcom_basic_defconfig    | 1 +
 2 files changed, 10 insertions(+)
arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi +9 -0
index b57f3d520c..26bd6418c1 100644
@@ -45,6 +45,15 @@
 	};
 };
 
+&gpiof {
+	snor-nwp {
+		gpio-hog;
+		gpios = <7 0>;
+		output-high;
+		line-name = "spi-nor-nwp";
+	};
+};
+
 &i2c4 {
 	u-boot,dm-pre-reloc;
 };
configs/stm32mp15_dhcom_basic_defconfig +1 -0
index 28824cf813..40afef2ece 100644
@@ -67,6 +67,7 @@ CONFIG_SPL_BLOCK_CACHE=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_DFU_VIRT=y
+CONFIG_GPIO_HOG=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 ARM: stm32: Hog GPIO PF7 high on DHCOM to unlock SPI NOR nWP

Dear Marek,

Quoted 6 lines

From: Marek Vasut <[email protected]>
Sent: lundi 27 avril 2020 12:27

The SPI NOR nWP line is connected to GPIO PF7 on the SoM, pull the GPIO line high by default to clear SPI NOR WP.

Quoted 8 lines
Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 9 +++++++++
 configs/stm32mp15_dhcom_basic_defconfig    | 1 +
 2 files changed, 10 insertions(+)

Thanks

Patrick

#3 lore raw

PATCH 2/2 ARM: stm32: Hog GPIO PF7 high on DHCOM to unlock SPI NOR nWP

In reply to Marek Vasut

Hi

Quoted 6 lines

From: Marek Vasut <[email protected]>
Sent: lundi 27 avril 2020 12:27

The SPI NOR nWP line is connected to GPIO PF7 on the SoM, pull the GPIO line high by default to clear SPI NOR WP.

Quoted 8 lines
Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
---
 arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi | 9 +++++++++
 configs/stm32mp15_dhcom_basic_defconfig    | 1 +
 2 files changed, 10 insertions(+)

Applied to u-boot-stm/master, thanks!

Regards

Patrick

#4 lore raw

PATCH 1/2 ARM: stm32: Define I2C EEPROM bus and address on DHCOM

In reply to Marek Vasut

Dear Marek,

Quoted 7 lines

From: Marek Vasut <[email protected]>
Sent: lundi 27 avril 2020 12:27

Define I2C EEPROM bus and address, so that the 'eeprom' command uses the correct ones and does not generate the following error:
eeprom_rw_block: Cannot find udev for a bus 0

Quoted 7 lines
Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
---
 configs/stm32mp15_dhcom_basic_defconfig | 2 ++
 1 file changed, 2 insertions(+)

Thanks

Patrick

#5 lore raw

PATCH 1/2 ARM: stm32: Define I2C EEPROM bus and address on DHCOM

In reply to Marek Vasut

Hi,

Quoted 7 lines

From: Marek Vasut <[email protected]>
Sent: lundi 27 avril 2020 12:27

Define I2C EEPROM bus and address, so that the 'eeprom' command uses the correct ones and does not generate the following error:
eeprom_rw_block: Cannot find udev for a bus 0

Quoted 7 lines
Cc Patrick Delaunay <[email protected]>
Cc Patrice Chotard <[email protected]>
---
 configs/stm32mp15_dhcom_basic_defconfig | 2 ++
 1 file changed, 2 insertions(+)

Applied to u-boot-stm/master, thanks!

Regards

Patrick