<?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>GPIO pin configuration using Devicetree</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101607/gpio-pin-configuration-using-devicetree</link><description>Hello. 
 I have several custom boards based on NRF52832 QFAA chip. Pin mappings on these boards are slightly different, but the purposes are the same, so I want to use one project with different pinouts. AFAIK, the right way to do it is creating dts/overlay</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Jul 2023 13:06:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101607/gpio-pin-configuration-using-devicetree" /><item><title>RE: GPIO pin configuration using Devicetree</title><link>https://devzone.nordicsemi.com/thread/435993?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2023 13:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd68e29b-7629-44e4-84cf-56cf91bb794d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;My coworker Marte has posted a sample to demonstrate how you can add custom bindings on GitHub. You can find it here: &lt;a href="https://github.com/martelmy/NCS_examples/tree/main/devicetree/devicetree_custom_device"&gt;https://github.com/martelmy/NCS_examples/tree/main/devicetree/devicetree_custom_device&lt;/a&gt;. Additionally, there is a similar sample available in Zephyr: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/basic/custom_dts_binding/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/basic/custom_dts_binding/README.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Optionally, you can create an out-of-tree driver as shown in this sample: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/application_development/out_of_tree_driver/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/application_development/out_of_tree_driver/README.html&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO pin configuration using Devicetree</title><link>https://devzone.nordicsemi.com/thread/435979?ContentTypeID=1</link><pubDate>Wed, 12 Jul 2023 12:50:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a752a834-1e48-4dee-90b2-69bbd2e0613c</guid><dc:creator>piotrosiotr</dc:creator><description>&lt;p&gt;OK, thank you, that works perfectly for me. But I&amp;#39;ve got another question: what if I want to create a custom devicetree binding for a &amp;quot;compatible&amp;quot; property? How to deal with it? For example, I have a shift register on my board and I want to declare in dts file and use it like a usual gpio pin. Should I create a custom driver for it? In which way I should use &amp;quot;compatible&amp;quot; property?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO pin configuration using Devicetree</title><link>https://devzone.nordicsemi.com/thread/435221?ContentTypeID=1</link><pubDate>Fri, 07 Jul 2023 11:42:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4f9cb4b-a5c9-492b-909f-a59e16459546</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You were on the right track by using the device tree to assign the control pin. However, in order to define a new node as you did, you also need to select a suitable&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/bindings.html#devicetree-bindings"&gt;device tree binding&lt;/a&gt; by using the &amp;#39;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/bindings-syntax.html#compatible"&gt;compatible&lt;/a&gt;&amp;#39; property.&lt;/p&gt;
&lt;p&gt;Since you will be using the output to control power, it would make sense to&amp;nbsp;select the &amp;#39;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/bindings/regulator/regulator-fixed.html#regulator-fixed"&gt;regulator-fixed&lt;/a&gt;&lt;span&gt;&amp;#39;&lt;/span&gt;&amp;#39; binding and add CONFIG_REGULATOR=y to your prj.conf file. This will enable the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/regulators.html#regulators"&gt;Regulator subsystem&lt;/a&gt; in your application.&lt;/p&gt;
&lt;p&gt;Here is an example I made for this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/regulator_5F00_example.zip"&gt;devzone.nordicsemi.com/.../regulator_5F00_example.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>