2022-07-13 21:39:19

by Bjorn Andersson

[permalink] [raw]
Subject: [PATCH v2 0/2] ARM: dts: qcom: msm8974-sony: Enable RGB LED

Introduce the Light Pulse Generator block in the pm8941 and use this to
describe the RGB LED driven by the triled in this block.

Bjorn Andersson (2):
ARM: dts: qcom: Add LPG node to pm8941
ARM: dts: qcom: msm8974-sony: Enable LPG

.../dts/qcom-msm8974-sony-xperia-rhine.dtsi | 30 +++++++++++++++++++
...-msm8974pro-sony-xperia-shinano-castor.dts | 30 +++++++++++++++++++
arch/arm/boot/dts/qcom-pm8941.dtsi | 10 +++++++
3 files changed, 70 insertions(+)

--
2.35.1


2022-07-13 21:44:10

by Bjorn Andersson

[permalink] [raw]
Subject: [PATCH v2 2/2] ARM: dts: qcom: msm8974-sony: Enable LPG

Both Castor and Honami has RGB LEDs driven by the PM8941 LPG, define
these.

Signed-off-by: Bjorn Andersson <[email protected]>
---

Changes since v1:
- Corrected unit addresses and sort order of channels

.../dts/qcom-msm8974-sony-xperia-rhine.dtsi | 30 +++++++++++++++++++
...-msm8974pro-sony-xperia-shinano-castor.dts | 30 +++++++++++++++++++
2 files changed, 60 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi
index d42b85bda33a..5a70683d9103 100644
--- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi
@@ -3,6 +3,7 @@
#include "qcom-pm8841.dtsi"
#include "qcom-pm8941.dtsi"
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>

/ {
@@ -172,6 +173,35 @@ gpio_keys_pin_a: gpio-keys-active-state {
};
};

+&pm8941_lpg {
+ status = "okay";
+
+ qcom,power-source = <1>;
+
+ rgb-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@5 {
+ reg = <5>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+
+ led@6 {
+ reg = <6>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@7 {
+ reg = <7>;
+ color = <LED_COLOR_ID_RED>;
+ };
+ };
+};
+
&pm8941_wled {
status = "okay";

diff --git a/arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts b/arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts
index 9fc696a7399a..3f45f5c5d37b 100644
--- a/arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts
+++ b/arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts
@@ -3,6 +3,7 @@
#include "qcom-pm8841.dtsi"
#include "qcom-pm8941.dtsi"
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>

/ {
@@ -288,6 +289,35 @@ lcd_dcdc_en_pin_a: lcd-dcdc-en-active-state {

};

+&pm8941_lpg {
+ status = "okay";
+
+ qcom,power-source = <1>;
+
+ rgb-led {
+ color = <LED_COLOR_ID_RGB>;
+ function = LED_FUNCTION_STATUS;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@5 {
+ reg = <5>;
+ color = <LED_COLOR_ID_BLUE>;
+ };
+
+ led@6 {
+ reg = <6>;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+
+ led@7 {
+ reg = <7>;
+ color = <LED_COLOR_ID_RED>;
+ };
+ };
+};
+
&rpm_requests {
pm8941-regulators {
compatible = "qcom,rpm-pm8941-regulators";
--
2.35.1

2022-07-13 22:05:33

by Bjorn Andersson

[permalink] [raw]
Subject: [PATCH v2 1/2] ARM: dts: qcom: Add LPG node to pm8941

The PM8941 contains 8 LPG channels, as well as TRILED and LUT blocks.
Add a node for these.

Signed-off-by: Bjorn Andersson <[email protected]>
---

Changes since v1:
- Added #pwm-cells

arch/arm/boot/dts/qcom-pm8941.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index a68634397938..59d0cde63251 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -144,6 +144,16 @@ pm8941_1: pm8941@1 {
#address-cells = <1>;
#size-cells = <0>;

+ pm8941_lpg: lpg {
+ compatible = "qcom,pm8941-lpg";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #pwm-cells = <2>;
+
+ status = "disabled";
+ };
+
pm8941_wled: wled@d800 {
compatible = "qcom,pm8941-wled";
reg = <0xd800>;
--
2.35.1

2022-07-17 03:22:44

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] ARM: dts: qcom: msm8974-sony: Enable RGB LED

On Wed, 13 Jul 2022 14:23:07 -0700, Bjorn Andersson wrote:
> Introduce the Light Pulse Generator block in the pm8941 and use this to
> describe the RGB LED driven by the triled in this block.
>
> Bjorn Andersson (2):
> ARM: dts: qcom: Add LPG node to pm8941
> ARM: dts: qcom: msm8974-sony: Enable LPG
>
> [...]

Applied, thanks!

[1/2] ARM: dts: qcom: Add LPG node to pm8941
commit: 5edd7d3e15a46c8549440a0b596c69be7e2c49fc
[2/2] ARM: dts: qcom: msm8974-sony: Enable LPG
commit: 27f5947894c596fcfd6da20c061c582e7191e9e1

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