<?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>i.MX ProcessorsのトピックRe: Configuring TPM to Control RGB LED on IMX8ULP EVK with Android Kernel</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2031110#M233168</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/202673"&gt;@pengyong_zhang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;We have made some progress after this.&amp;nbsp;We tried using the configuration compatible = "fsl,imx8ulp-tpm", "fsl,imx7ulp-tpm";.&lt;/P&gt;&lt;P&gt;However, since no corresponding driver exists in the SDK, this change did not make any difference.&lt;BR /&gt;On a positive note, We successfully accessed the tpm under sysfs. We are able to set the period and duty cycle, and the written values are reflected when read back. However, writing "high" to the enable property does not take effect (cat enable always returns 0). Consequently, We are unable to enable the RGB LED.&lt;/P&gt;&lt;P&gt;To debug further, We used cat /sys/kernel/debug/pinctrl/*/pinmux-pins to verify if the pins were assigned to other activities. The output confirmed that pin 93 (PTF29) is correctly configured as pinctrl_pwm, matching the device tree configuration.&lt;BR /&gt;Could you advise on the next steps to resolve this issue?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2025 05:44:51 GMT</pubDate>
    <dc:creator>rahul_ms__</dc:creator>
    <dc:date>2025-01-21T05:44:51Z</dc:date>
    <item>
      <title>Configuring TPM to Control RGB LED on IMX8ULP EVK with Android Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2019112#M232324</link>
      <description>&lt;P&gt;Hi NXP,&lt;/P&gt;&lt;P&gt;I am currently working on the IMX8ULP EVK Board with the Android Kernel running on the A35 core. My goal is to configure the TPM module to control the RGB LED on the baseboard.&lt;/P&gt;&lt;H3&gt;Steps Taken:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Device Tree Configuration&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The device tree already included a node for backlight control of the display on the daughter card.&lt;/LI&gt;&lt;LI&gt;I added a new node for PWM control (referencing the Config Tools) to manage the RGB LED.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Issues Faced&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The new PWM node appears under /sys/firmware/devicetree/base/ but not under /sys/class/.&lt;/LI&gt;&lt;LI&gt;The entries under /sys/firmware/devicetree/base/pwmbacklight are &lt;STRONG&gt;read-only&lt;/STRONG&gt;. Attempts to change permissions (using chmod -R 777) or write to these entries (even with superuser privileges) result in a "Permission denied" error.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Driver Selection&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The backlight driver uses pwm-rpmsg, and I added the same driver for the RGB LED as a reference. However, I suspect this is causing the issue because:&lt;UL&gt;&lt;LI&gt;The backlight PWM on PTA03 is controlled by RTD peripherals.&lt;/LI&gt;&lt;LI&gt;The RGB LEDs on Ports E and F are controlled by APD peripherals.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;The driver I need (pwm-imx27.c) is present in the SDK but is missing in the current image.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Questions:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;How can I build and include the pwm-imx27.c driver in the image to control the PWM for the RGB LED?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Could you provide guidance on resolving the read-only issue for the new PWM node?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Relevant Device Tree Changes:&lt;/H3&gt;&lt;H4&gt;Device Tree Node for PWM RGB LED:&lt;/H4&gt;&lt;PRE&gt;/ {
    pwm_rgbLed: pwmbacklight {
        compatible = "pwm-backlight";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_pwm&amp;gt;;
        pwms = &amp;lt;&amp;amp;tpm7 2 50000 0&amp;gt;;
        #pwm-cells = &amp;lt;3&amp;gt;;
        brightness-levels = &amp;lt;0 1 2 3 4 ... 100&amp;gt;;
        default-brightness-level = &amp;lt;100&amp;gt;;
    };
};&lt;/PRE&gt;&lt;H4&gt;Pin Configuration:&lt;/H4&gt;&lt;PRE&gt;&amp;amp;iomuxc1 {
    pinctrl_pwm: pinctrlpwm {
        fsl,pins = &amp;lt;
            MX8ULP_PAD_PTF29__TPM7_CH2 0x00000002
        &amp;gt;;
    };
};&lt;/PRE&gt;&lt;H4&gt;TPM Node in imx8ulp.dtsi:&lt;/H4&gt;&lt;PRE&gt;tpm7: tpm@29830000 {
    #pwm-cells = &amp;lt;3&amp;gt;;
    compatible = "fsl,imx8ulp-tpm", "fsl,imx7ulp-tpm";
    fsl,pwm-channel-number = &amp;lt;6&amp;gt;;
    reg = &amp;lt;0x29830000 0x1000&amp;gt;;
    interrupts = &amp;lt;GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH&amp;gt;;
    clocks = &amp;lt;&amp;amp;sosc&amp;gt;, &amp;lt;&amp;amp;sosc&amp;gt;;
    clock-names = "ipg", "per";
    status = "okay";
};&lt;/PRE&gt;&lt;H3&gt;Observations:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;The /sys/class/ directory contains the following entries but not pwmbacklight:&lt;PRE&gt;android_usb &amp;nbsp; &amp;nbsp;gpu_class &amp;nbsp;misc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pwm &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;spidev&lt;BR /&gt;arvo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; graphics &amp;nbsp; mmc_host &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pxp_device &amp;nbsp; thermal&lt;BR /&gt;backlight &amp;nbsp; &amp;nbsp; &amp;nbsp;hidraw &amp;nbsp; &amp;nbsp; mtd &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pyra &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; trusty_ipc&lt;BR /&gt;bdi &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hwmon &amp;nbsp; &amp;nbsp; &amp;nbsp;mux &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tty&lt;BR /&gt;block &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i2c-dev &amp;nbsp; &amp;nbsp;nd &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;regulator &amp;nbsp; &amp;nbsp;typec&lt;BR /&gt;bsg &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ieee80211 &amp;nbsp;net &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; remoteproc &amp;nbsp; typec_mux&lt;BR /&gt;devcoredump &amp;nbsp; &amp;nbsp;input &amp;nbsp; &amp;nbsp; &amp;nbsp;nvme &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;retimer &amp;nbsp; &amp;nbsp; &amp;nbsp;ublk-char&lt;BR /&gt;devfreq &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iommu &amp;nbsp; &amp;nbsp; &amp;nbsp;nvme-generic &amp;nbsp; &amp;nbsp;rfkill &amp;nbsp; &amp;nbsp; &amp;nbsp; udc&lt;BR /&gt;devfreq-event &amp;nbsp;isku &amp;nbsp; &amp;nbsp; &amp;nbsp; nvme-subsystem &amp;nbsp;rpmsg &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;uio&lt;BR /&gt;devlink &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kone &amp;nbsp; &amp;nbsp; &amp;nbsp; pci_bus &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rtc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;usb_power_delivery&lt;BR /&gt;dma &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;koneplus&amp;nbsp;&amp;nbsp; pci_epc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ryos &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; usb_role&lt;BR /&gt;dma_heap &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;konepure&amp;nbsp;&amp;nbsp; phy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; savu &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; video4linux&lt;BR /&gt;dmabuf_imx &amp;nbsp; &amp;nbsp;&amp;nbsp;kovaplus&amp;nbsp;&amp;nbsp; pmsg &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;scsi_device &amp;nbsp;wakeup&lt;BR /&gt;drm &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;leds &amp;nbsp; &amp;nbsp; &amp;nbsp; power_supply &amp;nbsp; &amp;nbsp;scsi_disk &amp;nbsp; &amp;nbsp;watchdog&lt;BR /&gt;extcon &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lirc &amp;nbsp; &amp;nbsp; &amp;nbsp; powercap &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;scsi_host &amp;nbsp; &amp;nbsp;xt_idletimer&lt;BR /&gt;firmware &amp;nbsp; &amp;nbsp; &amp;nbsp; mdio_bus &amp;nbsp; pps &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sound &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;zram-control&lt;BR /&gt;gnss &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mem &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ptp &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spi_master &lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;The PWM node for RGB LED (pwmbacklight) is visible under /sys/firmware/devicetree/base/ with the following structure:&lt;PRE&gt;/sys/firmware/devicetree/base/pwmbacklight/  
├── #pwm-cells  
├── brightness-levels  
├── compatible  
├── default-brightness-level  
├── name  
├── pinctrl-0  
├── pwms  &lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Attempting to modify values results in:&lt;PRE&gt;echo 50 &amp;gt; default-brightness-level  
/system/bin/sh: can't create default-brightness-level: Permission denied  &lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Could you please provide guidance on how to properly configure and include the pwm-imx27 driver or resolve the above issues?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 13:57:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2019112#M232324</guid>
      <dc:creator>rahul_ms__</dc:creator>
      <dc:date>2024-12-24T13:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring TPM to Control RGB LED on IMX8ULP EVK with Android Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2030996#M233160</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206879"&gt;@rahul_ms__&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1, Which version of Android did you use?&lt;/P&gt;
&lt;P&gt;2, Why did you need&amp;nbsp;pwm-imx27.c on 8ulp? I think it's used for soc like 8mp.&lt;/P&gt;
&lt;P&gt;3, I'm not sure if pwm-backlight is used like customer did. pwm-backlight is used for display backlight. RGB LED is controlled by 3 PWMs. Did you need to control these 3. not only TPM7_CH2?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pengyong_zhang_0-1737426861699.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320454iF7F7E4B623E1EDA4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pengyong_zhang_0-1737426861699.png" alt="pengyong_zhang_0-1737426861699.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;B.R&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 02:35:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2030996#M233160</guid>
      <dc:creator>pengyong_zhang</dc:creator>
      <dc:date>2025-01-21T02:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring TPM to Control RGB LED on IMX8ULP EVK with Android Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2031103#M233166</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;SPAN class=""&gt;1, Which version of Android did you use?&lt;/SPAN&gt;&lt;/U&gt;&lt;/EM&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;I'm Using Android 14.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;SPAN class=""&gt;2, Why did you need&amp;nbsp;pwm-imx27.c on 8ulp? I think it's used for soc like 8mp.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Which driver should I use to control PWM pin for 8ULP?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;SPAN class=""&gt;3, I'm not sure if pwm-backlight is used like customer did. pwm-backlight is used for display backlight. RGB LED is controlled by 3 PWMs. Did you need to control these 3. not only TPM7_CH2?&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;I’ve adjusted the approach for configuring the PWM pins to match the backlight setup. Currently, I need to configure three pins for RGB, but for testing purposes, I’m only setting up TPM2_CH2.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I’ve added the PWM node, but I’m unable to turn on the LED using it. Could you help me identify what might be causing the issue?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 05:37:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2031103#M233166</guid>
      <dc:creator>rahul_ms__</dc:creator>
      <dc:date>2025-01-21T05:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring TPM to Control RGB LED on IMX8ULP EVK with Android Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2031110#M233168</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/202673"&gt;@pengyong_zhang&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;We have made some progress after this.&amp;nbsp;We tried using the configuration compatible = "fsl,imx8ulp-tpm", "fsl,imx7ulp-tpm";.&lt;/P&gt;&lt;P&gt;However, since no corresponding driver exists in the SDK, this change did not make any difference.&lt;BR /&gt;On a positive note, We successfully accessed the tpm under sysfs. We are able to set the period and duty cycle, and the written values are reflected when read back. However, writing "high" to the enable property does not take effect (cat enable always returns 0). Consequently, We are unable to enable the RGB LED.&lt;/P&gt;&lt;P&gt;To debug further, We used cat /sys/kernel/debug/pinctrl/*/pinmux-pins to verify if the pins were assigned to other activities. The output confirmed that pin 93 (PTF29) is correctly configured as pinctrl_pwm, matching the device tree configuration.&lt;BR /&gt;Could you advise on the next steps to resolve this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 05:44:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Configuring-TPM-to-Control-RGB-LED-on-IMX8ULP-EVK-with-Android/m-p/2031110#M233168</guid>
      <dc:creator>rahul_ms__</dc:creator>
      <dc:date>2025-01-21T05:44:51Z</dc:date>
    </item>
  </channel>
</rss>

