* [PATCH 1/3] drm/panel: nt36672a: add backlight support
[not found] <20220330065639.245531-1-jo@jsfamily.in>
@ 2022-03-30 6:56 ` Joel Selvaraj
2022-03-30 6:56 ` [PATCH 2/3] dt-bindings: display: novatek,nt36672a: add backlight property Joel Selvaraj
2022-03-30 6:56 ` [PATCH 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel Joel Selvaraj
2 siblings, 0 replies; 5+ messages in thread
From: Joel Selvaraj @ 2022-03-30 6:56 UTC (permalink / raw)
To: Sumit Semwal, Thierry Reding, Sam Ravnborg, David Airlie,
Daniel Vetter, Rob Herring, Andy Gross, Bjorn Andersson
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, phone-devel, Amit Pundir,
Joel Selvaraj
Add support for backlight. This panel supports backlight control
through the QCOM WLED driver in Xiaomi Poco F1 device.
Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
---
drivers/gpu/drm/panel/panel-novatek-nt36672a.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
index 231f371901e8..6d6ce42787e2 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c
@@ -628,6 +628,10 @@ static int nt36672a_panel_add(struct nt36672a_panel *pinfo)
drm_panel_init(&pinfo->base, dev, &panel_funcs, DRM_MODE_CONNECTOR_DSI);
+ ret = drm_panel_of_backlight(&pinfo->base);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to get backlight\n");
+
drm_panel_add(&pinfo->base);
return 0;
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] dt-bindings: display: novatek,nt36672a: add backlight property
[not found] <20220330065639.245531-1-jo@jsfamily.in>
2022-03-30 6:56 ` [PATCH 1/3] drm/panel: nt36672a: add backlight support Joel Selvaraj
@ 2022-03-30 6:56 ` Joel Selvaraj
2022-03-30 6:56 ` [PATCH 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel Joel Selvaraj
2 siblings, 0 replies; 5+ messages in thread
From: Joel Selvaraj @ 2022-03-30 6:56 UTC (permalink / raw)
To: Sumit Semwal, Thierry Reding, Sam Ravnborg, David Airlie,
Daniel Vetter, Rob Herring, Andy Gross, Bjorn Andersson
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, phone-devel, Amit Pundir,
Joel Selvaraj
Add backlight property and update example to include it.
Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
---
.../devicetree/bindings/display/panel/novatek,nt36672a.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml
index 563766d283f6..41ee3157a1cd 100644
--- a/Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml
+++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml
@@ -46,6 +46,7 @@ properties:
reg: true
port: true
+ backlight: true
required:
- compatible
@@ -73,6 +74,7 @@ examples:
vddpos-supply = <&lab>;
vddneg-supply = <&ibb>;
+ backlight = <&pmi8998_wled>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
port {
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel
[not found] <20220330065639.245531-1-jo@jsfamily.in>
2022-03-30 6:56 ` [PATCH 1/3] drm/panel: nt36672a: add backlight support Joel Selvaraj
2022-03-30 6:56 ` [PATCH 2/3] dt-bindings: display: novatek,nt36672a: add backlight property Joel Selvaraj
@ 2022-03-30 6:56 ` Joel Selvaraj
2022-03-30 7:17 ` Marijn Suijten
2 siblings, 1 reply; 5+ messages in thread
From: Joel Selvaraj @ 2022-03-30 6:56 UTC (permalink / raw)
To: Sumit Semwal, Thierry Reding, Sam Ravnborg, David Airlie,
Daniel Vetter, Rob Herring, Andy Gross, Bjorn Andersson
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, phone-devel, Amit Pundir,
Joel Selvaraj
Xiaomi Poco F1 uses the QCOM WLED driver for backlight control.
Enable and link it to the panel to use it.
Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
---
.../arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
index 798fc72578a7..3ebb0f9905d3 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
@@ -231,6 +231,7 @@ panel@0 {
#address-cells = <1>;
#size-cells = <0>;
+ backlight = <&pmi8998_wled>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
port {
@@ -314,6 +315,18 @@ vol_up_pin_a: vol-up-active {
};
};
+&pmi8998_wled {
+ status = "okay";
+ qcom,current-boost-limit = <970>;
+ qcom,ovp-millivolt = <29600>;
+ qcom,current-limit-microamp = <20000>;
+ qcom,enabled-strings = <0 1>;
+ qcom,num-strings = <2>;
+ qcom,switching-freq = <600>;
+ qcom,external-pfet;
+ qcom,cabc;
+};
+
&pm8998_pon {
resin {
compatible = "qcom,pm8941-resin";
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel
2022-03-30 6:56 ` [PATCH 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel Joel Selvaraj
@ 2022-03-30 7:17 ` Marijn Suijten
2022-03-30 7:48 ` Joel Selvaraj
0 siblings, 1 reply; 5+ messages in thread
From: Marijn Suijten @ 2022-03-30 7:17 UTC (permalink / raw)
To: Joel Selvaraj
Cc: Sumit Semwal, Thierry Reding, Sam Ravnborg, David Airlie,
Daniel Vetter, Rob Herring, Andy Gross, Bjorn Andersson,
dri-devel, devicetree, linux-kernel, linux-arm-msm,
~postmarketos/upstreaming, phone-devel, Amit Pundir
On 2022-03-30 12:26:39, Joel Selvaraj wrote:
> Xiaomi Poco F1 uses the QCOM WLED driver for backlight control.
> Enable and link it to the panel to use it.
>
> Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
> ---
> .../arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> index 798fc72578a7..3ebb0f9905d3 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
> @@ -231,6 +231,7 @@ panel@0 {
> #address-cells = <1>;
> #size-cells = <0>;
>
> + backlight = <&pmi8998_wled>;
> reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
>
> port {
> @@ -314,6 +315,18 @@ vol_up_pin_a: vol-up-active {
> };
> };
>
> +&pmi8998_wled {
> + status = "okay";
> + qcom,current-boost-limit = <970>;
> + qcom,ovp-millivolt = <29600>;
> + qcom,current-limit-microamp = <20000>;
> + qcom,enabled-strings = <0 1>;
> + qcom,num-strings = <2>;
No need to set both nowadays, the driver will even print a warning in
this case:
https://lore.kernel.org/linux-arm-msm/20211115203459.1634079-6-marijn.suijten@somainline.org/
Sticking with qcom,num-strings is probably the right choice here.
- Marijn
> + qcom,switching-freq = <600>;
> + qcom,external-pfet;
> + qcom,cabc;
> +};
> +
> &pm8998_pon {
> resin {
> compatible = "qcom,pm8941-resin";
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel
2022-03-30 7:17 ` Marijn Suijten
@ 2022-03-30 7:48 ` Joel Selvaraj
0 siblings, 0 replies; 5+ messages in thread
From: Joel Selvaraj @ 2022-03-30 7:48 UTC (permalink / raw)
To: marijn.suijten
Cc: agross, airlied, amit.pundir, bjorn.andersson, daniel, devicetree,
dri-devel, jo, linux-arm-msm, linux-kernel, phone-devel, robh+dt,
sam, sumit.semwal, thierry.reding, ~postmarketos/upstreaming
Hi Marijn,
On 30/03/22 12:47, Marijn Suijten wrote:
> On 2022-03-30 12:26:39, Joel Selvaraj wrote:
>> Xiaomi Poco F1 uses the QCOM WLED driver for backlight control.
>> Enable and link it to the panel to use it.
>>
>> Signed-off-by: Joel Selvaraj <jo@jsfamily.in>
>> ---
>> .../arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
>> index 798fc72578a7..3ebb0f9905d3 100644
>> --- a/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
>> +++ b/arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts
>> @@ -231,6 +231,7 @@ panel@0 {
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> + backlight = <&pmi8998_wled>;
>> reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
>>
>> port {
>> @@ -314,6 +315,18 @@ vol_up_pin_a: vol-up-active {
>> };
>> };
>>
>> +&pmi8998_wled {
>> + status = "okay";
>> + qcom,current-boost-limit = <970>;
>> + qcom,ovp-millivolt = <29600>;
>> + qcom,current-limit-microamp = <20000>;
>> + qcom,enabled-strings = <0 1>;
>> + qcom,num-strings = <2>;
>
> No need to set both nowadays, the driver will even print a warning in
> this case:
>
>
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flinux-arm-msm%2F20211115203459.1634079-6-marijn.suijten%40somainline.org%2F&data=04%7C01%7C%7C2104b54ac0f54308dd1208da121d706a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637842214894184949%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=GYmzHoy6tTAE7ZNTqclfCZH5Fnu%2Bh5d5JHOwsm4wVro%3D&reserved=0
>
> Sticking with qcom,num-strings is probably the right choice here.
Ok. Thanks. Will fix it in the next version.
Regards
Joel
>
> - Marijn
>
>> + qcom,switching-freq = <600>;
>> + qcom,external-pfet;
>> + qcom,cabc;
>> +};
>> +
>> &pm8998_pon {
>> resin {
>> compatible = "qcom,pm8941-resin";
>> --
>> 2.35.1
>>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-30 7:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220330065639.245531-1-jo@jsfamily.in>
2022-03-30 6:56 ` [PATCH 1/3] drm/panel: nt36672a: add backlight support Joel Selvaraj
2022-03-30 6:56 ` [PATCH 2/3] dt-bindings: display: novatek,nt36672a: add backlight property Joel Selvaraj
2022-03-30 6:56 ` [PATCH 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium: enable qcom wled backlight and link to panel Joel Selvaraj
2022-03-30 7:17 ` Marijn Suijten
2022-03-30 7:48 ` Joel Selvaraj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox