<?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 Whether the system shutdown function sends PON commands to eMMC on iMx8DualX QNX platform ? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1666316#M207331</link>
    <description>&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; We call the function "shutdown_system_with_reason()" when we want to shutdown our iMx8DualX board, while we want to know whether this function that you supplied sends PON command to eMMC or not ?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Thanks a lot.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 16:30:47 GMT</pubDate>
    <dc:creator>Richard__Wang</dc:creator>
    <dc:date>2023-06-08T16:30:47Z</dc:date>
    <item>
      <title>Whether the system shutdown function sends PON commands to eMMC on iMx8DualX QNX platform ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1666316#M207331</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; We call the function "shutdown_system_with_reason()" when we want to shutdown our iMx8DualX board, while we want to know whether this function that you supplied sends PON command to eMMC or not ?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Thanks a lot.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:30:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1666316#M207331</guid>
      <dc:creator>Richard__Wang</dc:creator>
      <dc:date>2023-06-08T16:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Whether the system shutdown function sends PON commands to eMMC on iMx8DualX QNX platform ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1667985#M207470</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/216979"&gt;@Richard__Wang&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have checked for the mentioned function. It is not implemnted in BSP by NXP, but provided by QNX as kernel function. I have asked QNX and here is information regarding sending PON to eMMC.&lt;/P&gt;
&lt;P&gt;1. requires the driver to be started with:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pwroff_notify=[short|long] - &lt;/STRONG&gt;Set power off notification mode for the eMMC. The notification can either be short or long.&lt;/P&gt;
&lt;P&gt;2. the driver need to be terminated to trigger power off notification sequence so if shutdown terminates the driver and it is started with that option, it should occur.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Zdenek&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2023 06:25:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1667985#M207470</guid>
      <dc:creator>zdenek_zadera</dc:creator>
      <dc:date>2023-06-13T06:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Whether the system shutdown function sends PON commands to eMMC on iMx8DualX QNX platform ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1671415#M207750</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Zdenek,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Thank you very much for your attention and support! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; We have a detail request for the previous question as below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;The i.Mx8DualX board uses function "devb-sdmmc-mx8x()" to manage the emmc driver, which is provided by QNX.&amp;nbsp; Our new question is : "After&amp;nbsp;executing shutdown_system_with_reason(), will devb-sdmmc-mx8x() send PON instructions to EMMC?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Thanks a lot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Richard&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2023 12:34:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1671415#M207750</guid>
      <dc:creator>Richard__Wang</dc:creator>
      <dc:date>2023-06-17T12:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Whether the system shutdown function sends PON commands to eMMC on iMx8DualX QNX platform ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1671662#M207772</link>
      <description>&lt;P&gt;If you read the linux source code and check the emmc status at runtime.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will find the linux mmc driver, which is NXP BSP based on, already use&amp;nbsp;Power Off Notification&amp;nbsp;&lt;/P&gt;&lt;P&gt;linux/drivers/mmc/core/sd.c:1110: /* Power Off Notification support at bit 4. */&lt;BR /&gt;linux/drivers/mmc/core/sd.c:1629: * one byte offset and is one byte long. The Power Off Notification&lt;BR /&gt;linux/drivers/mmc/core/sd.c:1655: * Set the Power Off Notification bit in the power management settings&lt;BR /&gt;linux/drivers/mmc/core/mmc.c:1984: pr_err("%s: Power Off Notification timed out, %u\n",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;static int _mmc_suspend(struct mmc_host *host, bool is_suspend)&lt;BR /&gt;{&lt;BR /&gt;int err = 0;&lt;BR /&gt;unsigned int notify_type = is_suspend ? EXT_CSD_POWER_OFF_SHORT :&lt;BR /&gt;EXT_CSD_POWER_OFF_LONG;&lt;/P&gt;&lt;P&gt;mmc_claim_host(host);&lt;/P&gt;&lt;P&gt;if (mmc_card_suspended(host-&amp;gt;card))&lt;BR /&gt;goto out;&lt;/P&gt;&lt;P&gt;err = _mmc_flush_cache(host);&lt;BR /&gt;if (err)&lt;BR /&gt;goto out;&lt;/P&gt;&lt;P&gt;if (mmc_can_poweroff_notify(host-&amp;gt;card) &amp;amp;&amp;amp;&lt;BR /&gt;((host-&amp;gt;caps2 &amp;amp; MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend ||&lt;BR /&gt;(host-&amp;gt;caps2 &amp;amp; MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND)))&lt;BR /&gt;err = mmc_poweroff_notify(host-&amp;gt;card, notify_type);&lt;BR /&gt;else if (mmc_can_sleep(host-&amp;gt;card))&lt;BR /&gt;err = mmc_sleep(host);&lt;BR /&gt;else if (!mmc_host_is_spi(host))&lt;BR /&gt;err = mmc_deselect_cards(host);&lt;/P&gt;&lt;P&gt;if (!err) {&lt;BR /&gt;mmc_power_off(host);&lt;BR /&gt;mmc_card_set_suspended(host-&amp;gt;card);&lt;BR /&gt;}&lt;BR /&gt;out:&lt;BR /&gt;mmc_release_host(host);&lt;BR /&gt;return err;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;static int mmc_poweroff_notify(struct mmc_card *card, unsigned int notify_type)&lt;BR /&gt;{&lt;BR /&gt;unsigned int timeout = card-&amp;gt;ext_csd.generic_cmd6_time;&lt;BR /&gt;int err;&lt;/P&gt;&lt;P&gt;/* Use EXT_CSD_POWER_OFF_SHORT as default notification type. */&lt;BR /&gt;if (notify_type == EXT_CSD_POWER_OFF_LONG)&lt;BR /&gt;timeout = card-&amp;gt;ext_csd.power_off_longtime;&lt;/P&gt;&lt;P&gt;err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,&lt;BR /&gt;EXT_CSD_POWER_OFF_NOTIFICATION,&lt;BR /&gt;notify_type, timeout, 0, false, false, MMC_CMD_RETRIES);&lt;BR /&gt;if (err)&lt;BR /&gt;pr_err("%s: Power Off Notification timed out, %u\n",&lt;BR /&gt;mmc_hostname(card-&amp;gt;host), timeout);&lt;/P&gt;&lt;P&gt;/* Disable the power off notification after the switch operation. */&lt;BR /&gt;card-&amp;gt;ext_csd.power_off_notification = EXT_CSD_NO_POWER_NOTIFICATION;&lt;/P&gt;&lt;P&gt;return err;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is check on board&lt;/P&gt;&lt;P&gt;root@imx8qxpc0mek:~# mmc extcsd read /dev/mmcblk0&lt;BR /&gt;=============================================&lt;BR /&gt;Extended CSD rev 1.7 (MMC 5.0)&lt;BR /&gt;=============================================&lt;/P&gt;&lt;P&gt;Card Supported Command sets [S_CMD_SET: 0x01]&lt;BR /&gt;HPI Features [HPI_FEATURE: 0x01]: implementation based on CMD13&lt;BR /&gt;Background operations support [BKOPS_SUPPORT: 0x01]&lt;BR /&gt;Max Packet Read Cmd [MAX_PACKED_READS: 0x3f]&lt;BR /&gt;Max Packet Write Cmd [MAX_PACKED_WRITES: 0x3f]&lt;BR /&gt;Data TAG support [DATA_TAG_SUPPORT: 0x01]&lt;BR /&gt;Data TAG Unit Size [TAG_UNIT_SIZE: 0x03]&lt;BR /&gt;Tag Resources Size [TAG_RES_SIZE: 0x00]&lt;BR /&gt;Context Management Capabilities [CONTEXT_CAPABILITIES: 0x05]&lt;BR /&gt;Large Unit Size [LARGE_UNIT_SIZE_M1: 0x03]&lt;BR /&gt;Extended partition attribute support [EXT_SUPPORT: 0x03]&lt;BR /&gt;Generic CMD6 Timer [GENERIC_CMD6_TIME: 0x0a]&lt;BR /&gt;&lt;STRONG&gt;Power off notification [POWER_OFF_LONG_TIME: 0x32]&lt;/STRONG&gt;&lt;BR /&gt;Cache Size [CACHE_SIZE] is 8192 KiB&lt;BR /&gt;Background operations status [BKOPS_STATUS: 0x00]&lt;BR /&gt;....&lt;BR /&gt;......&lt;BR /&gt;......&lt;BR /&gt;Context configuration [CONTEXT_CONF[39]]: 0x00&lt;BR /&gt;Context configuration [CONTEXT_CONF[38]]: 0x00&lt;BR /&gt;Context configuration [CONTEXT_CONF[37]]: 0x00&lt;BR /&gt;Packed command status [PACKED_COMMAND_STATUS]: 0x00&lt;BR /&gt;Packed command failure index [PACKED_FAILURE_INDEX]: 0x00&lt;BR /&gt;&lt;STRONG&gt;Power Off Notification [POWER_OFF_NOTIFICATION]: 0x01&lt;/STRONG&gt;&lt;BR /&gt;Control to turn the Cache ON/OFF [CACHE_CTRL]: 0x01&lt;BR /&gt;eMMC Firmware Version: 85Q0002R&lt;/P&gt;&lt;P&gt;eMMC JEDEC SPEC&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/228262i9F582DCDAC1FAA80/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 07:20:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1671662#M207772</guid>
      <dc:creator>JudyJeo</dc:creator>
      <dc:date>2023-06-19T07:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Whether the system shutdown function sends PON commands to eMMC on iMx8DualX QNX platform ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1671702#M207779</link>
      <description>&lt;P&gt;Hello Richard,&lt;/P&gt;&lt;P&gt;yes, this is the right driver. You just need to start the driver devb-sdmmc-mx8x()&amp;nbsp; with mentioned parameter "pwroff_notify=[short|long]".&lt;/P&gt;&lt;P&gt;Then, when you call shutdown function, the driver will be closed by system, then the driver should send PON to eMMC during closing.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Zdenek&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 07:48:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Whether-the-system-shutdown-function-sends-PON-commands-to-eMMC/m-p/1671702#M207779</guid>
      <dc:creator>zdenek_zadera</dc:creator>
      <dc:date>2023-06-19T07:48:53Z</dc:date>
    </item>
  </channel>
</rss>

