<?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>S32GのトピックRe: S32G2 ATF GPIO control</title>
    <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1666792#M3594</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think it may be an error caused by defined too many GPIO-HOG.&lt;BR /&gt;Because when I define only one PH07 no error occurs.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It seems that I need to operate GPIO actions in u-boot's board_late_init()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you have any example or good suggestions on GPIO and IOMUX operation under u-boot?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 08:38:57 GMT</pubDate>
    <dc:creator>petertseng</dc:creator>
    <dc:date>2023-06-09T08:38:57Z</dc:date>
    <item>
      <title>S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1663852#M3524</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm trying to port BSP 33.0 to a custom S32G274A board.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And&amp;nbsp;I need to control the GPIO output to drive an external circuit at power on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I added in the s32_plat_config_pinctrl function of arm-trusted-firmware_2.5/plat/nxp/s32/s32_pinctrl.c:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#define SIUL2_MSCR_S32_G1_OPEN_DRAIN_GPIO_OUT \
	(SIUL2_MSCR_S32_G1_OBE_EN \
	|SIUL2_MSCR_S32_G1_ODE_EN \
	|SIUL2_MSCR_MUX_MODE_ALT0)

void s32_plat_config_pinctrl(void)
{
	linflex_config_pinctrl(S32_LINFLEX_MODULE);
	sdhc_config_pinctrl();

	/* PJ05: (open drain output gpio) */
	mmio_write_32(SIUL2_0_MSCRn(149), SIUL2_MSCR_S32_G1_OPEN_DRAIN_GPIO_OUT);
	mmio_write_32(SIUL2_0_MSCRn(663), 0x0);

	/* PA06: (open drain output gpio) */
	mmio_write_32(SIUL2_0_MSCRn(6), SIUL2_MSCR_S32_G1_OPEN_DRAIN_GPIO_OUT);
	mmio_write_32(SIUL2_0_MSCRn(667), 0x0);
	
	/* PJ07: (open drain output gpio) */
	mmio_write_32(SIUL2_0_MSCRn(151), SIUL2_MSCR_S32_G1_OPEN_DRAIN_GPIO_OUT);
	mmio_write_32(SIUL2_0_MSCRn(655), 0x0);


}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But how to drive the GPIO pin to output HI/LO?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards&lt;BR /&gt;Peter&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 03:36:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1663852#M3524</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-06-06T03:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1664547#M3544</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We may not understand the overall scope of your application, but you can set/clear a GPIO directly from the uboot terminal, if it is feasible under your application flow. You can set/clear a GPIO (i.e. PA_06) doing the following command:&lt;/P&gt;
&lt;UL&gt;
&lt;LI data-unlink="true"&gt;Set:&amp;nbsp;gpio set siul2-gpio06&lt;/LI&gt;
&lt;LI data-unlink="true"&gt;Clear:&amp;nbsp;gpio clear siul2-gpio06&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;As for the code method, you need to write to the needed GPDOn register (or PGPDOn, if you want to). Below will be the code method (with GPDOn) for clearing PA_06 (since LED_BLUE is connected under RDB2, we can see the result as the LED turning ON):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#define SIUL2_0_GPDO_BASE	(SIUL2_0_BASE_ADDR + 0x00001300)
#define SIUL2_0_GPDO_6_BASE	(SIUL2_0_GPDO_BASE + 0x00000005)
#define SIUL2_MSCR_S32_G1_SRE_7            		(7 &amp;lt;&amp;lt; 14)

#define SIUL2_MSCR_S32G_G2_PORT_CTRL_OBE_P_P	\
	(SIUL2_MSCR_S32_G1_SRE_7 | 	\
	 SIUL2_MSCR_S32_G1_OBE_EN)

#define SIUL2_MSCR_S32G_G2_PORT_CTRL_OBE_O_D	\
	(SIUL2_MSCR_S32_G1_SRE_7 | 	\
	 SIUL2_MSCR_S32_G1_OBE_EN |	\
	 SIUL2_MSCR_S32_G1_ODE_EN)

void gpio_config_pinctrl(void){
	/* PA06 pad: GPIO[6] GPO */
	mmio_write_32(SIUL2_0_MSCRn(6), SIUL2_MSCR_S32G_G2_PORT_CTRL_OBE_P_P);
}

void gpio_set_state(int lvl){
	mmio_write_8(SIUL2_0_GPDO_6_BASE, lvl ? 0x1 : 0x0);
}

void s32_plat_config_pinctrl(void)
{
	linflex_config_pinctrl(S32_LINFLEX_MODULE);
	sdhc_config_pinctrl();
	gpio_config_pinctrl();
	gpio_set_state(0);
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since we only modified ATF, once we enter Linux itself we lose control over the GPIO, since the BSP configures the same pin with a different function. Beware of this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please, let us know.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 18:38:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1664547#M3544</guid>
      <dc:creator>Daniel-Aguirre</dc:creator>
      <dc:date>2023-06-06T18:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1666067#M3569</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I also tried to define the PH07 pin using gpio-hog&lt;/P&gt;&lt;P&gt;u-boot_2020.4/configs/s32g274ardb2_defconfig&lt;/P&gt;&lt;LI-CODE lang="c"&gt;--- a/configs/s32g274ardb2_defconfig
+++ b/configs/s32g274ardb2_defconfig
@@ -2,3 +2,4 @@ CONFIG_ARM=y
 CONFIG_ARCH_S32G2=y
 # CONFIG_SPI_FLASH_BAR is not set
 CONFIG_SD_BOOT=y
+CONFIG_GPIO_HOG=y&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;arm-trusted-firmware_2.5/fdts/s32gxxxa-rdb.dtsi&lt;/P&gt;&lt;LI-CODE lang="c"&gt;--- a/fdts/s32gxxxa-rdb.dtsi
+++ b/fdts/s32gxxxa-rdb.dtsi

+/* GPIO1 */
+&amp;amp;gpio1 {
+	pinctrl-names = "default";
+	pinctrl-0 = &amp;lt;&amp;amp;pinctrl1_gpio_hog&amp;gt;;
+
+	/* PH07 */
+	PH07 {
+		gpio-hog;
+		gpios = &amp;lt;119 0&amp;gt;;
+		output-low;
+		line-name = "PV4_EN";
+	};
+};


+		pinctrl1_gpio_hog: pinctrl1_gpio_hog {
+			fsl,pins = &amp;lt;PH07_MSCR_S32G SIUL2_MSCR_GPIO&amp;gt;;
+ 		};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but get the error&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;U-Boot 2020.04+g9cdfca686e (Jun 10 2022 - 11:46:41 +0000)&lt;/P&gt;&lt;P&gt;CPU: NXP S32G274A rev. 2.0&lt;BR /&gt;Model: NXP S32G274A-RDB2&lt;BR /&gt;DRAM: 3.5 GiB&lt;BR /&gt;MMC: FSL_SDHC: 0&lt;BR /&gt;Loading Environment from MMC... OK&lt;BR /&gt;Using external clock for PCIe0, CRNS&lt;BR /&gt;Configuring PCIe0 as RootComplex(x2)&lt;BR /&gt;Using external clock for PCIe1, CRNS&lt;BR /&gt;Frequency 125Mhz configured for PCIe1&lt;BR /&gt;Configuring PCIe1 as SGMII(x2) [XPCS0 2.5G, XPCS1 OFF]&lt;BR /&gt;Setting PCI Device and Vendor IDs to 0x4002:0x1957&lt;BR /&gt;PCIe0: Failed to get link up&lt;BR /&gt;Pcie0: LINK_DBG_1: 0x00000000, LINK_DBG_2: 0x00000800 (expected 0x000000d1)&lt;BR /&gt;DEBUG_R0: 0x0043f300, DEBUG_R1: 0x08200000&lt;BR /&gt;PCI: Failed autoconfig bar 20&lt;BR /&gt;PCI: Failed autoconfig bar 24&lt;BR /&gt;PCIe1: Not configuring PCIe, PHY not configured&lt;BR /&gt;In: serial@401c8000&lt;BR /&gt;Out: serial@401c8000&lt;BR /&gt;Err: serial@401c8000&lt;BR /&gt;Failed to probe device PV4_EN err: -16&lt;BR /&gt;initcall sequence 00000000ffb2a408 failed at call 00000000ffad43e4 (err=-16)&lt;BR /&gt;### ERROR ### Please RESET the board ###&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to replace PJ05 or PJ11, it can be started normally, but PH07 will have an error.&lt;/P&gt;&lt;P&gt;Is there a special for the PH07 pins?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 09:32:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1666067#M3569</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-06-08T09:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1666423#M3579</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We don't seem to reproduce the behavior you are seeing. Instead of the code you did under "&lt;SPAN&gt;fdts/s32gxxxa-rdb.dtsi&lt;/SPAN&gt;", we just add the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;&amp;amp;pfe {
	status = "okay";
};

+&amp;amp;gpio {
+	LED-hog{
+		gpio-hog;
+		gpios = &amp;lt;119 0&amp;gt;;
+		output-low;
+		line-name = "PA_06_LED";
+	};
+};

/* IO Expander  */
&amp;amp;i2c0 {&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since PH_07 (GPIO 119) under RDB2 is configured to work under the PFE2 interface, we do not have anything humanly visible to confirm the change. Still, we did use the same code with the difference of selecting "gpios=&amp;lt;6 0&amp;gt;" and we did see the LED turn ON (as seen under the "line-name" property).&lt;/P&gt;
&lt;P&gt;On both configurations, we could log into Linux no problem.&lt;/P&gt;
&lt;P&gt;Please, let us know.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 20:58:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1666423#M3579</guid>
      <dc:creator>Daniel-Aguirre</dc:creator>
      <dc:date>2023-06-08T20:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1666792#M3594</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think it may be an error caused by defined too many GPIO-HOG.&lt;BR /&gt;Because when I define only one PH07 no error occurs.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It seems that I need to operate GPIO actions in u-boot's board_late_init()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you have any example or good suggestions on GPIO and IOMUX operation under u-boot?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 08:38:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1666792#M3594</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-06-09T08:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1667035#M3598</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your feedback.&lt;/P&gt;
&lt;P&gt;There is no documentation on this regard. The only information is the one provided inside the "doc" folder under the uboot path. Aside from that, nothing else. We do apologize.&lt;/P&gt;
&lt;P&gt;Still, if you have questions on why your implementation is not working, we might be able to continue helping.&lt;/P&gt;
&lt;P&gt;Please, let us know.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:22:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1667035#M3598</guid>
      <dc:creator>Daniel-Aguirre</dc:creator>
      <dc:date>2023-06-09T15:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1670992#M3692</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The BSP33.0 uses the release/bsp33.0-2020.04 branch version&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://github.com/nxp-auto-linux/u-boot/tree/release/bsp33.0-2020.04" target="_blank"&gt;https://github.com/nxp-auto-linux/u-boot/tree/release/bsp33.0-2020.04&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I found that the GPIO number of PH07 in this version is not 119 but 109.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define SIUL2_0_BASE_ADDR              0x4009C000
#define SIUL2_1_BASE_ADDR              0x44010000
#define SIUL2_0_MSCR_BASE              (SIUL2_0_BASE_ADDR + 0x00000240)
#define SIUL2_1_MSCR_BASE              (SIUL2_1_BASE_ADDR + 0x00000400)
/* gpio output (open drain) */
#define        SIUL2_MSCR_GPIO_OUT_OD  (SIUL2_MSCR_S32_G1_MUX_ID_0 | \
       SIUL2_MSCR_S32_G1_ODE | SIUL2_MSCR_S32_G1_OBE)

static inline void *s32g2_mscr_reg(void __iomem *base_addr, unsigned int offset)
{
       uintptr_t addr;
       addr = (uintptr_t)base_addr + offset * 4;
       return (void *)addr;
}

/* MSCR 0-101 */
#define SIUL2_0_MSCRn(i)               s32g2_mscr_reg((void __iomem *)SIUL2_0_MSCR_BASE, i)
/* MSCR 112-190 */
#define SIUL2_1_MSCRn(i)               s32g2_mscr_reg((void __iomem *)SIUL2_1_MSCR_BASE, (i-112))

static inline unsigned s32g2_pad_to_gpio(unsigned pad)
{
       if ((pad &amp;gt;=0) &amp;amp;&amp;amp; (pad &amp;lt;= 101)) {
               /* PAD 0-101 --&amp;gt; GPIO 0-101 */
               return pad;
       } else if ((pad &amp;gt;=112) &amp;amp;&amp;amp; (pad &amp;lt;= 122)) {
               /* PAD 112-122 --&amp;gt; GPIO 102-112 */
               return (pad-10);
       } else if ((pad &amp;gt;=144) &amp;amp;&amp;amp; (pad &amp;lt;= 190)) {
               /* PAD 144-190 --&amp;gt; GPIO 113-159 */
               return (pad-31);
       }
       return 200;
}

#define S32G2_GPIO(i)                  s32g2_pad_to_gpio(i)

...

int board_late_init(void)
{
...

       /* PH07 */
       writel(SIUL2_MSCR_GPIO_OUT_OD, SIUL2_0_MSCRn(119));
       gpio_request(S32G2_GPIO(119), "PH07");
       gpio_direction_output(S32G2_GPIO(119), 0);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the PH07 pin is not set in U-BOOT, the kernel can boot normally.&lt;BR /&gt;But as long as the PH07 pin is set in U-BOOT, it will cause a kernel panic&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;U-Boot 2020.04+g9cdfca686e (Jun 10 2022 - 11:46:41 +0000)&lt;/P&gt;&lt;P&gt;CPU: NXP S32G274A rev. 2.0&lt;BR /&gt;Model: NXP S32G274A-RDB2&lt;BR /&gt;DRAM: 3.5 GiB&lt;BR /&gt;MMC: FSL_SDHC: 0&lt;BR /&gt;Loading Environment from MMC... OK&lt;BR /&gt;Using external clock for PCIe0, CRNS&lt;BR /&gt;Configuring PCIe0 as RootComplex(x2)&lt;BR /&gt;Using external clock for PCIe1, CRNS&lt;BR /&gt;Frequency 100Mhz configured for PCIe1&lt;BR /&gt;Configuring PCIe1 as RootComplexSGMII(x2) [XPCS0 1G, XPCS1 1G]&lt;BR /&gt;ERROR: Invalid XPCS config on PCIe1&lt;BR /&gt;XPCS1 power-up failed&lt;BR /&gt;Setting PCI Device and Vendor IDs to 0x4002:0x1957&lt;BR /&gt;PCIe0: Link up! X1, Gen2&lt;BR /&gt;Device 'pcie@44100000': seq 1 is in use by 'pci_0:0.0'&lt;BR /&gt;Setting PCI Device and Vendor IDs to 0x4002:0x1957&lt;BR /&gt;PCIe1: Link up! X1, Gen3&lt;BR /&gt;BusDevFun VendorId DeviceId Device Class Sub-Class&lt;BR /&gt;______________________________________________________________________&lt;BR /&gt;pcie@40400000 RootComplex&lt;BR /&gt;| `-- 00:00.00 0x1957 0x4002 Bridge device 0x04&lt;BR /&gt;| |-- 01:00.000x1b4b 0x2b43 Network controller 0x00&lt;BR /&gt;| `-- 01:00.010x1b4b 0x2b44 Network controller 0x00&lt;BR /&gt;pcie@44100000 RootComplex&lt;BR /&gt;| `-- 02:00.00 0x1957 0x4002 Bridge device 0x04&lt;BR /&gt;| `-- 03:00.000x1344 0x6001 Mass storage controller 0x08&lt;BR /&gt;In: serial@401c8000&lt;BR /&gt;Out: serial@401c8000&lt;BR /&gt;Err: serial@401c8000&lt;BR /&gt;Board revision: RDB2/GLDBOX Revision D&lt;BR /&gt;Net: EQOS phy: rgmii @ 3&lt;/P&gt;&lt;P&gt;Warning: eth_eqos (eth0) using random MAC address - 62:91:7d:20:50:f3&lt;BR /&gt;eth0: eth_eqosSerDes 0 was not initialized&lt;BR /&gt;Emac 2 not initialized&lt;BR /&gt;Invalid sgmii configuration for emac index 2&lt;/P&gt;&lt;P&gt;Hit any key to stop autoboot: 0&lt;BR /&gt;SerDes 0 was not initialized&lt;BR /&gt;Emac 2 not initialized&lt;BR /&gt;Invalid sgmii configuration for emac index 2&lt;BR /&gt;switch to partitions #0, OK&lt;BR /&gt;mmc0 is current device&lt;BR /&gt;13824008 bytes read in 610 ms (21.6 MiB/s)&lt;BR /&gt;Booting from mmc ...&lt;BR /&gt;44079 bytes read in 18 ms (2.3 MiB/s)&lt;BR /&gt;## Flattened Device Tree blob at 83000000&lt;BR /&gt;Booting using the fdt blob at 0x83000000&lt;BR /&gt;Using Device Tree in place at 0000000083000000, end 000000008300dc2e&lt;BR /&gt;Invalid PCIe1 lanes config&lt;BR /&gt;Failed to set mode for PCIe1&lt;BR /&gt;Invalid SerDes1 mode&lt;BR /&gt;Failed to set mode for SerDes1&lt;BR /&gt;SerDes 0 was not initialized&lt;BR /&gt;Emac 2 not initialized&lt;BR /&gt;Invalid sgmii configuration for emac index 2&lt;BR /&gt;DT: Disabling PFE&lt;/P&gt;&lt;P&gt;Starting kernel ...&lt;/P&gt;&lt;P&gt;[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]&lt;BR /&gt;[ 0.000000] Linux version 5.10.109-rt65+g0bace7fde5f5 (oe-user@oe-host) (aarch64-fsl-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Fri Jun 24 15:01:08 UTC 2022&lt;BR /&gt;[ 0.000000] Machine model: NXP S32G274A-RDB2&lt;BR /&gt;[ 0.000000] earlycon: linflex0 at MMIO 0x00000000401c8000 (options '115200n8')&lt;BR /&gt;[ 0.000000] printk: bootconsole [linflex0] enabled&lt;BR /&gt;[ 0.000000] SError Interrupt on CPU0, code 0xbf000002 -- SError&lt;BR /&gt;[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.109-rt65+g0bace7fde5f5 #1&lt;BR /&gt;[ 0.000000] Hardware name: NXP S32G274A-RDB2 (DT)&lt;BR /&gt;[ 0.000000] pstate: 60000085 (nZCv daIf -PAN -UAO -TCO BTYPE=--)&lt;BR /&gt;[ 0.000000] pc : setup_arch+0x164/0x58c&lt;BR /&gt;[ 0.000000] lr : setup_arch+0x15c/0x58c&lt;BR /&gt;[ 0.000000] sp : ffffffc010c93ef0&lt;BR /&gt;[ 0.000000] x29: ffffffc010c93ef0 x28: 0000000080b40018&lt;BR /&gt;[ 0.000000] x27: 00000000ffaa27f0 x26: 0000000000000000&lt;BR /&gt;[ 0.000000] x25: 00000000ffb2f400 x24: 00000000ffdf1298&lt;BR /&gt;[ 0.000000] x23: ffffffc010d33000 x22: ffffffc010c9e380&lt;BR /&gt;[ 0.000000] x21: fffffffefe600094 x20: ffffffc010ce7088&lt;BR /&gt;[ 0.000000] x19: ffffffc010000000 x18: 0000000000000030&lt;BR /&gt;[ 0.000000] x17: 0000000000001800 x16: 0000000000000000&lt;BR /&gt;[ 0.000000] x15: ffffffc010c9e7e8 x14: ffffffffffffffff&lt;BR /&gt;[ 0.000000] x13: 0000000000000000 x12: 0000000000000028&lt;BR /&gt;[ 0.000000] x11: 0000000000000015 x10: 0101010101010101&lt;BR /&gt;[ 0.000000] x9 : 3334ff6b6e6e6f5e x8 : 7f7f7f7f7f7f7f7f&lt;BR /&gt;[ 0.000000] x7 : 736d647164676e62 x6 : 000006161d090b74&lt;BR /&gt;[ 0.000000] x5 : 740b091d16060000 x4 : 0000000000000000&lt;BR /&gt;[ 0.000000] x3 : ce6ded8ca0000000 x2 : 000000000000000c&lt;BR /&gt;[ 0.000000] x1 : 0000000000000000 x0 : 0000000000000080&lt;BR /&gt;[ 0.000000] Kernel panic - not syncing:&lt;BR /&gt;[ 0.000000] Asynchronous SError Interrupt&lt;BR /&gt;[ 0.000000] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What could be the reason for this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 09:04:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1670992#M3692</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-06-16T09:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1672194#M3733</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We cannot replicate the exact issue you are seeing on your setup.&lt;/P&gt;
&lt;P&gt;We have configured both PA06 and PH07 on our board under BSP33.0 as follows:&lt;/P&gt;
&lt;P&gt;arm-trusted-firmware\fdts\s32gxxxa-rdb.dtsi&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielAguirre_0-1687211115082.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/228398iBEF8D65FADD73E7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielAguirre_0-1687211115082.png" alt="DanielAguirre_0-1687211115082.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When we see the status under u-boot, we have the following:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielAguirre_1-1687211150174.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/228399iC301D3831A61031C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielAguirre_1-1687211150174.png" alt="DanielAguirre_1-1687211150174.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What we are seeing is that you are setting PH07 under SIUL2_0, which is incorrect, since PH07 corresponds to SIUL2_1. As for the number, it is the assigned logical number, but referring to PH07 as 119 should be the correct way.&lt;/P&gt;
&lt;P&gt;Please, let us know.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 21:47:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1672194#M3733</guid>
      <dc:creator>Daniel-Aguirre</dc:creator>
      <dc:date>2023-06-19T21:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1673240#M3774</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Good jobs!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When I set setting PH07 under SIUL2_1 it does alleviate the kernel panic issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when setting both PJ07(#151) and PH07(#119) with gpio-hog.&lt;/P&gt;&lt;P&gt;I found that the &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;&amp;lt;pinctrl_offset&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt; value returned by &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;s32cc_get_pinctrl_offset()&lt;/FONT&gt;&lt;/STRONG&gt; is the same (=119).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this caused by the lack of adding &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&amp;lt;range-&amp;gt;gpio_offset&amp;gt;&lt;/STRONG&gt;&lt;/FONT&gt; in &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;s32cc_gpio_get_xlate()&lt;/FONT&gt;&lt;/STRONG&gt;?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;diff --git a/drivers/gpio/gpio-s32cc.c b/drivers/gpio/gpio-s32cc.c
index 4863c1af..966e87f2 100644
--- a/drivers/gpio/gpio-s32cc.c
+++ b/drivers/gpio/gpio-s32cc.c
@@ -203,8 +205,9 @@ static int s32cc_gpio_get_xlate(struct udevice *dev, struct gpio_desc *desc,
 		range = &amp;amp;priv-&amp;gt;valid_ranges[i];
 		range_begin = range-&amp;gt;pinctrl_offset;
 		range_end = range_begin + range-&amp;gt;cnt;
 		if (args-&amp;gt;args[0] &amp;gt;= range_begin &amp;amp;&amp;amp; args-&amp;gt;args[0] &amp;lt; range_end) {
-			desc-&amp;gt;offset += args-&amp;gt;args[0] - range_begin;
+			desc-&amp;gt;offset = args-&amp;gt;args[0] - range_begin + range-&amp;gt;gpio_offset;
 			break;
 		}
 	}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 05:29:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1673240#M3774</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-06-21T05:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1673893#M3797</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We may not understand the comment "&lt;SPAN&gt;found that the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;&amp;lt;pinctrl_offset&amp;gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;value returned by&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;s32cc_get_pinctrl_offset()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;is the same (=119).&lt;/SPAN&gt;". For both&amp;nbsp;&lt;SPAN&gt;PJ07 and PH07 it returns the same value?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How and when are you calling the function?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please, let us know.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 18:22:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1673893#M3797</guid>
      <dc:creator>Daniel-Aguirre</dc:creator>
      <dc:date>2023-06-21T18:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1675540#M3833</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If you debug both PH07 and PJ07 in s32gxxxa-rdb.dtsi, you will get probe error message.&lt;/P&gt;&lt;P&gt;But debugging one of the GPIOs alone and tracking the &amp;lt;pinctrl_offset&amp;gt; value returned by s32cc_get_pinctrl_offset() in s32cc_gpio_direction_output() will get the same result (=119)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;u-boot_2020.4/drivers/gpio/gpio-s32cc.c&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;@@ -124,6 +129,7 @@ static int s32cc_gpio_direction_output(struct udevice *dev, unsigned int offset,
        int ret;
 
        ret = s32cc_get_pinctrl_offset(priv, offset, &amp;amp;pinctrl_offset);
+       printf(":%s: offset=%d, pinctrl=%d (ret=%d)\n", __func__, offset, pinctrl_offset, ret);
        if (ret)
                return ret;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think the reason for the probe error is that the last &amp;lt;desc-&amp;gt;offset&amp;gt; values generated by the two GPIOs when calling s32cc_gpio_get_xlate() are the same as 7.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PJ07:&amp;nbsp;&amp;nbsp;desc-&amp;gt;offset = 151 - 144 = 7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PH07:&amp;nbsp;desc-&amp;gt;offset = 119 - 112 = 7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 02:17:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1675540#M3833</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-06-26T02:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1676325#M3847</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your feedback.&lt;/P&gt;
&lt;P&gt;It does indeed seem to be a bug under the driver. We could replicate the issue you were seeing.&lt;/P&gt;
&lt;P&gt;It does seems that since PH07 and PJ07 have the same offset (but on different ranges) the PJ07 (gpio 151) hog was being put under the PH07 address (gpio 119), shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielAguirre_0-1687807300467.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/229434i921A9EA9F6D76EDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielAguirre_0-1687807300467.png" alt="DanielAguirre_0-1687807300467.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Where PJ07 should be under "siul2-gpio118", instead of "siul2-gpio17".&lt;/P&gt;
&lt;P&gt;By applying the patch under the xlate function that you have provided we can see both PH07 and PJ07 under the correct address, as shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielAguirre_1-1687807392992.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/229435i46EC4FA27BBD3E0A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielAguirre_1-1687807392992.png" alt="DanielAguirre_1-1687807392992.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Also, after the patch, there was no probe error message.&lt;/P&gt;
&lt;P&gt;Please, let us know.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 19:23:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1676325#M3847</guid>
      <dc:creator>Daniel-Aguirre</dc:creator>
      <dc:date>2023-06-26T19:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1678228#M3891</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your reply&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please let me know if there is a follow-up update on this part of the patch&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 02:29:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1678228#M3891</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-06-29T02:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1678859#M3907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Since the development team is dedicated to the newer releases, could be a time for when the update is provided under the BSP33.0 version.&lt;/P&gt;
&lt;P&gt;Still, we will provide this information to the development team.&lt;/P&gt;
&lt;P&gt;Please, let us know.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 16:28:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1678859#M3907</guid>
      <dc:creator>Daniel-Aguirre</dc:creator>
      <dc:date>2023-06-29T16:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: S32G2 ATF GPIO control</title>
      <link>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1749103#M5178</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your reply&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 03:10:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G2-ATF-GPIO-control/m-p/1749103#M5178</guid>
      <dc:creator>petertseng</dc:creator>
      <dc:date>2023-10-31T03:10:55Z</dc:date>
    </item>
  </channel>
</rss>

