From: barnabas.czeman@mainlining.org
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] arm64: dts: qcom: msm8917-xiaomi-riva: Add display backlight
Date: Wed, 12 Feb 2025 23:36:58 +0100 [thread overview]
Message-ID: <c299f30205b602031905ed972fc6ea9f@mainlining.org> (raw)
In-Reply-To: <0d540105-1da7-459b-a812-dbc13097520e@oss.qualcomm.com>
On 2025-02-12 23:31, Konrad Dybcio wrote:
> On 12.02.2025 11:21 PM, Barnabás Czémán wrote:
>> Redmi 5A display uses pwm backlight, add support for it.
>>
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
>> arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 25
>> ++++++++++++++++++++++++
>> 1 file changed, 25 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
>> b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
>> index
>> f1d22535fedd94467ba3f0a88b2110ce5360e7e1..8808306c989f54116052667887f9bf36b63c4c64
>> 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
>> +++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
>> @@ -20,6 +20,14 @@ / {
>> qcom,msm-id = <QCOM_ID_MSM8917 0>;
>> qcom,board-id = <0x1000b 2>, <0x2000b 2>;
>>
>> + pwm_backlight: backlight {
>> + compatible = "pwm-backlight";
>> + pwms = <&pm8937_pwm 0 100000>;
>> + brightness-levels = <0 255>;
>> + num-interpolated-steps = <255>;
>> + default-brightness-level = <128>;
>> + };
>> +
>> battery: battery {
>> compatible = "simple-battery";
>> charge-full-design-microamp-hours = <3000000>;
>> @@ -131,6 +139,23 @@ bq25601@6b{
>> };
>> };
>>
>> +&pm8937_gpios {
>> + pwm_enable_default: pwm-enable-default-state {
>> + pins = "gpio8";
>> + function = "dtest2";
>
> Are you sure?
Yes,
https://github.com/Mi-Thorium/kernel_devicetree_xiaomi-msm8937/blob/dts/mi8937/4.9/master/wingtech/msm8917/common/pm8937.dtsi#L24-L31
>> + output-low;
>> + bias-disable;
>> + qcom,drive-strength = <2>;
>> + };
>> +};
>> +
>> +&pm8937_pwm {
>> + pinctrl-0 = <&pwm_enable_default>;
>> + pinctrl-names = "default";
>
> We normally put this under the backlight node, but I'm not sure which
> one is more correct.. it may be that this one is, given we're
> controlling the pin that the PWM signal is sent through
It is for enabling pwm and not backlight,
it should be placed here otherwise backlight will not work correctly.
>
> Konrad
prev parent reply other threads:[~2025-02-12 22:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 22:21 [PATCH 0/2] Add PM8937 PWM and display backlight for Redmi 5A Barnabás Czémán
2025-02-12 22:21 ` [PATCH 1/2] arm64: dts: qcom: pm8937: Add LPG PWM driver Barnabás Czémán
2025-02-12 22:27 ` Konrad Dybcio
2025-02-12 22:21 ` [PATCH 2/2] arm64: dts: qcom: msm8917-xiaomi-riva: Add display backlight Barnabás Czémán
2025-02-12 22:31 ` Konrad Dybcio
2025-02-12 22:36 ` barnabas.czeman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c299f30205b602031905ed972fc6ea9f@mainlining.org \
--to=barnabas.czeman@mainlining.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.