linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED
@ 2022-04-25  3:28 Dang Huynh
  2022-04-25 13:13 ` Alexey Minnekhanov
  2022-06-27 20:02 ` (subset) " Bjorn Andersson
  0 siblings, 2 replies; 3+ messages in thread
From: Dang Huynh @ 2022-04-25  3:28 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel

WLED is used for controlling display backlight on this phone.

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index dcbaacf18f66..7a30008ee0dd 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -363,6 +363,14 @@ vreg_l19a_3p3: l19 {
 	};
 };
 
+&pm660l_wled {
+	status = "okay";
+
+	qcom,switching-freq = <800>;
+	qcom,current-limit-microamp = <20000>;
+	qcom,num-strings = <2>;
+};
+
 &sdhc_1 {
 	status = "okay";
 	supports-cqe;
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED
  2022-04-25  3:28 [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED Dang Huynh
@ 2022-04-25 13:13 ` Alexey Minnekhanov
  2022-06-27 20:02 ` (subset) " Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Minnekhanov @ 2022-04-25 13:13 UTC (permalink / raw)
  To: Dang Huynh
  Cc: Andy Gross, Bjorn Andersson, Krzysztof Kozlowski, linux-arm-msm,
	devicetree, linux-kernel, Marijn Suijten

25.04.2022 06:28, Dang Huynh wrote:
> WLED is used for controlling display backlight on this phone.
> 

Hi!

Interacting with wled changes brightness indeed, but results in the 
following trace in dmesg:

```
[  499.906317] ------------[ cut here ]------------
[  499.906478] Unbalanced enable for IRQ 39
[  499.910118] WARNING: CPU: 4 PID: 74 at kernel/irq/manage.c:774 
__enable_irq+0x4c/0x80
[  499.914094] Modules linked in:
[  499.921705] CPU: 4 PID: 74 Comm: kworker/4:2 Not tainted 
5.17.0-sdm660-07615-gd33d148796b0-dirty #23
[  499.924800] Hardware name: Xiaomi Redmi Note 7 (DT)
[  499.933988] Workqueue: events wled_ovp_work
[  499.938571] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS 
BTYPE=--)
[  499.942803] pc : __enable_irq+0x4c/0x80
[  499.949687] lr : __enable_irq+0x4c/0x80
[  499.953506] sp : ffff800008a73d70
[  499.957311] x29: ffff800008a73d70 x28: 0000000000000000 x27: 
0000000000000000
[  499.960890] x26: ffffad5f9fa4efc0 x25: ffff60283e4baf05 x24: 
ffff602781f65130
[  499.968010] x23: ffff60283e4baf00 x22: ffff60283e4b7180 x21: 
0000000000000000
[  499.975128] x20: 0000000000000027 x19: ffff602781136600 x18: 
ffffffffffffffff
[  499.982243] x17: 0000000000000000 x16: 0000000000000000 x15: 
0000000000000001
[  499.989363] x14: 0000000000000000 x13: ffffad5f9f92fea8 x12: 
0000000000000357
[  499.996479] x11: 000000000000011d x10: ffffad5f9f987ea8 x9 : 
ffffad5f9f92fea8
[  500.003597] x8 : 00000000ffffefff x7 : ffffad5f9f987ea8 x6 : 
0000000000000000
[  500.010714] x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 
0000000000000000
[  500.017832] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 
ffff6027820c8000
[  500.024954] Call trace:
[  500.047230]  __enable_irq+0x4c/0x80
[  500.062686]  enable_irq+0x48/0xa0
[  500.078190]  wled_ovp_work+0x14/0x20
[  500.093761]  process_one_work+0x1d0/0x320
[  500.105080]  worker_thread+0x14c/0x444
[  500.120700]  kthread+0x10c/0x110
[  500.136347]  ret_from_fork+0x10/0x20
[  500.151981] ---[ end trace 0000000000000000 ]---
```

-- 
Regards,
Alexey Minnekhanov
postmarketOS developer
https://www.postmarketos.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: (subset) [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED
  2022-04-25  3:28 [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED Dang Huynh
  2022-04-25 13:13 ` Alexey Minnekhanov
@ 2022-06-27 20:02 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2022-06-27 20:02 UTC (permalink / raw)
  To: Dang Huynh
  Cc: linux-kernel, Krzysztof Kozlowski, linux-arm-msm, Rob Herring,
	devicetree, Andy Gross

On Mon, 25 Apr 2022 10:28:24 +0700, Dang Huynh wrote:
> WLED is used for controlling display backlight on this phone.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED
      commit: b74f7b8f174f0ce2261cc05050dcbfed3314ab1e

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-27 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25  3:28 [PATCH] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED Dang Huynh
2022-04-25 13:13 ` Alexey Minnekhanov
2022-06-27 20:02 ` (subset) " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).