From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796425550; b=2/E03UPcHioijcjopa9mDLv6I4WFyPrc78Nt6wqNvgVwj1JhmW5nf27hMwNj20bffBIf +c11M1FlChd6i911EiL3ugEEKLmLoljsLE0xPrOl9/NPAfHvLT5Z4ZplB4TfM4pOxckXn sG659cP8etanewo0QVxvf/jsEZiQK41F9azdesala6EtPl5OhatsM6gYvZw4L8eZUI916 jWrXta6JnZ+L2PTPgLoYrbdjZQSc8+UE9c0j9a80S47I2W3FrLtprf2fX6+HkzmAqGB7h w20Nu+oBYjlYjKSKQJ7AhRzwoBvedvDeo9IMRKPsjzBcTWrRnJh7OFtlRSXUY3+19tw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796425550; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=D5isXzgBlMOpSKreptIIuWMoO7Hd5Wotb87Wz6UTARA=; b=E48E6owwptx3HsXXAnrwq6KyVQHeD2ODlVD6SmVozJ8M5Gql4gfKL4n84p48t9DEQnGb UhbVt306Z6zlWVUeKyee/nRnDf4S5ePcLviiz/5/jVodho0EQ2jXyfl/oBjKAS48Myw/X swByIY2MNe8E8AJk2PHYJaIihvBR54ob0T0JAhyDRElWVMEqBP95Mi7201sMi/3Q2BusR qX6IIUIEZUm02ASwVDtemw3vy/S5bSOTLnaQuhtF0DhQdcv5IcWTYaRPa8ngN3KSPq0hc KifjWBV8Eob/6FlxReo4D0otNDYFhvgvw01LoqOOWFi6cGMBC83EMQhB/gt4G2ny3dw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NfTViAe7; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D001A606A322; Fri, 4 Dec 2026 23:05:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=NfTViAe7 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E62041F0093B; Fri, 4 Dec 2026 23:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796425550; bh=D5isXzgBlMOpSKreptIIuWMoO7Hd5Wotb87Wz6UTARA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=NfTViAe7p1+pQxYp1IZQAV6Kj1vjcXkjG4kTFkw7AdSt6YXJzjy8QIOYNfWhqgxXh Z9WwAcnUoy18OmcGO7H2l/cL65I+gjNY/M5pC0Tf0H0EvgZpsxRhT3bjcf19BjCFw4 jcnS323KzRU+1chqlVJt4XIO1ecP/l2okJvsp/QMHyg+fiSpvjLIY6awohkzyM755F M8xHwyy7cuuFfkJh6u03ep16vgYipeuFrup7POMKr5srp/xOEHHR+1Dza3myZ/V6Mg 2PwXNl531TNUo3KSCUe+NEHc8N5W9LbcFen3cGOSTegprpig048EQaCdfZA2+5rzhm GWIknxAMq/FNw== Date: Fri, 4 Dec 2026 17:05:46 -0600 From: Bjorn Andersson To: Fernando.Monticelli@cern.ch Cc: Konrad Dybcio , Abel Vesa , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ggo@tuxedocomputers.com Subject: Re: [PATCH] arm64: dts: qcom: x1e80100-medion-sprchrgd-14-s1: Enable PWM backlight Message-ID: References: <20261130-arm64-for-7-5-v1-1-c67eb7f42a47@cern.ch> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130-arm64-for-7-5-v1-1-c67eb7f42a47@cern.ch> On Mon, Nov 30, 2026 at 02:40:09PM -0300, Fernando Monticelli via B4 Relay wrote: > From: Fernando Monticelli > > The CSOT MNE007ZA3-2 eDP panel used in this laptop only supports > brightness control through its PWM input pin (DPCD 0x702 = 0x81: > BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP set, BRIGHTNESS_AUX_SET_CAP clear), so > the DP AUX backlight that panel-edp registers ends up with > max_brightness = 0 and brightness cannot be changed. > > The Windows ACPI panel configuration (\_SB.GPU0._ROM) describes the > backlight as PMIC PWM on PMIC index 1 (pm8550), bank 3, 9 bit, 2 kHz. > The PWM input of the panel is connected to pm8550 gpio9. Routing LPG > channel 4 to that pin through function "func1" does not work on this > board (the panel stays dark at any duty cycle), but routing it through > the DTEST1 line does. The backlight enable is pmc8380_3 gpio4, which > the Windows display power sequence drives high and the firmware already > leaves high. > > Describe the pwm-backlight and wire it up to the panel. > > Tested on a Medion SPRCHRGD 14 S1 (X1E78100, BIOS 1.04): brightness > keys and the GNOME slider work across the whole range, and the > backlight survives suspend/resume. > I already merged https://patch.msgid.link/20261025-medion-sprchrgd-14-backlight-v2-1-bf2979485ec2@se-rg.io but your change looks a bit more complete. Please review the current state of linux-next and submit incremental changes as necessary. Thank you, Bjorn > Signed-off-by: Fernando Monticelli > --- > .../dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts | 40 ++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts b/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts > index 9b599917c15a..b161c98ba219 100644 > --- a/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts > +++ b/arch/arm64/boot/dts/qcom/x1e80100-medion-sprchrgd-14-s1.dts > @@ -52,6 +52,20 @@ wcd938x: audio-codec { > #sound-dai-cells = <1>; > }; > > + backlight: backlight { > + compatible = "pwm-backlight"; > + pwms = <&pm8550_pwm 3 500000>; > + > + brightness-levels = <0 2048 4096 8192 16384 65535>; > + num-interpolated-steps = <20>; > + default-brightness-level = <80>; > + > + enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>; > + > + pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; > + pinctrl-names = "default"; > + }; > + > chosen { > stdout-path = "serial0:115200n8"; > }; > @@ -997,6 +1011,7 @@ &mdss_dp3 { > aux-bus { > panel { > compatible = "edp-panel"; > + backlight = <&backlight>; > power-supply = <&vreg_edp_3p3>; > > port { > @@ -1084,6 +1099,11 @@ &pcie6a_port0 { > }; > > &pm8550_gpios { > + edp_bl_pwm: edp-bl-pwm-state { > + pins = "gpio9"; > + function = "dtest1"; > + }; > + > rtmr0_default: rtmr0-reset-n-active-state { > pins = "gpio10"; > function = "normal"; > @@ -1103,6 +1123,16 @@ usb0_3p3_reg_en: usb0-3p3-reg-en-state { > }; > }; > > +&pm8550_pwm { > + /* > + * The panel PWM input is on pm8550 gpio9, which LPG channel 4 only > + * reaches through the DTEST1 line (the func1 path does not work). > + */ > + qcom,dtest = <0 0>, <0 0>, <0 0>, <1 1>; > + > + status = "okay"; > +}; > + > &pm8550ve_9_gpios { > usb0_1p8_reg_en: usb0-1p8-reg-en-state { > pins = "gpio8"; > @@ -1114,6 +1144,16 @@ usb0_1p8_reg_en: usb0-1p8-reg-en-state { > }; > }; > > +&pmc8380_3_gpios { > + edp_bl_en: edp-bl-en-state { > + pins = "gpio4"; > + function = "normal"; > + power-source = <1>; /* 1.8V */ > + input-disable; > + output-enable; > + }; > +}; > + > &pmc8380_5_gpios { > usb0_pwr_1p15_reg_en: usb0-pwr-1p15-reg-en-state { > pins = "gpio8"; > > --- > base-commit: dde0308a2f8867806a444df1fdd7e685b1c56d5b > change-id: 20261130-arm64-for-7-5-caecf7bd4bed > > Best regards, > -- > Fernando Monticelli > >