2024-04-02 12:36:16

by Gianluca Boiano

[permalink] [raw]
Subject: [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg.

The first patch updates the device tree bindings for leds-qcom-lpg to
include support for PMI8950 PWM.

The second patch adds a pwm node to the device tree for the PMI8950. This
node is found on some msm8953 devices, such as the Xiaomi Mido, and its
inclusion in the device tree will enable infrared LED functionality on
these devices.

The final patch adds support for the PMI8950 PWM to the leds-qcom-lpg
driver.

The PMI8950 PMIC contains one PWM channel.

Signed-off-by: Gianluca Boiano <[email protected]>
---
Gianluca Boiano (3):
leds: qcom-lpg: Add support for PMI8950 PWM
arm64: dts: qcom: pmi8950: add pwm node
dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM

Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 4 ++--
arch/arm64/boot/dts/qcom/pmi8950.dtsi | 8 ++++++++
drivers/leds/rgb/leds-qcom-lpg.c | 8 ++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
---
base-commit: c0b832517f627ead3388c6f0c74e8ac10ad5774b
change-id: 20240402-pmi8950-pwm-support-f591864b1e28

Best regards,
--
Gianluca Boiano <[email protected]>



2024-04-02 12:36:25

by Gianluca Boiano

[permalink] [raw]
Subject: [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM

The PMI8950 PMIC contains 1 PWM channel

Signed-off-by: Gianluca Boiano <[email protected]>
---
drivers/leds/rgb/leds-qcom-lpg.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 6bdc5b923f98..9467c796bd04 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1693,6 +1693,13 @@ static const struct lpg_data pm8941_lpg_data = {
},
};

+static const struct lpg_data pmi8950_pwm_data = {
+ .num_channels = 1,
+ .channels = (const struct lpg_channel_data[]) {
+ { .base = 0xb000 },
+ },
+};
+
static const struct lpg_data pm8994_lpg_data = {
.lut_base = 0xb000,
.lut_size = 64,
@@ -1819,6 +1826,7 @@ static const struct of_device_id lpg_of_table[] = {
{ .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data },
{ .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data },
{ .compatible = "qcom,pmi632-lpg", .data = &pmi632_lpg_data },
+ { .compatible = "qcom,pmi8950-pwm", .data = &pmi8950_pwm_data },
{ .compatible = "qcom,pmi8994-lpg", .data = &pmi8994_lpg_data },
{ .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data },
{ .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data },

--
2.44.0


2024-04-02 12:36:45

by Gianluca Boiano

[permalink] [raw]
Subject: [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node

This node is actually found on some msm8953 devices (xiaomi-mido) and
allows irled enablement

Signed-off-by: Gianluca Boiano <[email protected]>
---
arch/arm64/boot/dts/qcom/pmi8950.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmi8950.dtsi b/arch/arm64/boot/dts/qcom/pmi8950.dtsi
index 1029f3b1bb9a..b4822cb17a37 100644
--- a/arch/arm64/boot/dts/qcom/pmi8950.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8950.dtsi
@@ -84,6 +84,14 @@ pmic@3 {
#address-cells = <1>;
#size-cells = <0>;

+ pmi8950_pwm: pwm@b000 {
+ compatible = "qcom,pmi8950-pwm";
+ reg = <0xb000 0x100>;
+ #pwm-cells = <2>;
+
+ status = "disabled";
+ };
+
pmi8950_wled: leds@d800 {
compatible = "qcom,pmi8950-wled";
reg = <0xd800>, <0xd900>;

--
2.44.0


2024-04-02 12:48:14

by Gianluca Boiano

[permalink] [raw]
Subject: [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM

Update leds-qcom-lpg binding to support PMI8950 PWM.

Signed-off-by: Gianluca Boiano <[email protected]>
---
Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
index 7b9e0ad1ecaa..8b82c45d1a48 100644
--- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
@@ -27,6 +27,7 @@ properties:
- qcom,pm8994-lpg
- qcom,pmc8180c-lpg
- qcom,pmi632-lpg
+ - qcom,pmi8950-pwm
- qcom,pmi8994-lpg
- qcom,pmi8998-lpg
- qcom,pmk8550-pwm
@@ -146,6 +147,7 @@ allOf:
- qcom,pm8941-lpg
- qcom,pm8994-lpg
- qcom,pmc8180c-lpg
+ - qcom,pmi8950-pwm
- qcom,pmi8994-lpg
- qcom,pmi8998-lpg
- qcom,pmk8550-pwm
@@ -294,5 +296,3 @@ examples:
label = "blue";
};
};
-
-...

--
2.44.0


2024-04-02 17:55:11

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM

On Tue, Apr 02, 2024 at 02:35:44PM +0200, Gianluca Boiano wrote:
> Update leds-qcom-lpg binding to support PMI8950 PWM.
>
> Signed-off-by: Gianluca Boiano <[email protected]>

Acked-by: Conor Dooley <[email protected]>


Attachments:
(No filename) (236.00 B)
signature.asc (235.00 B)
Download all attachments

2024-04-10 18:14:30

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM



On 4/2/24 14:35, Gianluca Boiano wrote:
> The PMI8950 PMIC contains 1 PWM channel
>
> Signed-off-by: Gianluca Boiano <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Oddly enough, there's also 1 LPG channel on the PM(not I)8950 @ 0xbc00

Konrad

2024-04-10 18:15:31

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node



On 4/2/24 14:35, Gianluca Boiano wrote:
> This node is actually found on some msm8953 devices (xiaomi-mido) and
> allows irled enablement
>
> Signed-off-by: Gianluca Boiano <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad

2024-04-11 18:58:56

by Lee Jones

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg.

On Tue, 02 Apr 2024 14:35:41 +0200, Gianluca Boiano wrote:
> The first patch updates the device tree bindings for leds-qcom-lpg to
> include support for PMI8950 PWM.
>
> The second patch adds a pwm node to the device tree for the PMI8950. This
> node is found on some msm8953 devices, such as the Xiaomi Mido, and its
> inclusion in the device tree will enable infrared LED functionality on
> these devices.
>
> [...]

Applied, thanks!

[1/3] leds: qcom-lpg: Add support for PMI8950 PWM
commit: 945d4f9fc2123ce2ca4f72fd83b61842bc0191fe
[3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
commit: 4bac069633d433a8626b0c80a3f191800086e77f

--
Lee Jones [李琼斯]


2024-05-29 02:06:03

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg.


On Tue, 02 Apr 2024 14:35:41 +0200, Gianluca Boiano wrote:
> The first patch updates the device tree bindings for leds-qcom-lpg to
> include support for PMI8950 PWM.
>
> The second patch adds a pwm node to the device tree for the PMI8950. This
> node is found on some msm8953 devices, such as the Xiaomi Mido, and its
> inclusion in the device tree will enable infrared LED functionality on
> these devices.
>
> [...]

Applied, thanks!

[2/3] arm64: dts: qcom: pmi8950: add pwm node
commit: 62aad66b57466287925d17e7ed0f6f14fd6c5459

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