ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP
authorMarek Vasut <marex@denx.de>
Tue, 26 May 2020 02:30:20 +0000 (04:30 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Thu, 28 May 2020 06:52:04 +0000 (08:52 +0200)
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.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
configs/stm32mp15_dhcor_basic_defconfig

index ef730a8..bd4c2ad 100644 (file)
        };
 };
 
+&gpiof {
+       snor-nwp {
+               gpio-hog;
+               gpios = <7 0>;
+               output-high;
+               line-name = "spi-nor-nwp";
+       };
+};
+
 &i2c4 {
        u-boot,dm-pre-reloc;
 };
index 7163d0a..249646c 100644 (file)
@@ -71,6 +71,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