All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs
@ 2022-05-05  2:27 Bjorn Andersson
  2022-05-05  2:27 ` [PATCH 1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998 Bjorn Andersson
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Bjorn Andersson @ 2022-05-05  2:27 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

Now that the LPG binding is accepted, sprinkle some lpg definitions in various
PMIC files and define the LPG attached LEDs for RB3 and db820c.

Bjorn Andersson (4):
  arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998
  arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
  arm64: dts: qcom: pmi8994: Define MPP block
  arm64: dts: qcom: db820c: Add user LEDs

 arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 56 +++++++++++++++++++++
 arch/arm64/boot/dts/qcom/pm8916.dtsi        |  8 +++
 arch/arm64/boot/dts/qcom/pm8994.dtsi        | 10 ++++
 arch/arm64/boot/dts/qcom/pmi8994.dtsi       | 20 ++++++++
 arch/arm64/boot/dts/qcom/pmi8998.dtsi       | 11 +++-
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts  | 31 ++++++++++++
 6 files changed, 135 insertions(+), 1 deletion(-)

-- 
2.35.1


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

* [PATCH 1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998
  2022-05-05  2:27 [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Bjorn Andersson
@ 2022-05-05  2:27 ` Bjorn Andersson
  2022-07-01 18:46   ` Caleb Connolly
  2022-05-05  2:27 ` [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c Bjorn Andersson
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Bjorn Andersson @ 2022-05-05  2:27 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

Add PWM/LPG nodes to the PMICs currently supported by the binding.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/pm8916.dtsi  |  8 ++++++++
 arch/arm64/boot/dts/qcom/pm8994.dtsi  | 10 ++++++++++
 arch/arm64/boot/dts/qcom/pmi8994.dtsi | 10 ++++++++++
 arch/arm64/boot/dts/qcom/pmi8998.dtsi | 11 ++++++++++-
 4 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
index d58902432812..99bf8387bfb6 100644
--- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
@@ -125,6 +125,14 @@ pm8916_1: pmic@1 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pm8916_pwm: pwm {
+			compatible = "qcom,pm8916-pwm";
+
+			#pwm-cells = <2>;
+
+			status = "disabled";
+		};
+
 		pm8916_vib: vibrator@c000 {
 			compatible = "qcom,pm8916-vib";
 			reg = <0xc000>;
diff --git a/arch/arm64/boot/dts/qcom/pm8994.dtsi b/arch/arm64/boot/dts/qcom/pm8994.dtsi
index 5ab46117d737..ab342397fcd8 100644
--- a/arch/arm64/boot/dts/qcom/pm8994.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8994.dtsi
@@ -135,6 +135,16 @@ pmic@1 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pm8994_lpg: lpg {
+			compatible = "qcom,pm8994-lpg";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#pwm-cells = <2>;
+
+			status = "disabled";
+		};
+
 		pm8994_spmi_regulators: regulators {
 			compatible = "qcom,pm8994-regulators";
 		};
diff --git a/arch/arm64/boot/dts/qcom/pmi8994.dtsi b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
index 6e7c252568e6..b1b50c99ada2 100644
--- a/arch/arm64/boot/dts/qcom/pmi8994.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
@@ -27,6 +27,16 @@ pmic@3 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pmi8994_lpg: lpg {
+			compatible = "qcom,pmi8994-lpg";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#pwm-cells = <2>;
+
+			status = "disabled";
+		};
+
 		pmi8994_spmi_regulators: regulators {
 			compatible = "qcom,pmi8994-regulators";
 			#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
index 0fef5f113f05..7af106683f8d 100644
--- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
@@ -42,6 +42,16 @@ lab: lab {
 			};
 		};
 
+		pmi8998_lpg: lpg {
+			compatible = "qcom,pmi8998-lpg";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#pwm-cells = <2>;
+
+			status = "disabled";
+		};
+
 		pmi8998_wled: leds@d800 {
 			compatible = "qcom,pmi8998-wled";
 			reg = <0xd800 0xd900>;
@@ -52,6 +62,5 @@ pmi8998_wled: leds@d800 {
 
 			status = "disabled";
 		};
-
 	};
 };
-- 
2.35.1


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

* [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
  2022-05-05  2:27 [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Bjorn Andersson
  2022-05-05  2:27 ` [PATCH 1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998 Bjorn Andersson
@ 2022-05-05  2:27 ` Bjorn Andersson
  2022-05-30  7:06   ` Pavel Machek
  2022-07-01 18:49   ` Caleb Connolly
  2022-05-05  2:27 ` [PATCH 3/4] arm64: dts: qcom: pmi8994: Define MPP block Bjorn Andersson
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 13+ messages in thread
From: Bjorn Andersson @ 2022-05-05  2:27 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

The DB845c has 4 "user LEDs", the last one is already supported as it's
just wired to a gpio. Now that the LPG binding is in place we can wire
up the other 3 LEDs as well.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
index 194ebeb3259c..e4d3de0a1e6d 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include <dt-bindings/sound/qcom,q6afe.h>
@@ -606,6 +607,36 @@ resin {
 	};
 };
 
+&pmi8998_lpg {
+	status = "okay";
+
+	qcom,power-source = <1>;
+
+	led@3 {
+		reg = <3>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_HEARTBEAT;
+		function-enumerator = <3>;
+
+		linux,default-trigger = "heartbeat";
+		default-state = "on";
+	};
+
+	led@4 {
+		reg = <4>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <2>;
+	};
+
+	led@5 {
+		reg = <5>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_INDICATOR;
+		function-enumerator = <1>;
+	};
+};
+
 /* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
 &q6afedai {
 	qi2s@22 {
-- 
2.35.1


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

* [PATCH 3/4] arm64: dts: qcom: pmi8994: Define MPP block
  2022-05-05  2:27 [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Bjorn Andersson
  2022-05-05  2:27 ` [PATCH 1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998 Bjorn Andersson
  2022-05-05  2:27 ` [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c Bjorn Andersson
@ 2022-05-05  2:27 ` Bjorn Andersson
  2022-07-04 16:33   ` Dmitry Baryshkov
  2022-05-05  2:27 ` [PATCH 4/4] arm64: dts: qcom: db820c: Add user LEDs Bjorn Andersson
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Bjorn Andersson @ 2022-05-05  2:27 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

The pmi8994 has 4 multi-purpose-pins, add these to the definition.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/pmi8994.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmi8994.dtsi b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
index b1b50c99ada2..0dfdd42f6f55 100644
--- a/arch/arm64/boot/dts/qcom/pmi8994.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
@@ -19,6 +19,16 @@ pmi8994_gpios: gpios@c000 {
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
+
+		pmi8994_mpps: mpps@a000 {
+			compatible = "qcom,pmi8994-mpp";
+			reg = <0xa000>;
+			gpio-controller;
+			gpio-ranges = <&pmi8994_mpps 0 0 4>;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+		};
 	};
 
 	pmic@3 {
-- 
2.35.1


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

* [PATCH 4/4] arm64: dts: qcom: db820c: Add user LEDs
  2022-05-05  2:27 [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Bjorn Andersson
                   ` (2 preceding siblings ...)
  2022-05-05  2:27 ` [PATCH 3/4] arm64: dts: qcom: pmi8994: Define MPP block Bjorn Andersson
@ 2022-05-05  2:27 ` Bjorn Andersson
  2022-07-04 16:33   ` Dmitry Baryshkov
  2022-07-01  6:08 ` [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Dylan Van Assche
  2022-07-07  2:31 ` Bjorn Andersson
  5 siblings, 1 reply; 13+ messages in thread
From: Bjorn Andersson @ 2022-05-05  2:27 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

The db820c has 4 "user LEDs", all connected to the PMI8994. The first
three are connected to the three current sinks provided by the TRILED
and the fourth is connected to MPP2.

By utilizing the DTEST bus the MPP is fed the control signal from the
fourth LPG block, providing a consistent interface to the user.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 56 +++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
index 56e54ce4d10e..e9039e68a095 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
@@ -10,6 +10,7 @@
 #include "pmi8994.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/sound/qcom,q6afe.h>
 #include <dt-bindings/sound/qcom,q6asm.h>
@@ -683,6 +684,61 @@ pinconf {
 	};
 };
 
+&pmi8994_lpg {
+	qcom,power-source = <1>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pmi8994_mpp2_userled4>;
+
+	qcom,dtest = <0 0>,
+		     <0 0>,
+		     <0 0>,
+		     <4 1>;
+
+	status = "okay";
+
+	led@1 {
+		reg = <1>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_HEARTBEAT;
+		function-enumerator = <1>;
+
+		linux,default-trigger = "heartbeat";
+		default-state = "on";
+	};
+
+	led@2 {
+		reg = <2>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_HEARTBEAT;
+		function-enumerator = <0>;
+	};
+
+	led@3 {
+		reg = <3>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_HEARTBEAT;
+		function-enumerator = <2>;
+	};
+
+	led@4 {
+		reg = <4>;
+		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_HEARTBEAT;
+		function-enumerator = <3>;
+	};
+};
+
+&pmi8994_mpps {
+	pmi8994_mpp2_userled4: mpp2-userled4-state {
+		pins = "mpp2";
+		function = "sink";
+
+		output-low;
+		qcom,dtest = <4>;
+	};
+};
+
 &pmi8994_spmi_regulators {
 	vdd_s2-supply = <&vph_pwr>;
 
-- 
2.35.1


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

* Re: [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
  2022-05-05  2:27 ` [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c Bjorn Andersson
@ 2022-05-30  7:06   ` Pavel Machek
  2022-06-30  3:54     ` Bjorn Andersson
  2022-07-01 18:49   ` Caleb Connolly
  1 sibling, 1 reply; 13+ messages in thread
From: Pavel Machek @ 2022-05-30  7:06 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

Hi!

> The DB845c has 4 "user LEDs", the last one is already supported as it's
> just wired to a gpio. Now that the LPG binding is in place we can wire
> up the other 3 LEDs as well.


> +&pmi8998_lpg {
> +	status = "okay";
> +
> +	qcom,power-source = <1>;
> +
> +	led@3 {
> +		reg = <3>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <3>;
> +
> +		linux,default-trigger = "heartbeat";
> +		default-state = "on";
> +	};
> +
> +	led@4 {
> +		reg = <4>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <2>;
> +	};
> +
> +	led@5 {
> +		reg = <5>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <1>;
> +	};

Do the LEDs have some kind of markings? Marking them as "indicator" is not too useful.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
  2022-05-30  7:06   ` Pavel Machek
@ 2022-06-30  3:54     ` Bjorn Andersson
  0 siblings, 0 replies; 13+ messages in thread
From: Bjorn Andersson @ 2022-06-30  3:54 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-arm-msm, devicetree, linux-kernel

On Mon 30 May 02:06 CDT 2022, Pavel Machek wrote:

> Hi!
> 
> > The DB845c has 4 "user LEDs", the last one is already supported as it's
> > just wired to a gpio. Now that the LPG binding is in place we can wire
> > up the other 3 LEDs as well.
> 
> 
> > +&pmi8998_lpg {
> > +	status = "okay";
> > +
> > +	qcom,power-source = <1>;
> > +
> > +	led@3 {
> > +		reg = <3>;
> > +		color = <LED_COLOR_ID_GREEN>;
> > +		function = LED_FUNCTION_HEARTBEAT;
> > +		function-enumerator = <3>;
> > +
> > +		linux,default-trigger = "heartbeat";
> > +		default-state = "on";
> > +	};
> > +
> > +	led@4 {
> > +		reg = <4>;
> > +		color = <LED_COLOR_ID_GREEN>;
> > +		function = LED_FUNCTION_INDICATOR;
> > +		function-enumerator = <2>;
> > +	};
> > +
> > +	led@5 {
> > +		reg = <5>;
> > +		color = <LED_COLOR_ID_GREEN>;
> > +		function = LED_FUNCTION_INDICATOR;
> > +		function-enumerator = <1>;
> > +	};
> 
> Do the LEDs have some kind of markings? Marking them as "indicator" is not too useful.
> 

Unfortunately no, there is just 4 green LEDs tightly packed together (3
driven by the lpg, 1 by a gpio), with no indications of which is which.

Regards,
Bjorn

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

* Re: [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs
  2022-05-05  2:27 [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Bjorn Andersson
                   ` (3 preceding siblings ...)
  2022-05-05  2:27 ` [PATCH 4/4] arm64: dts: qcom: db820c: Add user LEDs Bjorn Andersson
@ 2022-07-01  6:08 ` Dylan Van Assche
  2022-07-07  2:31 ` Bjorn Andersson
  5 siblings, 0 replies; 13+ messages in thread
From: Dylan Van Assche @ 2022-07-01  6:08 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

On Wed, 2022-05-04 at 19:27 -0700, Bjorn Andersson wrote:
> Now that the LPG binding is accepted, sprinkle some lpg definitions
> in various
> PMIC files and define the LPG attached LEDs for RB3 and db820c.
> 
> Bjorn Andersson (4):
>   arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998
>   arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
>   arm64: dts: qcom: pmi8994: Define MPP block
>   arm64: dts: qcom: db820c: Add user LEDs
> 
>  arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 56
> +++++++++++++++++++++
>  arch/arm64/boot/dts/qcom/pm8916.dtsi        |  8 +++
>  arch/arm64/boot/dts/qcom/pm8994.dtsi        | 10 ++++
>  arch/arm64/boot/dts/qcom/pmi8994.dtsi       | 20 ++++++++
>  arch/arm64/boot/dts/qcom/pmi8998.dtsi       | 11 +++-
>  arch/arm64/boot/dts/qcom/sdm845-db845c.dts  | 31 ++++++++++++
>  6 files changed, 135 insertions(+), 1 deletion(-)
> 

Changes look good to me, I applied similar changes here:
https://patchwork.kernel.org/project/linux-arm-msm/patch/20220512054439.13971-1-me@dylanvanassche.be/

Reviewed-by: Dylan Van Assche <me@dylanvanassche.be>

Thanks!
Dylan

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

* Re: [PATCH 1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998
  2022-05-05  2:27 ` [PATCH 1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998 Bjorn Andersson
@ 2022-07-01 18:46   ` Caleb Connolly
  0 siblings, 0 replies; 13+ messages in thread
From: Caleb Connolly @ 2022-07-01 18:46 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel



On 05/05/2022 03:27, Bjorn Andersson wrote:
> Add PWM/LPG nodes to the PMICs currently supported by the binding.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
fwiw:
Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> ---
>   arch/arm64/boot/dts/qcom/pm8916.dtsi  |  8 ++++++++
>   arch/arm64/boot/dts/qcom/pm8994.dtsi  | 10 ++++++++++
>   arch/arm64/boot/dts/qcom/pmi8994.dtsi | 10 ++++++++++
>   arch/arm64/boot/dts/qcom/pmi8998.dtsi | 11 ++++++++++-
>   4 files changed, 38 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8916.dtsi b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> index d58902432812..99bf8387bfb6 100644
> --- a/arch/arm64/boot/dts/qcom/pm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8916.dtsi
> @@ -125,6 +125,14 @@ pm8916_1: pmic@1 {
>   		#address-cells = <1>;
>   		#size-cells = <0>;
>
> +		pm8916_pwm: pwm {
> +			compatible = "qcom,pm8916-pwm";
> +
> +			#pwm-cells = <2>;
> +
> +			status = "disabled";
> +		};
> +
>   		pm8916_vib: vibrator@c000 {
>   			compatible = "qcom,pm8916-vib";
>   			reg = <0xc000>;
> diff --git a/arch/arm64/boot/dts/qcom/pm8994.dtsi b/arch/arm64/boot/dts/qcom/pm8994.dtsi
> index 5ab46117d737..ab342397fcd8 100644
> --- a/arch/arm64/boot/dts/qcom/pm8994.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8994.dtsi
> @@ -135,6 +135,16 @@ pmic@1 {
>   		#address-cells = <1>;
>   		#size-cells = <0>;
>
> +		pm8994_lpg: lpg {
> +			compatible = "qcom,pm8994-lpg";
> +
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			#pwm-cells = <2>;
> +
> +			status = "disabled";
> +		};
> +
>   		pm8994_spmi_regulators: regulators {
>   			compatible = "qcom,pm8994-regulators";
>   		};
> diff --git a/arch/arm64/boot/dts/qcom/pmi8994.dtsi b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> index 6e7c252568e6..b1b50c99ada2 100644
> --- a/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> @@ -27,6 +27,16 @@ pmic@3 {
>   		#address-cells = <1>;
>   		#size-cells = <0>;
>
> +		pmi8994_lpg: lpg {
> +			compatible = "qcom,pmi8994-lpg";
> +
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			#pwm-cells = <2>;
> +
> +			status = "disabled";
> +		};
> +
>   		pmi8994_spmi_regulators: regulators {
>   			compatible = "qcom,pmi8994-regulators";
>   			#address-cells = <1>;
> diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> index 0fef5f113f05..7af106683f8d 100644
> --- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> @@ -42,6 +42,16 @@ lab: lab {
>   			};
>   		};
>
> +		pmi8998_lpg: lpg {
> +			compatible = "qcom,pmi8998-lpg";
> +
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			#pwm-cells = <2>;
> +
> +			status = "disabled";
> +		};
> +
>   		pmi8998_wled: leds@d800 {
>   			compatible = "qcom,pmi8998-wled";
>   			reg = <0xd800 0xd900>;
> @@ -52,6 +62,5 @@ pmi8998_wled: leds@d800 {
>
>   			status = "disabled";
>   		};
> -
>   	};
>   };
> --
> 2.35.1
>

--
Kind Regards,
Caleb


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

* Re: [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
  2022-05-05  2:27 ` [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c Bjorn Andersson
  2022-05-30  7:06   ` Pavel Machek
@ 2022-07-01 18:49   ` Caleb Connolly
  1 sibling, 0 replies; 13+ messages in thread
From: Caleb Connolly @ 2022-07-01 18:49 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel



On 05/05/2022 03:27, Bjorn Andersson wrote:
> The DB845c has 4 "user LEDs", the last one is already supported as it's
> just wired to a gpio. Now that the LPG binding is in place we can wire
> up the other 3 LEDs as well.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> ---
>   arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 31 ++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> index 194ebeb3259c..e4d3de0a1e6d 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts
> @@ -5,6 +5,7 @@
>
>   /dts-v1/;
>
> +#include <dt-bindings/leds/common.h>
>   #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>   #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
>   #include <dt-bindings/sound/qcom,q6afe.h>
> @@ -606,6 +607,36 @@ resin {
>   	};
>   };
>
> +&pmi8998_lpg {
> +	status = "okay";
> +
> +	qcom,power-source = <1>;
> +
> +	led@3 {
> +		reg = <3>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <3>;
> +
> +		linux,default-trigger = "heartbeat";
> +		default-state = "on";
> +	};
> +
> +	led@4 {
> +		reg = <4>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <2>;
> +	};
> +
> +	led@5 {
> +		reg = <5>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_INDICATOR;
> +		function-enumerator = <1>;
> +	};
> +};
> +
>   /* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */
>   &q6afedai {
>   	qi2s@22 {
> --
> 2.35.1
>

--
Kind Regards,
Caleb


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

* Re: [PATCH 4/4] arm64: dts: qcom: db820c: Add user LEDs
  2022-05-05  2:27 ` [PATCH 4/4] arm64: dts: qcom: db820c: Add user LEDs Bjorn Andersson
@ 2022-07-04 16:33   ` Dmitry Baryshkov
  0 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2022-07-04 16:33 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

On 05/05/2022 05:27, Bjorn Andersson wrote:
> The db820c has 4 "user LEDs", all connected to the PMI8994. The first
> three are connected to the three current sinks provided by the TRILED
> and the fourth is connected to MPP2.
> 
> By utilizing the DTEST bus the MPP is fed the control signal from the
> fourth LPG block, providing a consistent interface to the user.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>   arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 56 +++++++++++++++++++++
>   1 file changed, 56 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> index 56e54ce4d10e..e9039e68a095 100644
> --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts
> @@ -10,6 +10,7 @@
>   #include "pmi8994.dtsi"
>   #include <dt-bindings/input/input.h>
>   #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
>   #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
>   #include <dt-bindings/sound/qcom,q6afe.h>
>   #include <dt-bindings/sound/qcom,q6asm.h>
> @@ -683,6 +684,61 @@ pinconf {
>   	};
>   };
>   
> +&pmi8994_lpg {
> +	qcom,power-source = <1>;
> +
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pmi8994_mpp2_userled4>;
> +
> +	qcom,dtest = <0 0>,
> +		     <0 0>,
> +		     <0 0>,
> +		     <4 1>;
> +
> +	status = "okay";
> +
> +	led@1 {
> +		reg = <1>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <1>;
> +
> +		linux,default-trigger = "heartbeat";
> +		default-state = "on";
> +	};
> +
> +	led@2 {
> +		reg = <2>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <0>;
> +	};
> +
> +	led@3 {
> +		reg = <3>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <2>;
> +	};
> +
> +	led@4 {
> +		reg = <4>;
> +		color = <LED_COLOR_ID_GREEN>;
> +		function = LED_FUNCTION_HEARTBEAT;
> +		function-enumerator = <3>;
> +	};
> +};
> +
> +&pmi8994_mpps {
> +	pmi8994_mpp2_userled4: mpp2-userled4-state {
> +		pins = "mpp2";
> +		function = "sink";
> +
> +		output-low;
> +		qcom,dtest = <4>;
> +	};
> +};
> +
>   &pmi8994_spmi_regulators {
>   	vdd_s2-supply = <&vph_pwr>;
>   


-- 
With best wishes
Dmitry

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

* Re: [PATCH 3/4] arm64: dts: qcom: pmi8994: Define MPP block
  2022-05-05  2:27 ` [PATCH 3/4] arm64: dts: qcom: pmi8994: Define MPP block Bjorn Andersson
@ 2022-07-04 16:33   ` Dmitry Baryshkov
  0 siblings, 0 replies; 13+ messages in thread
From: Dmitry Baryshkov @ 2022-07-04 16:33 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

On 05/05/2022 05:27, Bjorn Andersson wrote:
> The pmi8994 has 4 multi-purpose-pins, add these to the definition.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>   arch/arm64/boot/dts/qcom/pmi8994.dtsi | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pmi8994.dtsi b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> index b1b50c99ada2..0dfdd42f6f55 100644
> --- a/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> @@ -19,6 +19,16 @@ pmi8994_gpios: gpios@c000 {
>   			interrupt-controller;
>   			#interrupt-cells = <2>;
>   		};
> +
> +		pmi8994_mpps: mpps@a000 {
> +			compatible = "qcom,pmi8994-mpp";
> +			reg = <0xa000>;
> +			gpio-controller;
> +			gpio-ranges = <&pmi8994_mpps 0 0 4>;
> +			#gpio-cells = <2>;
> +			interrupt-controller;
> +			#interrupt-cells = <2>;
> +		};
>   	};
>   
>   	pmic@3 {


-- 
With best wishes
Dmitry

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

* Re: [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs
  2022-05-05  2:27 [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Bjorn Andersson
                   ` (4 preceding siblings ...)
  2022-07-01  6:08 ` [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Dylan Van Assche
@ 2022-07-07  2:31 ` Bjorn Andersson
  5 siblings, 0 replies; 13+ messages in thread
From: Bjorn Andersson @ 2022-07-07  2:31 UTC (permalink / raw)
  To: Bjorn Andersson; +Cc: linux-arm-msm, devicetree, linux-kernel

On Wed, 4 May 2022 19:27:02 -0700, Bjorn Andersson wrote:
> Now that the LPG binding is accepted, sprinkle some lpg definitions in various
> PMIC files and define the LPG attached LEDs for RB3 and db820c.
> 
> Bjorn Andersson (4):
>   arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998
>   arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
>   arm64: dts: qcom: pmi8994: Define MPP block
>   arm64: dts: qcom: db820c: Add user LEDs
> 
> [...]

Applied, thanks!

[1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998
      commit: e79a1385ab74451e2e61efd5e59de3c1d3b4cd05
[2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c
      commit: f23f1fa880bfbf47404aef9aaaff1dc7804d4df7
[3/4] arm64: dts: qcom: pmi8994: Define MPP block
      commit: f041bb3cd77fb68b59cbec8031bfe65eeff15823
[4/4] arm64: dts: qcom: db820c: Add user LEDs
      commit: d1a405d2228f686a3fecf0f0374b61ae81d441aa

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

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

end of thread, other threads:[~2022-07-07  2:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05  2:27 [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Bjorn Andersson
2022-05-05  2:27 ` [PATCH 1/4] arm64: dts: qcom: Add LPG to pm8916, pm8994, pmi8994 and pmi8998 Bjorn Andersson
2022-07-01 18:46   ` Caleb Connolly
2022-05-05  2:27 ` [PATCH 2/4] arm64: dts: qcom: sdm845: Enable user LEDs on DB845c Bjorn Andersson
2022-05-30  7:06   ` Pavel Machek
2022-06-30  3:54     ` Bjorn Andersson
2022-07-01 18:49   ` Caleb Connolly
2022-05-05  2:27 ` [PATCH 3/4] arm64: dts: qcom: pmi8994: Define MPP block Bjorn Andersson
2022-07-04 16:33   ` Dmitry Baryshkov
2022-05-05  2:27 ` [PATCH 4/4] arm64: dts: qcom: db820c: Add user LEDs Bjorn Andersson
2022-07-04 16:33   ` Dmitry Baryshkov
2022-07-01  6:08 ` [PATCH 0/4] arm64: dts: qcom: Add a few LPG LEDs Dylan Van Assche
2022-07-07  2:31 ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.