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 ef730a83220cca7158a3c399e1c263f087f67afa..bd4c2adc3589887961fec1bf4f6fe99bf3998a9b 100644 (file)
        };
 };
 
+&gpiof {
+       snor-nwp {
+               gpio-hog;
+               gpios = <7 0>;
+               output-high;
+               line-name = "spi-nor-nwp";
+       };
+};
+
 &i2c4 {
        u-boot,dm-pre-reloc;
 };
index 7163d0ad1b0264cf9c89bc47ce29978374cb59a7..249646c4494ba82312f6565d2da103ded2b09501 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