<?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>Configure GPIO in devicetree as &amp;quot;nordic,nrf-gpio&amp;quot; and not as &amp;quot;gpio-leds&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80298/configure-gpio-in-devicetree-as-nordic-nrf-gpio-and-not-as-gpio-leds</link><description>I would like to configure GPIOs as compatible = &amp;quot;nordic,nrf-gpio&amp;quot;; in devicetree file. 
 I did check this topic, but I think that this kind of configuration defeats the whole purpose of .dts file. 
 I did not find any example for compatible = &amp;quot;nordic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Oct 2021 11:23:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80298/configure-gpio-in-devicetree-as-nordic-nrf-gpio-and-not-as-gpio-leds" /><item><title>RE: Configure GPIO in devicetree as "nordic,nrf-gpio" and not as "gpio-leds"</title><link>https://devzone.nordicsemi.com/thread/333005?ContentTypeID=1</link><pubDate>Thu, 07 Oct 2021 11:23:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:011c3c4d-6a46-460e-874f-09228f8c0167</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
[quote user="bzgec"]It is bothering me because I don&amp;#39;t know if &lt;code&gt;gpio-keys&lt;/code&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;code&gt;gpio-leds&amp;nbsp;&lt;/code&gt;are using GPIO or GPIOTE (for current project I don&amp;#39;t need GPIOTE).[/quote]
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;They are using GPIO, not GPIOTE.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Correction: Whenever you use the GPIO_INT_EDGE flag on an input pin it will use a dedicated GPIOTE IN channel. If this flag is not used you will only use GPIO.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;GPIOTE OUT channels are only supported by using the nrfx_gpiote driver directly.&amp;nbsp;&lt;/p&gt;
[quote user="bzgec"]I would like to have an option to select when to use GPIO and when GPIOTE.&lt;br /&gt;Could something like&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/reference/devicetree/bindings/pinctrl/st%2Cstm32-pinctrl.html#dtbinding-st-stm32-pinctrl"&gt;st,stm32-pinctrl&lt;/a&gt;&amp;nbsp;be created for nordic?[/quote]
&lt;p&gt;This was designed for the ST devices, which has a different GPIO architecture than we have in the nRF devices.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In other words it doesn&amp;#39;t make sense to implement a similar driver for Nordic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The higher level Zephyr API&amp;#39;s are still similar, so that you can write code that will run on either ST or Nordic (or any other supported MCU&amp;#39;s).&amp;nbsp;&lt;br /&gt;It is just the DTS configuration that will have to be different.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure GPIO in devicetree as "nordic,nrf-gpio" and not as "gpio-leds"</title><link>https://devzone.nordicsemi.com/thread/332780?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 10:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a4de6a9-0c6b-44c6-9a65-2b08a097d024</guid><dc:creator>bzgec</dc:creator><description>&lt;p&gt;For current project I am using GPIOs only for simple LED toggling, turning ON and OFF some MOSFET, reading some input pins... Nothing that can&amp;#39;t be done with&amp;nbsp;&lt;code&gt;gpio-keys&lt;/code&gt; and &lt;code&gt;gpio-leds,&lt;/code&gt; but I don&amp;#39;t want to.&lt;/p&gt;
&lt;p&gt;It is bothering me because I don&amp;#39;t know if &lt;code&gt;gpio-keys&lt;/code&gt;&lt;span&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;code&gt;gpio-leds&amp;nbsp;&lt;/code&gt;are using GPIO or GPIOTE (for current project I don&amp;#39;t need GPIOTE).&lt;/p&gt;
&lt;p&gt;I would like to have an option to select when to use GPIO and when GPIOTE.&lt;br /&gt;Could something like&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/reference/devicetree/bindings/pinctrl/st%2Cstm32-pinctrl.html#dtbinding-st-stm32-pinctrl"&gt;st,stm32-pinctrl&lt;/a&gt;&amp;nbsp;be created for nordic?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure GPIO in devicetree as "nordic,nrf-gpio" and not as "gpio-leds"</title><link>https://devzone.nordicsemi.com/thread/332775?ContentTypeID=1</link><pubDate>Wed, 06 Oct 2021 09:33:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0b6b0fb-95e9-48c0-af10-be6730af29e0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you give me a bit of information regarding what you are planning to use the GPIO pins for?&lt;/p&gt;
&lt;p&gt;The purpose of the GPIOTE module is to connect pins into the task/event system of the nRF devices, which allow you to do things such as automatically toggling a pin based on a timer, or trigger a capture in a timer when a pin toggles. Another example is having a pin toggle high every time the RADIO module is sending a packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure GPIO in devicetree as "nordic,nrf-gpio" and not as "gpio-leds"</title><link>https://devzone.nordicsemi.com/thread/332632?ContentTypeID=1</link><pubDate>Tue, 05 Oct 2021 13:00:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd18e768-e83c-4635-93ba-9c40baeecbc2</guid><dc:creator>bzgec</dc:creator><description>[quote userid="2116" url="~/f/nordic-q-a/80298/configure-gpio-in-devicetree-as-nordic-nrf-gpio-and-not-as-gpio-leds/332613#332613"]For&amp;nbsp;setting up general GPIO&amp;#39;s (not using the GPIOTE module) I would recommend using the gpio-keys node, as explained in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72618/extra-gpios-in-board-overlay-for-nrf9160dk"&gt;this case&lt;/a&gt;.[/quote]
&lt;p&gt;Is there some documentation when GPIO is used instead of GPIOTE?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/80298/configure-gpio-in-devicetree-as-nordic-nrf-gpio-and-not-as-gpio-leds/332613#332613"]&lt;p&gt;I recently made my own little example showing how to add an overlay with additional GPIO&amp;#39;s for the nRF5340. It should work fine on other Nordic boards if you just rename the overlay file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_5F00_w_5F00_gpio_5F00_overlay.zip"&gt;blinky_w_gpio_overlay.zip&lt;/a&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Thank you for the example, but I don&amp;#39;t have problem using &lt;code&gt;gpio-keys&lt;/code&gt; nor &lt;code&gt;gpio-leds&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I would like to use something like&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/reference/devicetree/bindings/pinctrl/st%2Cstm32-pinctrl.html#dtbinding-st-stm32-pinctrl"&gt;st,stm32-pinctrl&lt;/a&gt;&amp;nbsp;instead of&amp;nbsp;&lt;code&gt;gpio-keys&lt;/code&gt;&lt;span&gt;&amp;nbsp;or&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;gpio-leds.&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure GPIO in devicetree as "nordic,nrf-gpio" and not as "gpio-leds"</title><link>https://devzone.nordicsemi.com/thread/332613?ContentTypeID=1</link><pubDate>Tue, 05 Oct 2021 12:21:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6ff07e2-d890-4b5e-b6b9-6d13973f0133</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For&amp;nbsp;setting up general GPIO&amp;#39;s (not using the GPIOTE module) I would recommend using the gpio-keys node, as explained in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/72618/extra-gpios-in-board-overlay-for-nrf9160dk"&gt;this case&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I recently made my own little example showing how to add an overlay with additional GPIO&amp;#39;s for the nRF5340. It should work fine on other Nordic boards if you just rename the overlay file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/blinky_5F00_w_5F00_gpio_5F00_overlay.zip"&gt;devzone.nordicsemi.com/.../blinky_5F00_w_5F00_gpio_5F00_overlay.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure GPIO in devicetree as "nordic,nrf-gpio" and not as "gpio-leds"</title><link>https://devzone.nordicsemi.com/thread/332550?ContentTypeID=1</link><pubDate>Tue, 05 Oct 2021 09:39:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ec35ee9-b07d-4913-9d11-6872d863bb4e</guid><dc:creator>bzgec</dc:creator><description>&lt;p&gt;I am starting to think that I am misunderstanding something, because&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/reference/devicetree/bindings/gpio/gpio-leds.html#dtbinding-gpio-leds"&gt;gpio-leds&lt;/a&gt;&amp;nbsp;has&amp;nbsp;&lt;code&gt;Child node properties&amp;nbsp;&lt;/code&gt;while&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/reference/devicetree/bindings/gpio/nordic%2Cnrf-gpio.html"&gt;nordic,nrf-gpio&lt;/a&gt;&amp;nbsp;does not.&lt;br /&gt;&lt;br /&gt;I am asking all of this because I would like to define when to use &lt;code&gt;gpio&lt;/code&gt; and when &lt;code&gt;gpiote &lt;/code&gt;driver.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>