Files
cubelinux-kernel/tools/arch/x86/dell-uart-backlight-emulator
Greg Kroah-Hartman 598cf27219 Linux 6.19.3
Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Luna Jernberg <droidbittin@gmail.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-19 16:33:27 +01:00
..
2026-02-19 16:33:27 +01:00
2026-02-19 16:33:27 +01:00
2026-02-19 16:33:27 +01:00
2026-02-19 16:33:27 +01:00

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Emulator for DELL0501 UART attached backlight controller
--------------------------------------------------------

Dell All In One (AIO) models released after 2017 use a backlight controller
board connected to an UART.

In DSDT this uart port will be defined as:

   Name (_HID, "DELL0501")
   Name (_CID, EisaId ("PNP0501")

With the DELL0501 indicating that we are dealing with an UART with
the backlight controller board attached.

This small emulator allows testing
the drivers/platform/x86/dell/dell-uart-backlight.c driver without access
to an actual Dell All In One.

This requires:
1. A (desktop) PC with a 16550 UART on the motherboard and a standard DB9
   connector connected to this UART.
2. A DB9 NULL modem cable.
3. A second DB9 serial port, this can e.g. be a USB to serial converter
   with a DB9 connector plugged into the same desktop PC.
4. A DSDT overlay for the desktop PC replacing the _HID of the 16550 UART
   ACPI Device() with "DELL0501" and adding a _CID of "PNP0501", see
   DSDT.patch for an example of the necessary DSDT changes.

With everything setup and the NULL modem cable connected between
the 2 serial ports run:

./dell-uart-backlight-emulator <path-to-/dev/tty*S#-for-second-port>

For example when using an USB to serial converter for the second port:

./dell-uart-backlight-emulator /dev/ttyUSB0

And then (re)load the dell-uart-backlight driver:

sudo rmmod dell-uart-backlight; sudo modprobe dell-uart-backlight dyndbg

After this check "dmesg" to see if the driver correctly received
the firmware version string from the emulator. If this works there
should be a /sys/class/backlight/dell_uart_backlight/ directory now
and writes to the brightness or bl_power files should be reflected
by matching output from the emulator.