Reading temperature and transmitting value to PWM

Which system do you use? Android, Ubuntu, OOWOW or others?

Android VIM3L

Which version of system do you use? Please provide the version of the system here:

Pie9-64

please help me with the task.
I need to read the temperature of the SoC once a minute and, depending on it, generate a PWM on the GPIO35.
This is the only way to transfer it to a third-party application… I don’t understand how to do this.

Please, @A.M.T @xiong.zhang @jasonl help me.
I found how read temp. But I don’t understand how use PWM.
I found it for VIM3:

you can add dts cfg ,modify arch/arm/boot/dts/amlogic/kvim3.dts

 &pwm_ef {
                status = "okay";
+               pinctrl-names = "default";
+                pinctrl-0 = <&pwm_f_pins2>;
        };

then input command as follow
echo 1 > /sys/class/pwm/pwmchip4/export
echo 1000000 > /sys/class/pwm/pwmchip4/pwm1/period
echo 500000 > /sys/class/pwm/pwmchip4/pwm1/duty_cycle
echo 1 > /sys/class/pwm/pwmchip4/pwm1/enable
you will see the pwm input by oscilloscope

BUT… I don’t see “arch/arm/boot/dts/amlogic/kvim3.dts”, also I don’t see “pwm1”

kvim3l:/sys/class/pwm/pwmchip4 # ls -la
total 0
drwxr-xr-x 3 root root    0 2024-11-30 12:26 .
drwxr-xr-x 3 root root    0 2024-11-30 12:26 ..
lrwxrwxrwx 1 root root    0 2024-11-30 12:57 device -> ../../../ff802000.pwm
--w------- 1 root root 4096 2024-11-30 12:56 export
-r--r--r-- 1 root root 4096 2024-11-30 12:57 npwm
drwxr-xr-x 2 root root    0 2024-11-30 12:57 power
lrwxrwxrwx 1 root root    0 2024-11-30 12:57 subsystem -> ../../../../../../../class/pwm
-rw-r--r-- 1 root root 4096 2024-11-30 12:57 uevent
--w------- 1 root root 4096 2024-11-30 12:57 unexport
kvim3l:/sys/class/pwm/pwmchip4 #

kvim3l:/ # find / -type f -name "*.dts" -> 0 results

HOW it work for VIM3L?!!!