<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: About pinctrl Device Tree Bindings and PINMUX in S32G</title>
    <link>https://community.nxp.com/t5/S32G/About-pinctrl-Device-Tree-Bindings-and-PINMUX/m-p/1949877#M10662</link>
    <description>&lt;P&gt;Hello, &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239861"&gt;@GuilhermeS32G3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the delay.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You may find it in S32G2/3 RM, specially, S32G_IOMUX attached to the RM hold more information on it.&lt;/LI&gt;
&lt;LI&gt;It could be found also in the document above, simply mean different settings.&lt;/LI&gt;
&lt;LI&gt;You may carefully reference the datasheet of the new phy, it is possible that the pin settings you mentioned need to be modified in order to adapt to the new hardware.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Chenyin&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2024 07:56:21 GMT</pubDate>
    <dc:creator>chenyin_h</dc:creator>
    <dc:date>2024-09-09T07:56:21Z</dc:date>
    <item>
      <title>About pinctrl Device Tree Bindings and PINMUX</title>
      <link>https://community.nxp.com/t5/S32G/About-pinctrl-Device-Tree-Bindings-and-PINMUX/m-p/1947842#M10627</link>
      <description>&lt;P&gt;Dear NXP fellows,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This questions is related to my &lt;A title="Differences between Kernel and ATF in DTSI pin configs" href="https://community.nxp.com/t5/S32G/Differences-between-Kernel-and-ATF-in-DTSI-pin-configs/td-p/1946736/jump-to/first-unread-message" target="_self"&gt;previous question&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I would like to get a better understanding of the pin mux and how does it relate the hardware pin to the device tree mapping.&lt;/P&gt;&lt;P&gt;Let's suppose I am using S32G274ARDB board with BSP35.0.&lt;/P&gt;&lt;P&gt;When I look at the schematic design file of the board I see that it uses the PFE_MAC2 to connect to the Micrel KSZ9031 Phy Device through RGMII:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="P002.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/297253iA175F5634CA57F8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="P002.png" alt="P002.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So, if I look at the schematic of the KSZ9031 device, I see that its pin 25 (TX_EN) is connected to the signal RGMIIB_TXC, which corresponds to the pin V20 (PFE_MAC2_TX_CLK) of the P32G274AABK1VUCT:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="P001.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/297254i93DC22ED95E2CE75/image-size/large?v=v2&amp;amp;px=999" role="button" title="P001.png" alt="P001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok, so if I take a look at the Kernel device tree file &lt;A href="https://github.com/nxp-auto-linux/linux/blob/release/bsp35.0-5.10.145-rt/arch/arm64/boot/dts/freescale/s32gxxxa-rdb.dtsi" target="_self"&gt;s32gxxxx.dtsi&lt;/A&gt;, I see that the pfe_netif2 (PFE_MAC2) is using phy-handle = &amp;lt;&amp;amp;pfe_mdio_b_phy4&amp;gt; or ethernet-phy@4 and pfe2rgmiib_pins is defined in the following way:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;	pfe2rgmiib_pins: pfe2rgmiib_pins {
		pfe2rgmiib_grp0 {
			pinmux = &amp;lt;S32CC_PINMUX(78, FUNC2)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(144, FUNC2)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(113, FUNC2)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(114, FUNC2)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(115, FUNC2)&amp;gt;;
			output-enable;
			slew-rate = &amp;lt;S32CC_FAST_SLEW_166MHZ&amp;gt;;
		};

		pfe2rgmiib_grp1 {
			pinmux = &amp;lt;S32CC_PINMUX(116, FUNC0)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(117, FUNC0)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(118, FUNC0)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(119, FUNC0)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(120, FUNC0)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(121, FUNC0)&amp;gt;;
			input-enable;
			slew-rate = &amp;lt;S32CC_FAST_SLEW_166MHZ&amp;gt;;
		};

		pfe2rgmiib_grp2 {
			pinmux = &amp;lt;S32CC_PINMUX(879, FUNC3)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(885, FUNC3)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(881, FUNC3)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(882, FUNC3)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(883, FUNC3)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(884, FUNC3)&amp;gt;,
				 &amp;lt;S32CC_PINMUX(886, FUNC3)&amp;gt;;
		};

		pfe2rgmiib_grp3 {
			pinmux = &amp;lt;S32CC_PINMUX(122, FUNC2)&amp;gt;;
			output-enable;
			slew-rate = &amp;lt;S32CC_FAST_SLEW_166MHZ&amp;gt;;
			bias-pull-up;
		};
	};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok, from the file &lt;A href="https://github.com/nxp-auto-linux/linux/blob/release/bsp35.0-5.10.145-rt/include/dt-bindings/pinctrl/s32cc-pinfunc.h" target="_self"&gt;s32cc-pinfunc.h&lt;/A&gt; I see that the S32CC_PINMUX function is defined as follows:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define FUNC0	0
#define FUNC1	1
#define FUNC2	2
#define FUNC3	3
#define FUNC4	4
#define FUNC5	5
#define FUNC6	6
#define FUNC7	7

#define S32CC_PINMUX(PIN, FUNC) (((PIN) &amp;lt;&amp;lt; 4) | (FUNC))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok, so from an &lt;A href="https://github.com/bitsensing/hrr40_linux/blob/5d44a169784445c29c9465a7a958f62c61d5ced2/include/dt-bindings/pinctrl/s32g-pinctrl.h" target="_self"&gt;external repository&lt;/A&gt;, I found that definition:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define S32_G274_PAD_PH10__PFE2_TXCLK_IN	886 PAD_CTL_SRC_SIG_SEL3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That means the PIN 886 corresponds to PH10__PFE2_TXCLK_IN.&lt;/P&gt;&lt;P&gt;And my questions are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Where does this number 886 comes from? Is there a documentation somewhere that associates this number with a specific pin in the hardware?&lt;/LI&gt;&lt;LI&gt;What is the meaning of FUNC0, FUNC1, FUNC2, etc.?&lt;/LI&gt;&lt;LI&gt;If in my custom board design I decide to replace Micrel KSZ9031 Phy Device by a Marvell Phy Device, can I still use the same pfe2rgmiib_pins or I need to adapt it to the current hardware?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your support,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Guilherme&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 05:48:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/About-pinctrl-Device-Tree-Bindings-and-PINMUX/m-p/1947842#M10627</guid>
      <dc:creator>GuilhermeS32G3</dc:creator>
      <dc:date>2024-09-05T05:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: About pinctrl Device Tree Bindings and PINMUX</title>
      <link>https://community.nxp.com/t5/S32G/About-pinctrl-Device-Tree-Bindings-and-PINMUX/m-p/1949877#M10662</link>
      <description>&lt;P&gt;Hello, &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239861"&gt;@GuilhermeS32G3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the delay.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;You may find it in S32G2/3 RM, specially, S32G_IOMUX attached to the RM hold more information on it.&lt;/LI&gt;
&lt;LI&gt;It could be found also in the document above, simply mean different settings.&lt;/LI&gt;
&lt;LI&gt;You may carefully reference the datasheet of the new phy, it is possible that the pin settings you mentioned need to be modified in order to adapt to the new hardware.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Chenyin&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 07:56:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/About-pinctrl-Device-Tree-Bindings-and-PINMUX/m-p/1949877#M10662</guid>
      <dc:creator>chenyin_h</dc:creator>
      <dc:date>2024-09-09T07:56:21Z</dc:date>
    </item>
  </channel>
</rss>

