Display Backlight Control Using PWM in Nvidia Jetson Orin Nano Dev Board
Issue Overview
Users are experiencing difficulties with enabling the display backlight on the Nvidia Jetson Orin Nano Dev board when using Pulse Width Modulation (PWM) for brightness control. The specific symptoms include:
- Backlight not functioning: The display backlight does not activate unless specific commands are executed after each boot.
- Pinmux configuration: Users have modified the pinmux settings to configure GPIO pins (specifically GPIO07 and GPIO13) as PWMs, but this change does not yield the desired results for backlight control.
- Commands for control: The users must run a series of commands to set the period and duty cycle for each display’s PWM after every boot to enable backlight functionality.
- Hardware setup: The issue arises in a custom carrier board setup with two displays, utilizing GP_PWM7 (GPIO07) and GP_PWM5 (GPIO13).
- Frequency of occurrence: This problem is consistent across multiple boots, requiring manual intervention each time.
- User experience impact: The necessity to manually execute commands after each boot significantly hampers usability.
Possible Causes
Several potential causes for the issue have been identified:
-
Pinmux Configuration Errors: Incorrectly configured pinmux settings may prevent the PWM from functioning as expected.
-
Driver Issues: There could be bugs or incompatibilities in the software drivers related to PWM or display management.
-
Environmental Factors: Power supply inconsistencies or temperature variations might affect PWM performance.
-
User Misconfiguration: Users may not be applying the correct parameters or configurations needed for PWM operation.
-
Software Bugs: There may be underlying software bugs in the UEFI firmware that prevent proper initialization of PWM settings at boot.
Troubleshooting Steps, Solutions & Fixes
To address the issue, users can follow these troubleshooting steps and solutions:
-
Verify Pinmux Settings:
- Ensure that GPIO07 is correctly configured as PWM and GPIO13 is set as GPIO in the pinmux settings. Review the pinmux spreadsheet for accuracy.
-
Check Device Tree Configuration:
- Examine the device tree source (DTS) file to ensure that the PWM nodes are correctly defined. Any misconfiguration here can lead to failures in PWM initialization.
-
Review dmesg Logs:
- Analyze the output from
dmesg
to identify any error messages related to PWM or display initialization. This can provide insights into what might be going wrong during boot.
- Analyze the output from
-
Execute Commands on Boot:
- Automate the execution of brightness control commands at boot by adding them to a startup script. For example, create a script named
set_pwm_brightness.sh
with the following content:
#!/bin/bash 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 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
- Automate the execution of brightness control commands at boot by adding them to a startup script. For example, create a script named
-
Testing Different Configurations:
- Test using GPIO pins instead of PWMs temporarily to confirm that the displays function correctly without PWM control. This can help isolate whether the issue is specifically with PWM configuration.
-
Update Firmware and Drivers:
- Ensure that you are using the latest version of L4T (Linux for Tegra) and check for any available updates related to drivers or firmware that might address known issues with PWM functionality.
-
Community Support:
- Engage with community forums or Nvidia support channels for additional insights or similar experiences from other users who may have resolved this issue.
-
Document Findings:
- Keep a detailed log of any changes made and their effects on system behavior, which may assist in further troubleshooting or when seeking help from support forums.
By following these steps, users should be able to diagnose and potentially resolve issues related to backlight control using PWM on their Nvidia Jetson Orin Nano Dev board. If problems persist, further investigation into hardware compatibility or deeper software issues may be necessary.