Hello,
I'm using IMX8ULP EVK9 and in this EVK i have one RGB LED which is connected with PTF10_TPM7_CH5, PTF27_TPM7_CH0 and PTF20_TPM5_CH1.
Now i want to control brightness of this RGB LED, how can i control what kind of changes i need to do in DTS file. please provide patch so i can apply and test on EVK.
I have added Image of schematic for your reference.
Thanks!
Hello @dhruvinrajpura
I could see you are working with Cortex A, and you want to use tpm from cortex A here.
Unfortunately this is not possible for i.MX8ULP. You can see on device tree, there is just defined the TPM5.
Best regards,
Salas.
Hello @Manuel_Salas,
Thanks for your quick reply.
The green LED is connected to PTF20_TPM5_CH1. Can we control its brightness since it's on channel 1 of TPM5? If yes, could you share the patch and command to adjust the brightness?
Thanks!
Hello @dhruvinrajpura
I have not the i.MX8ULP to test it by my side, but please try the below modifications on device tree:
&tpm5 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_led1>;
status = "okay";
};
And in IOMUXC:
pinctrl_led1: ledsgrp1 {
fsl,pins = <
MX8ULP_PAD_PTF20__TPM5_CH1 0x2
>;
Then, you should be able to see the PWM under /sys/class/pwm/.
Please try it.
Best regards,
Salas.
Hello @Manuel_Salas ,
I made the changes you suggested, but I still don't see a new pwmchip entry under /sys/class/pwm. I only see pwmchip0, which was already there before the changes.
root@imx8ulp-9x9-lpddr4-evk:~# ls -al /sys/class/pwm/
total 0
drwxr-xr-x 2 root root 0 Mar 3 09:49 .
drwxr-xr-x 88 root root 0 Mar 3 09:49 ..
lrwxrwxrwx 1 root root 0 Mar 3 09:49 pwmchip0 -> ../../devices/platform/pwm/pwm/pwmchip0
root@imx8ulp-9x9-lpddr4-evk:~#
Thanks!