<?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 No PWM in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1850728#M222750</link>
    <description>&lt;P&gt;I am trying to get a pwm signal on gpio 1 1 for an i.MX7s processor.&amp;nbsp; Here is my device tree configuration but I see nothing on the pin.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/ {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pwm-leds {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;compatible = "pwm-leds";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pwm_led1 {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;label = "pwm_led1";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pwms = &amp;lt;&amp;amp;pwm1 0 100000 50000&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;max-brightness = &amp;lt;255&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;pwm1 {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pinctrl-names = "default";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_pwm_led1&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;status = "okay";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;iomuxc { &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pinctrl_pwm_led1: pwm_led1 {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;fsl,pins = &amp;lt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT 0x14&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2024 13:11:14 GMT</pubDate>
    <dc:creator>tlamarc</dc:creator>
    <dc:date>2024-04-19T13:11:14Z</dc:date>
    <item>
      <title>No PWM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1850728#M222750</link>
      <description>&lt;P&gt;I am trying to get a pwm signal on gpio 1 1 for an i.MX7s processor.&amp;nbsp; Here is my device tree configuration but I see nothing on the pin.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/ {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pwm-leds {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;compatible = "pwm-leds";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pwm_led1 {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;label = "pwm_led1";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pwms = &amp;lt;&amp;amp;pwm1 0 100000 50000&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;max-brightness = &amp;lt;255&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;pwm1 {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pinctrl-names = "default";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_pwm_led1&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;status = "okay";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;iomuxc { &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;pinctrl_pwm_led1: pwm_led1 {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;fsl,pins = &amp;lt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT 0x14&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;};&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;};&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2024 13:11:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1850728#M222750</guid>
      <dc:creator>tlamarc</dc:creator>
      <dc:date>2024-04-19T13:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: No PWM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1851808#M222828</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your interest in NXP Semiconductor products,&lt;/P&gt;
&lt;P&gt;Please change the driver according to &lt;A href="https://github.com/nxp-imx/linux-imx/blob/ccf0a99701a701fb48a04e31ffe3f9d585a8374a/Documentation/devicetree/bindings/pwm/imx-pwm.yaml#L41" target="_self"&gt;this document&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Also, &lt;A href="https://community.nxp.com/t5/i-MX-Processors/What-is-the-procedure-to-control-brightness-of-led-using-PWM-on/td-p/1842068" target="_self"&gt;this solution&lt;/A&gt; provided by a colleague may help debug this issue.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 17:53:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1851808#M222828</guid>
      <dc:creator>JosephAtNXP</dc:creator>
      <dc:date>2024-04-22T17:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: No PWM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1852717#M222871</link>
      <description>&lt;P&gt;I updated the line from:&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;compatible = "pwm-leds";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to:&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;compatible = "fsl,imx7d-pwm";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;but I still have no pwm signal on the pin,&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 17:30:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1852717#M222871</guid>
      <dc:creator>tlamarc</dc:creator>
      <dc:date>2024-04-23T17:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: No PWM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1855847#M223056</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can base on 7d-sdb device tree,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;pwm1: pwm@30660000 {
				compatible = "fsl,imx7d-pwm", "fsl,imx27-pwm";
				reg = &amp;lt;0x30660000 0x10000&amp;gt;;
				interrupts = &amp;lt;GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH&amp;gt;;
				clocks = &amp;lt;&amp;amp;clks IMX7D_PWM1_ROOT_CLK&amp;gt;,
					 &amp;lt;&amp;amp;clks IMX7D_PWM1_ROOT_CLK&amp;gt;;
				clock-names = "ipg", "per";
				#pwm-cells = &amp;lt;3&amp;gt;;
				status = "disabled";
			};

...

&amp;amp;pwm1 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_pwm1&amp;gt;;
	status = "okay";
};

...

- backlight: backlight {
- 		compatible = "pwm-backlight";
- 		pwms = &amp;lt;&amp;amp;pwm1 0 5000000 0&amp;gt;;
- 		brightness-levels = &amp;lt;0 4 8 16 32 64 128 255&amp;gt;;
- 		default-brightness-level = &amp;lt;6&amp;gt;;
- 		status = "okay";
- 	};&lt;/LI-CODE&gt;
&lt;P&gt;I reproduced in 8mp-evk with the device tree,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;pwm1: pwm@30660000 {
				compatible = "fsl,imx8mp-pwm", "fsl,imx27-pwm";
				reg = &amp;lt;0x30660000 0x10000&amp;gt;;
				interrupts = &amp;lt;GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH&amp;gt;;
				clocks = &amp;lt;&amp;amp;clk IMX8MP_CLK_PWM1_ROOT&amp;gt;,
					 &amp;lt;&amp;amp;clk IMX8MP_CLK_PWM1_ROOT&amp;gt;;
				clock-names = "ipg", "per";
				#pwm-cells = &amp;lt;3&amp;gt;;
				status = "disabled";
			};

...

&amp;amp;pwm1 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_pwm1&amp;gt;;
	status = "okay";
};&lt;/LI-CODE&gt;
&lt;P&gt;And these steps from the post I mentioned,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;root@imx8mpevk:~# cat /sys/class/pwm/pwmchip0/npwm
1
root@imx8mpevk:~# echo 0 &amp;gt; /sys/class/pwm/pwmchip0/export
root@imx8mpevk:~# ls /sys/class/pwm/pwmchip0/pwm0/
capture  duty_cycle  enable  period  polarity  power  uevent
root@imx8mpevk:~# echo 10000 &amp;gt; /sys/class/pwm/pwmchip0/pwm0/period
root@imx8mpevk:~# echo 2000 &amp;gt; /sys/class/pwm/pwmchip0/pwm0/duty_cycle
root@imx8mpevk:~# echo 1 &amp;gt; /sys/class/pwm/pwmchip0/pwm0/enable&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JosephAtNXP_0-1714149539173.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/276194i354970DEE34FEBB0/image-size/large?v=v2&amp;amp;px=999" role="button" title="JosephAtNXP_0-1714149539173.png" alt="JosephAtNXP_0-1714149539173.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 16:39:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/No-PWM/m-p/1855847#M223056</guid>
      <dc:creator>JosephAtNXP</dc:creator>
      <dc:date>2024-04-26T16:39:28Z</dc:date>
    </item>
  </channel>
</rss>

