PWM control

Type: Official Firmware
Filename: —
Download Address: -
Log: no log.zip

Hello.I try to use PWM to control backlight for LVDS LCD display:
/kernel/arch/arm64/boot/dts/rockchip/rk3568j-firefly-itxq-lvds_m10r800.dts

backlight:backlight {
status = “okay”;
enable-gpios = <&pca9555 PCA_IO1_3 GPIO_ACTIVE_HIGH>;
compatible = “pwm-backlight”;
pwms = <&pwm15 0 25000 1>;
lvds_panel: lvds-panel {
enable-gpios = <&pca9555 PCA_IO1_2 GPIO_ACTIVE_HIGH>;
backlight = <&backlight>;

}

How can i control this device backlight on pwm15 ?
I tryed:
cat /sys/kernel/debug/pwm
platform/fe700030.pwm, 1 PWM device
pwm-0 (backlight ): requested enabled period: 25000 ns duty: 19625 ns polarity: inverse
platform/fe700020.pwm, 1 PWM device
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: inverse
platform/fe6e0010.pwm, 1 PWM device
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: inverse
platform/fe6e0000.pwm, 1 PWM device
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: inverse

cd /sys/class/pwm/pwmchip0/
echo 0 > export
cd pwm0
echo 10000 > period
echo 5000 > duty_cycle
echo normal > polarity
echo 1 > enable

cat /sys/kernel/debug/pwm
platform/fe700030.pwm, 1 PWM device
pwm-0 (backlight ): requested enabled period: 25000 ns duty: 19625 ns polarity: inverse
platform/fe700020.pwm, 1 PWM device
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: inverse
platform/fe6e0010.pwm, 1 PWM device
pwm-0 ((null) ): period: 0 ns duty: 0 ns polarity: inverse
platform/fe6e0000.pwm, 1 PWM device
pwm-0 (sysfs ): requested enabled period: 10000 ns duty: 5000 ns polarity: normal

Now i can control sysfs but not backlight.
How can i control backlight ?
tchip_askquestions
no log.zip (22 Bytes)

Try this: echo 100 > /sys/class/backlight/backlight/brightness

He has been used, you can not export.

cd /sys/class/backlight/backlight/
cat brightness
200
echo 50 > brightness

时间的蝴蝶 Posted at 10/26/2022 10:06
Try this: echo 100 > /sys/class/backlight/backlight/brightness

Thank you a lot ! it works fine now !
Now i have another question - how can i control frequency (and polarity), not only brightness ?

Sure, i can try to change frequency in device tree file in pwms = <&pwm15 0 25000 1>:
/kernel/arch/arm64/boot/dts/rockchip/rk3568j-firefly-itxq-lvds_m10r800.dts

backlight:backlight {
status = “okay”;
enable-gpios = <&pca9555 PCA_IO1_3 GPIO_ACTIVE_HIGH>;
compatible = “pwm-backlight”;
pwms = <&pwm15 0 25000 1>;
}

Yes Sure, i changed frequency (period) to 50000 ns in device tree file in pwms = <&pwm15 0 50000 1>:
/kernel/arch/arm64/boot/dts/rockchip/rk3568j-firefly-itxq-lvds_m10r800.dts
Then i built kernel and wrote firmware to SOM and everything works fine

如果你想通過SISA的CSPAI考試認證使自己在當今競爭激烈的IT行業中地位更牢固,在IT行業中的的專業技能更強大,你的需要很強的專業知識和日積月累的努力,而且通過SISA的CSPAI考試認證也不是簡單的,或許通過SISA的CSPAI考試認證是你向IT行業推廣自己的時候,但是不一定需要花費大量的時間和精力來學習專業知識,你可以選擇我們Testpdf SISA的CSPAI考試培訓資料,專門是針對IT相關考試認證研究出來的培訓產品。有了它你就可以毫不費力的通過了這麼困難的SISA的CSPAI考試認證。

Thank you for the article, it really brought a fresh perspective. The CloudSec-Pro test pass4sure helped me secure my promotion and raise. It’s free now for everyone. Best of luck with your career!

IT인증시험문제는 수시로 변경됩니다. 이 점을 해결하기 위해KoreaDumps의CompTIA인증 220-1201덤프도 시험변경에 따라 업데이트하도록 최선을 다하고 있습니다.시험문제 변경에 초점을 맞추어 업데이트를 진행한후 업데이트된CompTIA인증 220-1201덤프를 1년간 무료로 업데이트서비스를 드립니다.

Liking it right away—this content is superb. Wishing everyone the best of luck! Free Valid C_BCBTM_2509 test guide materials questions are available!

This is top-quality stuff, clicking like now. The New SPLK-4001 exam questions exam questions are crucial for promotion and salary growth—get them for free!

獲得AP-208認證是IT職業發展有利保证,而NewDumps公司提供最新最準確的AP-208題庫資料,幾乎包含真實考試的所有知識點,借助我們的學習資料,您不必浪費時間去閱讀過多的參考書籍,只需要花費一定的時間去學習我們的Salesforce AP-208題庫資料。本站提供PDF版本和軟件本版的AP-208題庫,PDF版本的方便打印,而對于軟件版本的Salesforce AP-208題庫可以模擬真實的考試環境,方便考生選擇。