On the Apalis Standard two dedicated pins are used for backlight control, BKL1_ON and BKL1_PWM. Note that so far all Apalis modules use the same PWM instance on the pins PWM4 and BKL1_PWM, hence PWM4 can not be used independently when BKL1_PWM is in use.

On our Colibri carrier boards BL_ON together with PWM<A> are used for adjusting LCD brightness. On the Colibri Evaluation Board and Iris Carrier Board the BL_ON signal also controls the VGA DAC operation.

Some displays have their maximum brightness if the PWM signal is constant at 3.3V while other displays are inverted and have their maximum brightness when the PWM signal is at 0V. The PWM signal logic of the displays sold by Toradex is documented in the table under PWM Logic.

The Linux kernel exposes backlights through a sysfs ABI called backlight (located under /sys/class/backlight/, see also the kernel documentation located in the source tree under Documentation/ABI/stable/sysfs-class-backlight). The Linux BSP of all modules make use of the backlight API, however there are subtle differences mostly arising from the different kernel version used.

The backlight driver controls both BL_ON/BKL1_ON and the PWM and targets a display which is brightest at 0% aka inverted. However apart from the behaviour at the extremes it works just fine with a display which is brightest at 100% aka not inverted as well.

The sysfs files can be found in the following directory:
/sys/class/backlight/pwm-backlight/

The brightness and bl_power files control the duty cycle and BL_ON/BKL1_ON as follows:

The files bl_power and brightness in /sys/class/backlight/backlight/ control the PWM signal.

The device tree contains the backlight configuration. This includes a mapping of brightness values to duty cycles with the value 0 generating a duty cycle of 0% and the value in max_brightness generating a duty cycle of 100%. Also the PWM frequency and polarity can be configured.

The following queries the number of brightness steps, sets the duty cycle to brightest and then to its darkest.

The adapter PCB for the Capacitive Multi-Touch Display 7" display has a PWM/digital to backlight LED current converter. This converter requires the PWM Frequency to be > 10 kHz or it will fall into its digital mode at least for some duty cycles keeping the backlight dark.