ARM: stm32: Hog GPIO PF7 high on DHCOM to unlock SPI NOR nWP
authorMarek Vasut <marex@denx.de>
Mon, 27 Apr 2020 10:26:43 +0000 (12:26 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Thu, 14 May 2020 07:02:12 +0000 (09:02 +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-dhcom-u-boot.dtsi
configs/stm32mp15_dhcom_basic_defconfig

index e59da53502c13027e996f352f232551363361716..75d75266e858cd179dfd88848845cdfd9300021b 100644 (file)
        };
 };
 
+&gpiof {
+       snor-nwp {
+               gpio-hog;
+               gpios = <7 0>;
+               output-high;
+               line-name = "spi-nor-nwp";
+       };
+};
+
 &i2c4 {
        u-boot,dm-pre-reloc;
 };
index 76382340735a3381f74c575c389b422fcbb9a567..c1c83eb4fc32467b5cf1d14eda31eff1777e3a09 100644 (file)
@@ -74,6 +74,7 @@ CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_DFU_VIRT=y
 CONFIG_SET_DFU_ALT_INFO=y
+CONFIG_GPIO_HOG=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y