I am trying to get the hyperpixel 4 square working with my raspberry pi 5. It worked immediately with debian.
When I built a yocto image (meta-raspberrypi, latest wrynose; kernel 6.18.33), the display backlight turned off somewhen during boot. The display was reachable by software, but never displayed any content. When turning off the device, the display briefly showed an image again.
After lots of trial and error, I found out that the display works - but the backlight is somehow inverted (when holding a torch next to the display, I can see the contents). The “fix” was:
rmmod gpio_backlight
gpioset -c gpiochip0 19=1
Is this a known issue? Where could that come from?
> cat /sys/kernel/debug/gpio | grep "backlight"
gpio-19 (GPIO19 |backlight ) out lo
why is the backlight low? /sys/class/backlight/backlight tells me it is at max brightness (1) - setting it to 0 also does not change anything
That smells like a devicetree polarity mismatch. The official Raspberry Pi kernel overlay for the HyperPixel 4 Square (vc4-kms-dpi-hyperpixel4sq-overlay, via the shared vc4-kms-dpi-hyperpixel dtsi) declares the backlight as gpio-backlight on GPIO19 with flag 0, which is active high - so at max brightness GPIO19 should read high, not low like in your dump. The gpio-backlight driver just follows the active flag in the gpios property, so my guess is that your Yocto build ends up with a different backlight node than the Raspberry Pi OS image (different overlay or an override somewhere). Comparing the backlight node from your running system (dtc -I fs /proc/device-tree) against that overlay should show where the polarity diverges.
It took me hours to figure this out, but the solution was way simpler than expected:
echo "0" >/sys/class/backlight/backlight/bl_power
for some reason, debian seems to automatically turn on the backlight power when the driver is loaded, but the yocto configuration does not.
I took a look at the toradex wiki which told me “0” in bl_power means “on” and “1” is off.
So if anyone else is facing similar issues: turning up brightness to the maximum (1) does not automatically mean that the backlight is actually turned on.
This solves my issue. thanks.