Hi everyone,
I’m trying to get a Sharp LS035Y8DX04A working on my Raspberry Pi using DPI (mode 6, 666), but I’m running into issues with the overlay not loading as expected and also with brightness control.
Here’s the overlay I’m using (compiled with `dtc -@ -I dts -O dtb -o sharp.dtbo sharp.dts`):
dtsThe problem: The overlay compiles and I can't load it, but the backlight control doesn’t seem to work properly. When I try:
bashbashI get:
`max_brightness` seems empty, and changing `brightness` doesn’t affect the screen.
So I have two questions for the community:
1. Why is this overlay not properly applying? Did I miss something in the pinmux or the backlight section?
2. Why is `max_brightness` empty, and how do I get proper PWM-based brightness control working instead of just on/off?
if i use the following it works properly my backlight
bashAny insights or working examples would be hugely appreciated! Thank you in advance.
I’m trying to get a Sharp LS035Y8DX04A working on my Raspberry Pi using DPI (mode 6, 666), but I’m running into issues with the overlay not loading as expected and also with brightness control.
Here’s the overlay I’m using (compiled with `dtc -@ -I dts -O dtb -o sharp.dtbo sharp.dts`):
dts
Code:
/* * Device tree overlay for Sharp LS035Y8DX04A using DPI 666 mode 6 * With simplified backlight configuration *//dts-v1/;/plugin/;/{ compatible = "brcm,bcm2835"; fragment@0 { target = <&spi0>; __overlay__ { status = "disabled"; }; }; fragment@1 { target = <&leds>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&dpi16_pins>; }; }; fragment@2 { target = <&gpio>; __overlay__ { dpi16_pins: dpi16_pins { brcm,pins = <0 1 2 3 4 5 6 7 8 9 13 14 15 16 17 20 21 22 23 24 25 27>; brcm,function = <6>; brcm,pull = <0>; }; }; }; fragment@3 { target-path = "/"; __overlay__ { i2c_gpio: i2c@0 { compatible = "i2c-gpio"; gpios = <&gpio 10 0 /* sda */ &gpio 11 0 /* scl */>; i2c-gpio,delay-us = <4>; #address-cells = <1>; #size-cells = <0>; }; }; }; fragment@4 { target = <&i2c_arm>; __overlay__ { status = "disabled"; }; }; fragment@5 { target-path = "/aliases"; __overlay__ { i2c_gpio = "/i2c@0"; }; }; fragment@6 { target-path = "/__symbols__"; __overlay__ { i2c_gpio = "/i2c@0"; }; }; fragment@7 { target = <&pwm>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&pwm0_gpio12>; status = "okay"; }; }; fragment@8 { target = <&gpio>; __overlay__ { pwm0_gpio12: pwm0_gpio12 { brcm,pins = <12>; brcm,function = <4>; }; }; }; fragment@9 { target-path = "/"; __overlay__ { backlight: backlight { compatible = "gpio-backlight"; gpios = <&gpio 12 0>; default-on; }; }; };};bash
Code:
sudo dtoverlay -lNo overlays loadedCode:
echo 1 | sudo tee /sys/class/backlight/backlight/brightness # Full brightnessCode:
1 $ cat /sys/class/backlight/backlight/actual_brightness brightness display_name power/ subsystem/ uevent bl_power device/ max_brightness scale type $ cat /sys/class/backlight/backlight/max_brightness1So I have two questions for the community:
1. Why is this overlay not properly applying? Did I miss something in the pinmux or the backlight section?
2. Why is `max_brightness` empty, and how do I get proper PWM-based brightness control working instead of just on/off?
if i use the following it works properly my backlight
bash
Code:
#!/bin/bash# PWM backlight initialization for GPIO12 on Pi Zero WHPWM_CHIP=/sys/class/pwm/pwmchip0PWM_CHANNEL=0# Export PWM channel if not already exportedif [ ! -d "$PWM_CHIP/pwm$PWM_CHANNEL" ]; then echo $PWM_CHANNEL | sudo tee $PWM_CHIP/exportfi# Set PWM period (1 kHz)echo 1000000 | sudo tee $PWM_CHIP/pwm$PWM_CHANNEL/period# Set default duty cycle (50% brightness)echo 500000 | sudo tee $PWM_CHIP/pwm$PWM_CHANNEL/duty_cycle# Enable PWM outputecho 1 | sudo tee $PWM_CHIP/pwm$PWM_CHANNEL/enableStatistics: Posted by coolerboy — Tue Sep 02, 2025 3:59 pm — Replies 4 — Views 219