2021-12-29 17:04:35

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 0/4] Enable display backlight on Fairphone 4

Add and enable PM6150L wled which is used for controlling the display
backlight on Fairphone 4.

This series depends on the recent wled series by Marijn Suijten,
currently applied in the for-backlight-next branch of
kernel/git/lee/backlight.git (or linux-next).

Luca Weiss (4):
dt-bindings: backlight: qcom-wled: Add PM6150L compatible
backlight: qcom-wled: Add PM6150L compatible
arm64: dts: qcom: pm6150l: Add wled node
arm64: dts: qcom: sm7225-fairphone-fp4: Configure WLED

.../devicetree/bindings/leds/backlight/qcom-wled.yaml | 1 +
arch/arm64/boot/dts/qcom/pm6150l.dtsi | 10 ++++++++++
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 9 +++++++++
drivers/video/backlight/qcom-wled.c | 1 +
4 files changed, 21 insertions(+)

--
2.34.1



2021-12-29 17:04:44

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 1/4] dt-bindings: backlight: qcom-wled: Add PM6150L compatible

Document the compatible for the wled block found in PM6150L.

Signed-off-by: Luca Weiss <[email protected]>
---
Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
index d839e75d9788..1c24b333c6e2 100644
--- a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
+++ b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml
@@ -22,6 +22,7 @@ properties:
- qcom,pmi8994-wled
- qcom,pmi8998-wled
- qcom,pm660l-wled
+ - qcom,pm6150l-wled
- qcom,pm8150l-wled

reg:
--
2.34.1


2021-12-29 17:04:44

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 2/4] backlight: qcom-wled: Add PM6150L compatible

PM6150L contains WLED of version 5. Add support ofr it to the driver.

Signed-off-by: Luca Weiss <[email protected]>
---
drivers/video/backlight/qcom-wled.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
index 306bcc6ccb92..527210e85795 100644
--- a/drivers/video/backlight/qcom-wled.c
+++ b/drivers/video/backlight/qcom-wled.c
@@ -1734,6 +1734,7 @@ static const struct of_device_id wled_match_table[] = {
{ .compatible = "qcom,pmi8994-wled", .data = (void *)4 },
{ .compatible = "qcom,pmi8998-wled", .data = (void *)4 },
{ .compatible = "qcom,pm660l-wled", .data = (void *)4 },
+ { .compatible = "qcom,pm6150l-wled", .data = (void *)5 },
{ .compatible = "qcom,pm8150l-wled", .data = (void *)5 },
{}
};
--
2.34.1


2021-12-29 17:04:47

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 3/4] arm64: dts: qcom: pm6150l: Add wled node

WLED is used for controlling the backlight on some boards, add the node
for it.

Signed-off-by: Luca Weiss <[email protected]>
---
arch/arm64/boot/dts/qcom/pm6150l.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pm6150l.dtsi b/arch/arm64/boot/dts/qcom/pm6150l.dtsi
index 3ca2860bb0cf..7aa2ef90cb6a 100644
--- a/arch/arm64/boot/dts/qcom/pm6150l.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm6150l.dtsi
@@ -52,5 +52,15 @@ pm6150l_lsid5: pmic@5 {
reg = <0x5 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
+
+ pm6150l_wled: leds@d800 {
+ compatible = "qcom,pm6150l-wled";
+ reg = <0xd800>, <0xd900>;
+ interrupts = <0x5 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "ovp";
+ label = "backlight";
+
+ status = "disabled";
+ };
};
};
--
2.34.1


2021-12-29 17:04:49

by Luca Weiss

[permalink] [raw]
Subject: [PATCH 4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Configure WLED

WLED is used for controlling the display backlight on this phone, so
configure the node and enable it.

Signed-off-by: Luca Weiss <[email protected]>
---
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
index 8d6fd22873e0..678bf55c710e 100644
--- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -10,6 +10,7 @@
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include "sm7225.dtsi"
+#include "pm6150l.dtsi"
#include "pm6350.dtsi"

/ {
@@ -268,6 +269,14 @@ vreg_bob: bob {
};
};

+&pm6150l_wled {
+ status = "okay";
+
+ qcom,switching-freq = <800>;
+ qcom,current-limit-microamp = <20000>;
+ qcom,num-strings = <2>;
+};
+
&pm6350_gpios {
gpio_keys_pin: gpio-keys-pin {
pins = "gpio2";
--
2.34.1


2022-01-04 14:20:51

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH 2/4] backlight: qcom-wled: Add PM6150L compatible

On Wed, Dec 29, 2021 at 06:03:56PM +0100, Luca Weiss wrote:
> PM6150L contains WLED of version 5. Add support ofr it to the driver.
>
> Signed-off-by: Luca Weiss <[email protected]>

Reviewed-by: Daniel Thompson <[email protected]>


Daniel.

2022-01-10 19:44:29

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: backlight: qcom-wled: Add PM6150L compatible

On Wed, 29 Dec 2021 18:03:55 +0100, Luca Weiss wrote:
> Document the compatible for the wled block found in PM6150L.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 1 +
> 1 file changed, 1 insertion(+)
>

Acked-by: Rob Herring <[email protected]>

2022-02-02 23:12:22

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/4] Enable display backlight on Fairphone 4

On Wed, 29 Dec 2021 18:03:54 +0100, Luca Weiss wrote:
> Add and enable PM6150L wled which is used for controlling the display
> backlight on Fairphone 4.
>
> This series depends on the recent wled series by Marijn Suijten,
> currently applied in the for-backlight-next branch of
> kernel/git/lee/backlight.git (or linux-next).
>
> [...]

Applied, thanks!

[3/4] arm64: dts: qcom: pm6150l: Add wled node
commit: fe508ced49dd51a700c0f9ec7826d523cfe621b2
[4/4] arm64: dts: qcom: sm7225-fairphone-fp4: Configure WLED
commit: 7a52967d9050f3e430373bc51c56865b49a38573

Best regards,
--
Bjorn Andersson <[email protected]>

2022-02-08 22:22:07

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: backlight: qcom-wled: Add PM6150L compatible

On Wed, 29 Dec 2021, Luca Weiss wrote:

> Document the compatible for the wled block found in PM6150L.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Documentation/devicetree/bindings/leds/backlight/qcom-wled.yaml | 1 +
> 1 file changed, 1 insertion(+)

Applied, thanks.

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2022-02-09 06:49:14

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 2/4] backlight: qcom-wled: Add PM6150L compatible

On Wed, 29 Dec 2021, Luca Weiss wrote:

> PM6150L contains WLED of version 5. Add support ofr it to the driver.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> drivers/video/backlight/qcom-wled.c | 1 +
> 1 file changed, 1 insertion(+)

Applied, thanks.

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog