devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED
@ 2023-10-13 20:51 André Apitzsch
  2023-10-13 20:51 ` [PATCH 1/2] arm64: dts: qcom: msm8916-longcheer-l8910: " André Apitzsch
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: André Apitzsch @ 2023-10-13 20:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming, André Apitzsch, Stephan Gerhold

With the driver for ktd2026 recently applied to linux-leds[1], the LED
can be enabled on longcheer l8910 and l9100.

[1] https://lore.kernel.org/all/20231002-ktd202x-v6-0-26be8eefeb88@apitzsch.eu/

Signed-off-by: André Apitzsch <git@apitzsch.eu>
---
André Apitzsch (2):
      arm64: dts: qcom: msm8916-longcheer-l8910: Enable RGB LED
      arm64: dts: qcom: msm8939-longcheer-l9100: Enable RGB LED

 .../boot/dts/qcom/msm8916-longcheer-l8910.dts      | 51 ++++++++++++++++++++++
 .../boot/dts/qcom/msm8939-longcheer-l9100.dts      | 51 ++++++++++++++++++++++
 2 files changed, 102 insertions(+)
---
base-commit: beb63bee4857fd3661305eec8888d025a7c26c56
change-id: 20231013-bq_leds-0d8a9b15ec6a

Best regards,
-- 
André Apitzsch <git@apitzsch.eu>


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

* [PATCH 1/2] arm64: dts: qcom: msm8916-longcheer-l8910: Enable RGB LED
  2023-10-13 20:51 [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED André Apitzsch
@ 2023-10-13 20:51 ` André Apitzsch
  2023-10-18  8:50   ` Konrad Dybcio
  2023-10-13 20:51 ` [PATCH 2/2] arm64: dts: qcom: msm8939-longcheer-l9100: " André Apitzsch
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: André Apitzsch @ 2023-10-13 20:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming, André Apitzsch, Stephan Gerhold

l8910 uses KTD2026 LED driver. Add it to the device tree.

Tested-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: André Apitzsch <git@apitzsch.eu>
---
 .../boot/dts/qcom/msm8916-longcheer-l8910.dts      | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
index 41cadb906b98..68258cf4205f 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
+++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts
@@ -6,6 +6,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
 	model = "BQ Aquaris X5 (Longcheer L8910)";
@@ -74,6 +75,46 @@ usb_id: usb-id {
 	};
 };
 
+&blsp_i2c2 {
+	status = "okay";
+
+	led-controller@30 {
+		compatible = "kinetic,ktd2026";
+		reg = <0x30>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vin-supply = <&pm8916_l17>;
+		vio-supply = <&pm8916_l6>;
+
+		pinctrl-0 = <&status_led_default>;
+		pinctrl-names = "default";
+
+		multi-led {
+			color = <LED_COLOR_ID_RGB>;
+			function = LED_FUNCTION_STATUS;
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led@0 {
+				reg = <0>;
+				color = <LED_COLOR_ID_RED>;
+			};
+
+			led@1 {
+				reg = <1>;
+				color = <LED_COLOR_ID_GREEN>;
+			};
+
+			led@2 {
+				reg = <2>;
+				color = <LED_COLOR_ID_BLUE>;
+			};
+		};
+	};
+};
+
 &blsp_i2c3 {
 	status = "okay";
 
@@ -107,6 +148,16 @@ &blsp_uart2 {
 	status = "okay";
 };
 
+&pm8916_gpios {
+	status_led_default: status-led-default-state {
+		pins = "gpio3";
+		function = PMIC_GPIO_FUNC_NORMAL;
+		power-source = <PM8916_GPIO_VPH>;
+		bias-disable;
+		output-high;
+	};
+};
+
 &pm8916_resin {
 	status = "okay";
 	linux,code = <KEY_VOLUMEDOWN>;

-- 
2.42.0


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

* [PATCH 2/2] arm64: dts: qcom: msm8939-longcheer-l9100: Enable RGB LED
  2023-10-13 20:51 [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED André Apitzsch
  2023-10-13 20:51 ` [PATCH 1/2] arm64: dts: qcom: msm8916-longcheer-l8910: " André Apitzsch
@ 2023-10-13 20:51 ` André Apitzsch
  2023-10-18  8:50   ` Konrad Dybcio
  2023-10-22 15:50 ` [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: " Bjorn Andersson
  2023-10-28 10:39 ` Pavel Machek
  3 siblings, 1 reply; 7+ messages in thread
From: André Apitzsch @ 2023-10-13 20:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming, André Apitzsch

l9100 uses KTD2026 LED driver. Add it to the device tree.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
---
 .../boot/dts/qcom/msm8939-longcheer-l9100.dts      | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts b/arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts
index 6802714fda3f..4eb33e36a8eb 100644
--- a/arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts
+++ b/arch/arm64/boot/dts/qcom/msm8939-longcheer-l9100.dts
@@ -8,6 +8,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
 
 / {
@@ -120,6 +121,46 @@ usb_id: usb-id {
 
 };
 
+&blsp_i2c2 {
+	status = "okay";
+
+	led-controller@30 {
+		compatible = "kinetic,ktd2026";
+		reg = <0x30>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vin-supply = <&pm8916_l17>;
+		vio-supply = <&pm8916_l6>;
+
+		pinctrl-0 = <&status_led_default>;
+		pinctrl-names = "default";
+
+		multi-led {
+			color = <LED_COLOR_ID_RGB>;
+			function = LED_FUNCTION_STATUS;
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led@0 {
+				reg = <0>;
+				color = <LED_COLOR_ID_RED>;
+			};
+
+			led@1 {
+				reg = <1>;
+				color = <LED_COLOR_ID_GREEN>;
+			};
+
+			led@2 {
+				reg = <2>;
+				color = <LED_COLOR_ID_BLUE>;
+			};
+		};
+	};
+};
+
 &blsp_i2c3 {
 	status = "okay";
 
@@ -184,6 +225,16 @@ &blsp_uart2 {
 	status = "okay";
 };
 
+&pm8916_gpios {
+	status_led_default: status-led-default-state {
+		pins = "gpio3";
+		function = PMIC_GPIO_FUNC_NORMAL;
+		power-source = <PM8916_GPIO_VPH>;
+		bias-disable;
+		output-high;
+	};
+};
+
 &pm8916_mpps {
 	pwm_out: mpp4-state {
 		pins = "mpp4";

-- 
2.42.0


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

* Re: [PATCH 1/2] arm64: dts: qcom: msm8916-longcheer-l8910: Enable RGB LED
  2023-10-13 20:51 ` [PATCH 1/2] arm64: dts: qcom: msm8916-longcheer-l8910: " André Apitzsch
@ 2023-10-18  8:50   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-10-18  8:50 UTC (permalink / raw)
  To: André Apitzsch, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming, Stephan Gerhold



On 10/13/23 22:51, André Apitzsch wrote:
> l8910 uses KTD2026 LED driver. Add it to the device tree.
> 
> Tested-by: Stephan Gerhold <stephan@gerhold.net>
> Signed-off-by: André Apitzsch <git@apitzsch.eu>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 2/2] arm64: dts: qcom: msm8939-longcheer-l9100: Enable RGB LED
  2023-10-13 20:51 ` [PATCH 2/2] arm64: dts: qcom: msm8939-longcheer-l9100: " André Apitzsch
@ 2023-10-18  8:50   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-10-18  8:50 UTC (permalink / raw)
  To: André Apitzsch, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming



On 10/13/23 22:51, André Apitzsch wrote:
> l9100 uses KTD2026 LED driver. Add it to the device tree.
> 
> Signed-off-by: André Apitzsch <git@apitzsch.eu>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED
  2023-10-13 20:51 [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED André Apitzsch
  2023-10-13 20:51 ` [PATCH 1/2] arm64: dts: qcom: msm8916-longcheer-l8910: " André Apitzsch
  2023-10-13 20:51 ` [PATCH 2/2] arm64: dts: qcom: msm8939-longcheer-l9100: " André Apitzsch
@ 2023-10-22 15:50 ` Bjorn Andersson
  2023-10-28 10:39 ` Pavel Machek
  3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2023-10-22 15:50 UTC (permalink / raw)
  To: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, André Apitzsch
  Cc: linux-arm-msm, devicetree, linux-kernel, phone-devel,
	~postmarketos/upstreaming, Stephan Gerhold


On Fri, 13 Oct 2023 22:51:35 +0200, André Apitzsch wrote:
> With the driver for ktd2026 recently applied to linux-leds[1], the LED
> can be enabled on longcheer l8910 and l9100.
> 
> [1] https://lore.kernel.org/all/20231002-ktd202x-v6-0-26be8eefeb88@apitzsch.eu/
> 
> 

Applied, thanks!

[1/2] arm64: dts: qcom: msm8916-longcheer-l8910: Enable RGB LED
      commit: 5017b8cdb7ebeb32d7f12a05b34d58662e137dbe
[2/2] arm64: dts: qcom: msm8939-longcheer-l9100: Enable RGB LED
      commit: a21796c631734ea5cf62507e63a2479261880514

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

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

* Re: [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED
  2023-10-13 20:51 [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED André Apitzsch
                   ` (2 preceding siblings ...)
  2023-10-22 15:50 ` [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: " Bjorn Andersson
@ 2023-10-28 10:39 ` Pavel Machek
  3 siblings, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2023-10-28 10:39 UTC (permalink / raw)
  To: André Apitzsch
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, devicetree,
	linux-kernel, phone-devel, ~postmarketos/upstreaming,
	Stephan Gerhold

Hi!

> With the driver for ktd2026 recently applied to linux-leds[1], the LED
> can be enabled on longcheer l8910 and l9100.

Please make sure sysfs name is consistent with notification LED on
other phones, as documented by well-known-leds.txt.

Best regards,
								Pavel
-- 

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

end of thread, other threads:[~2023-10-28 10:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13 20:51 [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: Enable RGB LED André Apitzsch
2023-10-13 20:51 ` [PATCH 1/2] arm64: dts: qcom: msm8916-longcheer-l8910: " André Apitzsch
2023-10-18  8:50   ` Konrad Dybcio
2023-10-13 20:51 ` [PATCH 2/2] arm64: dts: qcom: msm8939-longcheer-l9100: " André Apitzsch
2023-10-18  8:50   ` Konrad Dybcio
2023-10-22 15:50 ` [PATCH 0/2] arm64: dts: qcom: longcheer l8910 and l9100: " Bjorn Andersson
2023-10-28 10:39 ` Pavel Machek

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).