On 25-03-08 01:01:31, Sebastian Reichel wrote: > Hi, > > On Thu, Mar 06, 2025 at 11:05:02AM +0200, Abel Vesa wrote: > > Due to the fact that Lenovo Thinkpad T14s Gen6 is available with both > > OLED and LCD, the backlight control differs HW-wise. For the LCD variant, > > the panel's backlight is controlled via one of the PWMs provided by the > > PMK8550 PMIC. For the OLED variant, the backlight is internal to the > > panel and therefore it is not described in devicetree. > > > > For this reason, create a generic dtsi for the T14s by renaming the > > existing dts. While at it, add a node name to panel and drop the enable > > gpio and pinctrl properties from the panel node. Then add the LCD variant > > dts file with the old name and describe all backlight related nodes. > > > > So the existing dts will now be used for LCD variant while for OLED new > > dts will be added. > > > > Signed-off-by: Abel Vesa <abel.vesa@xxxxxxxxxx> > > --- > > [...] > > + backlight: backlight { > > + compatible = "pwm-backlight"; > > + pwms = <&pmk8550_pwm 0 5000000>; > > I've tried this patch series together with the fix series [0], but > without the duty cycle calculation change [1]. Instead I changed the > period from 5000000 to 4266667. With that everything works as > expected for me. > > [0] https://lore.kernel.org/all/20250305-leds-qcom-lpg-fix-max-pwm-on-hi-res-v4-0-bfe124a53a9f@xxxxxxxxxx/ > [1] https://lore.kernel.org/all/20250303-leds-qcom-lpg-compute-pwm-value-using-period-v1-1-833e729e3da2@xxxxxxxxxx/ Yes, I forgot to squash in the correct period. The period should actually be 4266537. This is because the max PWM value is actually BIT(resolution) - 1. Will update in next version. The [1] patch was basically NACKed by Uwe. It is not needed if we set the period to 4266537 in DT. > > Greetings, > > -- Sebastian