Display backlight on using PWM in UEFI

Hello Nvidia team,

we are using OrinNano production SOM with custom carrier board with 36.3 L4T.

setup: we are having requirement of two displays, so we are using two PWMs GP_PWM7(GPIO07) and GP_PWM5(GPIO13) for each display, in pinmux we made GPIO07 and GPIO13 as pwm.

Issue: we have done the pinmux changes from GPIO to PWM, but its not helping us to enabling backlight, display backlight brightness is not coming up until we make the period and duty cycle settings upon each boot, using below commands

#!/bin/bash
# display1 brightness control
echo 0 | sudo tee /sys/class/pwm/pwmchip3/export
echo 2000 | sudo tee  /sys/class/pwm/pwmchip3/pwm0/period
echo 1000 | sudo tee  /sys/class/pwm/pwmchip3/pwm0/duty_cycle
echo 1 | sudo tee /sys/class/pwm/pwmchip3/pwm0/enable

# display2 brightness control
echo 0 | sudo tee /sys/class/pwm/pwmchip2/export
echo 5000000 | sudo tee  /sys/class/pwm/pwmchip2/pwm0/period
echo 2500000 | sudo tee  /sys/class/pwm/pwmchip2/pwm0/duty_cycle
echo 1 | sudo tee /sys/class/pwm/pwmchip2/pwm0/enable

FYI: Displays are coming up and backlight is on, if we not made the changes in pinmux for the pin GPIO07 and GPIO13 to act as PWMs.

kindly suggest us how these PWM’s can be used/modified in UEFI for display backlight control. weather we have to do something else apart we done already.

Hi bharath.gk,

Do you mean the commands you shared helping you enabling backlight?

Do you mean display work as expected if you don’t modify them in pinmux spreadsheet?

Please share the full device tree and dmesg for further check.

yes commands are helping us to enable backlight.

only display backlight works as expected if pins used as gpio instead of PWM, and we a issue here- if pins used as gpio instead of pwm, brightness control wont be able to with the same commands, since pwmchips wont be able to export.

we will share dmesg and dts files soon

hi @KevinFFF , attached the dmesg logs and device tree file as u asked, we renamed the .dts to .txt, since the site was not allowing to upload

FYI: one correction w.r.t our requirement, we are using GPIO07 as pwm only, gpio13 we are usign as gpio in pinmux,
dmesg.txt (75.1 KB)
kernel_tegra234-p3768-0000+p3767-0003-nv.txt (312.1 KB)

hello @KevinFFF,

can we expect any help here, if we use gpio13 as pwm for dispaly brightness, its not effecting or showing display unitil we issue theese commands in user level.

Currently, PWM driver in UEFI only handles for fan (TegraPwmDxe).
You can refer to the current driver and write another one for backlight.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.