<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Incorporating External Spi Flash vin-supply/supply-gpio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107677/incorporating-external-spi-flash-vin-supply-supply-gpio</link><description>Hi 
 I&amp;#39;m currently trying to set up an external flash (s25FL064L) that is power controlled by a GPIO pin switching a generic Mosfet to power the flash only when needed. I&amp;#39;m using a NRF9160 as the MCU. 
 While there is either the SUPPLY node in the compatible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jan 2024 12:01:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107677/incorporating-external-spi-flash-vin-supply-supply-gpio" /><item><title>RE: Incorporating External Spi Flash vin-supply/supply-gpio</title><link>https://devzone.nordicsemi.com/thread/465541?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 12:01:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c107735-299b-4f11-8eb6-26d44f14ec10</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I searched for &amp;quot;supply-gpios&amp;quot; in a previous ticket: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/107526/question-about-supply-gpios-specification-in-dts-file"&gt;Question about supply-gpios specification in dts file&lt;/a&gt; . I think the answer here is the same: supply-gpios is not used in this case, so the drivers are responsible for handling that.&lt;/p&gt;
&lt;p&gt;Maybe the easiest way here is to use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/pm/index.html"&gt;Power Management&lt;/a&gt; features to &amp;quot;trick&amp;quot; zephyr into toggling that pin for you?&lt;br /&gt;You see, if you use Power Management, the SPI-NOR driver will &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/81474ef240546a7d4ef381cd7fb28627b5f43dc5/drivers/flash/spi_nor.c#L1336-L1372"&gt;do some stuff&lt;/a&gt; on power management.&lt;br /&gt;Now, you can also implement custom things that happen on power management, and use that to toggle supply-gpios.&lt;/p&gt;
&lt;p&gt;The most proper method would be to implement a new custom driver for your external flash setup, which uses supply-gpios, I think.&lt;/p&gt;
&lt;p&gt;Does this answer your question?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>