<?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 How to control PF100 PMIC in imx6q-cpufreq.c for LDO bypass in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-control-PF100-PMIC-in-imx6q-cpufreq-c-for-LDO-bypass/m-p/711502#M110619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In order to take full advantage of the LDO bypass mode (&lt;A href="https://community.nxp.com/docs/DOC-94033" rel="noopener noreferrer" target="_blank"&gt;How to Enable LDO Bypass Based on i.MX6 Android ICS&lt;/A&gt;), I would like to control the VDD_ARM and VDD_SOC through the PF100 regulator in the cpufreq driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table lists the operation setpoints for LDO bypass mode: 0.925V for up to 396MHz, 1.150V up to 792MHz.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/825i1D1674EF732B3961/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current driver only controls the internal LDO, thus only works for "LDO enabled" mode.&lt;/P&gt;&lt;P&gt;This code gets the LDO regulators here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/torvalds/linux/blob/master/drivers/cpufreq/imx6q-cpufreq.c#L239" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank" title="https://github.com/torvalds/linux/blob/master/drivers/cpufreq/imx6q-cpufreq.c#L239"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;linux/imx6q-cpufreq.c at master · torvalds/linux · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/872i2B0A37037D932A01/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I get the actual PF100 voltage regulator in code? regulator_get(cpu_dev, "sw1ab")?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why does the cpufreq driver use &lt;EM&gt;devm_regulator_get_optional()&lt;/EM&gt; and not &lt;EM&gt;regulator_get()&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where do I find the name of PF0100 SW1AB? The i.MX6 Linux Reference Chapter 23 explains the PF100 Regulator driver, and chapter 23.3.1 describes the regulator APIs. In the code I found the following table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://github.com/torvalds/linux/blob/master/drivers/regulator/pfuze100-regulator.c#L363" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank" title="https://github.com/torvalds/linux/blob/master/drivers/regulator/pfuze100-regulator.c#L363"&gt;linux/pfuze100-regulator.c at master · torvalds/linux · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;IMG alt="pastedImage_5.png" src="https://community.nxp.com/t5/image/serverpage/image-id/108i652BCB866F38982C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I print the regulator names, they are listed in this exact order:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.0/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;regulator-dummy&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.1/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vdd1p1&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.2/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vdd3p0&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.3/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vdd2p5&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.4/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vddarm&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.5/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vddpu&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.6/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vddsoc&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.7/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;usb_otg_vbus&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.8/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;usb_h1_vbus&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;root@h5:/sys/class/regulator # cat regulator.9/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;SW1AB&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;root@h5:/sys/class/regulator # cat regulator.10/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;SW1C&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Nov 2020 14:01:19 GMT</pubDate>
    <dc:creator>michaelguntli</dc:creator>
    <dc:date>2020-11-02T14:01:19Z</dc:date>
    <item>
      <title>How to control PF100 PMIC in imx6q-cpufreq.c for LDO bypass</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-control-PF100-PMIC-in-imx6q-cpufreq-c-for-LDO-bypass/m-p/711502#M110619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In order to take full advantage of the LDO bypass mode (&lt;A href="https://community.nxp.com/docs/DOC-94033" rel="noopener noreferrer" target="_blank"&gt;How to Enable LDO Bypass Based on i.MX6 Android ICS&lt;/A&gt;), I would like to control the VDD_ARM and VDD_SOC through the PF100 regulator in the cpufreq driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table lists the operation setpoints for LDO bypass mode: 0.925V for up to 396MHz, 1.150V up to 792MHz.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;IMG alt="pastedImage_1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/825i1D1674EF732B3961/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current driver only controls the internal LDO, thus only works for "LDO enabled" mode.&lt;/P&gt;&lt;P&gt;This code gets the LDO regulators here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/torvalds/linux/blob/master/drivers/cpufreq/imx6q-cpufreq.c#L239" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank" title="https://github.com/torvalds/linux/blob/master/drivers/cpufreq/imx6q-cpufreq.c#L239"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;linux/imx6q-cpufreq.c at master · torvalds/linux · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;IMG alt="pastedImage_3.png" src="https://community.nxp.com/t5/image/serverpage/image-id/872i2B0A37037D932A01/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_3.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can I get the actual PF100 voltage regulator in code? regulator_get(cpu_dev, "sw1ab")?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Why does the cpufreq driver use &lt;EM&gt;devm_regulator_get_optional()&lt;/EM&gt; and not &lt;EM&gt;regulator_get()&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where do I find the name of PF0100 SW1AB? The i.MX6 Linux Reference Chapter 23 explains the PF100 Regulator driver, and chapter 23.3.1 describes the regulator APIs. In the code I found the following table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://github.com/torvalds/linux/blob/master/drivers/regulator/pfuze100-regulator.c#L363" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank" title="https://github.com/torvalds/linux/blob/master/drivers/regulator/pfuze100-regulator.c#L363"&gt;linux/pfuze100-regulator.c at master · torvalds/linux · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;IMG alt="pastedImage_5.png" src="https://community.nxp.com/t5/image/serverpage/image-id/108i652BCB866F38982C/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_5.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I print the regulator names, they are listed in this exact order:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.0/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;regulator-dummy&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.1/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vdd1p1&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.2/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vdd3p0&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.3/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vdd2p5&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.4/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vddarm&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.5/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vddpu&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.6/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;vddsoc&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.7/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;usb_otg_vbus&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;root@h5:/sys/class/regulator # cat regulator.8/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px;"&gt;usb_h1_vbus&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;root@h5:/sys/class/regulator # cat regulator.9/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;SW1AB&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;root@h5:/sys/class/regulator # cat regulator.10/name&lt;/SPAN&gt;
&lt;SPAN style="font-size: 12px; color: #339966;"&gt;SW1C&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:01:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-control-PF100-PMIC-in-imx6q-cpufreq-c-for-LDO-bypass/m-p/711502#M110619</guid>
      <dc:creator>michaelguntli</dc:creator>
      <dc:date>2020-11-02T14:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to control PF100 PMIC in imx6q-cpufreq.c for LDO bypass</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-control-PF100-PMIC-in-imx6q-cpufreq-c-for-LDO-bypass/m-p/711503#M110620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ldo bypass is used by default in latest nxp bsps, one can look at "ldo-bypass" property in dts files&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/boot/dts/imx6qdl-sabresd.dtsi?h=imx_4.9.11_1.0.0_ga" title="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/boot/dts/imx6qdl-sabresd.dtsi?h=imx_4.9.11_1.0.0_ga"&gt;linux-imx.git - i.MX Linux Kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for using internal LDO special imx6q-sabresd-ldo.dts is used. Cpu freq driver&lt;/P&gt;&lt;P&gt;is described in attached Linux Manual sect.2.3.3 CPU Frequency Scaling (CPUFREQ).&lt;/P&gt;&lt;P&gt;Full documentation can be found in&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/webapp/Download?colCode=L4.9.11_1.0.0_LINUX_DOCS" title="https://www.nxp.com/webapp/Download?colCode=L4.9.11_1.0.0_LINUX_DOCS"&gt;https://www.nxp.com/webapp/Download?colCode=L4.9.11_1.0.0_LINUX_DOCS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 11:25:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-control-PF100-PMIC-in-imx6q-cpufreq-c-for-LDO-bypass/m-p/711503#M110620</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-10-20T11:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to control PF100 PMIC in imx6q-cpufreq.c for LDO bypass</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-control-PF100-PMIC-in-imx6q-cpufreq-c-for-LDO-bypass/m-p/711504#M110621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I know that, but I think I understood "the magic" now: &lt;STRONG&gt;In the DTS I can configure which regulator should be used.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example, imx6sx-sdb.dts uses &lt;EM&gt;sw1a of PFUZE0100&lt;/EM&gt; for &lt;EM&gt;arm-supply&lt;/EM&gt;, which in turn the cpufreq driver will use to regulate the voltage of the ARM. Is this assumption correct?&lt;/P&gt;&lt;P&gt;&lt;A class="" href="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/boot/dts/imx6sx-sdb.dts?h=imx_4.9.11_1.0.0_ga" title="http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/boot/dts/imx6sx-sdb.dts?h=imx_4.9.11_1.0.0_ga"&gt;linux-imx.git - i.MX Linux Kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/345i5EB78472CA32916E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 11:41:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-control-PF100-PMIC-in-imx6q-cpufreq-c-for-LDO-bypass/m-p/711504#M110621</guid>
      <dc:creator>michaelguntli</dc:creator>
      <dc:date>2017-10-20T11:41:29Z</dc:date>
    </item>
  </channel>
</rss>

