2024-11-04 01:57 PM
Hello everyone,
I am using the STM32MP135 SoM from PHYTEC, and I’m creating a custom device tree source (DTS) file tailored to our carrier board. I’m having trouble controlling the backlight PWM signal. I’m unable to enable the PWM and enable signal as expected, although I can change the enable pin status if I remove the enable pin definition from the backlight node. Additionally, there is no [used] indication next to GPIOI pin 0, which I’ve configured as the panel enable GPIO. I suspect this issue may be related to the LCD node configuration.
I’ve attached my GPIO states and the DTS file for reference.
2024-11-07 02:50 AM
Hi @batuhanky
Did you try to get support from PHYTEC ?
Thanks
Olivier
2024-11-07 03:23 AM
Perhaps indicate how it would work in the generic non-board specific sense, and if the DTS file misses specific details or is otherwise internally inconsistent.
That would be more helpful than entirely punting and might have broader impact.
2024-11-07 03:47 AM
Thanks for your reply, they say use overlays instead of creating new dts. When I comment out the backlight property from the panel node I can control the backlight enable and pwm pins, but when I add the backlight property I can't control anything. Here is the dts that works:
panel_rgb: rgb-panel {
compatible = "panel-dpi";
label = "generic-lcd";
enable-gpio = <&gpioi 0 GPIO_ACTIVE_HIGH>;
//backlight = <&panel_backlight>;
data-mapping = "bgr666";
status = "okay";
width-mm = <115>;
height-mm = <80>;
port {
panel_in_rgb: endpoint {
remote-endpoint = <<dc_ep0_out>;
};
};
panel-timing {
clock-frequency = <9800000>;
hactive = <480>;
vactive = <272>;
hfront-porch = <39>;
hback-porch = <39>;
hsync-len = <4>;
vback-porch = <29>;
vfront-porch = <13>;
vsync-len = <10>;
hsync-active = <0>;
vsync-active = <0>;
phandle = <86>;
};
};
panel_backlight: panel-backlight {
compatible = "pwm-backlight";
status = "okay";
pwms = <&pwm_bl 2 50000 1>;
enable-gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>;
power-supply = <&scmi_vdd>;
brightness-levels = <0 2 5 7 10 12 15 17 20 22 25 28 30 33 35
38 40 43 45 48 51 53 56 58 61 63 66 68 71
73 76 79 81 84 86 89 91 94 96 99 102 104
107 109 112 114 117 119 122 124 127 130
132 135 137 140 142 145 147 150 153 155
158 160 163 165 168 170 173 175 178 181
183 186 188 191 193 196 198 201 204 206
209 211 214 216 219 221 224 226 229 232
234 237 239 242 244 247 249 252 255>;
default-brightness-level = <50>;
};