All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: qcom: pmi8998: add and enable flash LED
@ 2023-05-17 18:21 Dylan Van Assche
  2023-05-17 18:21 ` [PATCH 1/2] arm64: dts: qcom: pmi8998: add " Dylan Van Assche
  2023-05-17 18:21 ` [PATCH 2/2] arm64: dts: qcom: sdm845-shift-axolotl: enable " Dylan Van Assche
  0 siblings, 2 replies; 4+ messages in thread
From: Dylan Van Assche @ 2023-05-17 18:21 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, amartinz,
	Dylan Van Assche

Qualcomm PMI8998 has support for 3 flash LEDs which got support in [1].
Add this driver to the PMI8998 DTS and enable 2 flash LEDs in the SHIFTPHONES SHIFT6mq 
smartphone. This smartphone has a white and yellow flash LED.

[1] https://lore.kernel.org/all/20230507172941.364852-1-me@dylanvanassche.be

Kind regards,
Dylan Van Assche

Dylan Van Assche (2):
  arm64: dts: qcom: pmi8998: add flash LED
  arm64: dts: qcom: sdm845-shift-axolotl: enable flash LED

 arch/arm64/boot/dts/qcom/pmi8998.dtsi         |  6 +++++
 .../boot/dts/qcom/sdm845-shift-axolotl.dts    | 22 +++++++++++++++++++
 2 files changed, 28 insertions(+)

-- 
2.40.1


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

* [PATCH 1/2] arm64: dts: qcom: pmi8998: add flash LED
  2023-05-17 18:21 [PATCH 0/2] arm64: dts: qcom: pmi8998: add and enable flash LED Dylan Van Assche
@ 2023-05-17 18:21 ` Dylan Van Assche
  2023-05-17 19:07   ` Krzysztof Kozlowski
  2023-05-17 18:21 ` [PATCH 2/2] arm64: dts: qcom: sdm845-shift-axolotl: enable " Dylan Van Assche
  1 sibling, 1 reply; 4+ messages in thread
From: Dylan Van Assche @ 2023-05-17 18:21 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, amartinz,
	Dylan Van Assche

Qualcomm PMIC PMI8998 has a 3 channel flash LED driver which is used
by many phones for 1 or 2 flash LEDs. Each LED can be used in flash mode
or torch mode. Add the flash LED node to PMI8998 DTS.

Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
 arch/arm64/boot/dts/qcom/pmi8998.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
index ffe587f281d8..89f959353ad5 100644
--- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
@@ -60,6 +60,12 @@ pmi8998_lpg: pwm {
 			status = "disabled";
 		};
 
+		pmi8998_flash: led-controller@d300 {
+			compatible = "qcom,spmi-flash-led";
+			reg = <0xd300>;
+			status = "disabled";
+		};
+
 		pmi8998_wled: leds@d800 {
 			compatible = "qcom,pmi8998-wled";
 			reg = <0xd800>, <0xd900>;
-- 
2.40.1


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

* [PATCH 2/2] arm64: dts: qcom: sdm845-shift-axolotl: enable flash LED
  2023-05-17 18:21 [PATCH 0/2] arm64: dts: qcom: pmi8998: add and enable flash LED Dylan Van Assche
  2023-05-17 18:21 ` [PATCH 1/2] arm64: dts: qcom: pmi8998: add " Dylan Van Assche
@ 2023-05-17 18:21 ` Dylan Van Assche
  1 sibling, 0 replies; 4+ messages in thread
From: Dylan Van Assche @ 2023-05-17 18:21 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, amartinz,
	Dylan Van Assche

The SHIFT6mq (axolotl) is an SDM845-based smartphone with 2 flash LEDs.
One LED is white, the other one is yellow. Define both LEDs in the DTS
so they can be used as flash or torch.

Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
 .../boot/dts/qcom/sdm845-shift-axolotl.dts    | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
index 0ad891348e0c..e7fc0c3cae58 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts
@@ -554,6 +554,28 @@ led@5 {
 	};
 };
 
+&pmi8998_flash {
+	status = "okay";
+
+	led-0 {
+		function = LED_FUNCTION_FLASH;
+		color = <LED_COLOR_ID_WHITE>;
+		led-sources = <1>;
+		led-max-microamp = <180000>;
+		flash-max-microamp = <1000000>;
+		flash-max-timeout-us = <1280000>;
+	};
+
+	led-1 {
+		function = LED_FUNCTION_FLASH;
+		color = <LED_COLOR_ID_YELLOW>;
+		led-sources = <2>;
+		led-max-microamp = <180000>;
+		flash-max-microamp = <1000000>;
+		flash-max-timeout-us = <1280000>;
+	};
+};
+
 &qup_uart9_rx {
 	drive-strength = <2>;
 	bias-pull-up;
-- 
2.40.1


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

* Re: [PATCH 1/2] arm64: dts: qcom: pmi8998: add flash LED
  2023-05-17 18:21 ` [PATCH 1/2] arm64: dts: qcom: pmi8998: add " Dylan Van Assche
@ 2023-05-17 19:07   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-17 19:07 UTC (permalink / raw)
  To: Dylan Van Assche, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, amartinz

On 17/05/2023 20:21, Dylan Van Assche wrote:
> Qualcomm PMIC PMI8998 has a 3 channel flash LED driver which is used
> by many phones for 1 or 2 flash LEDs. Each LED can be used in flash mode
> or torch mode. Add the flash LED node to PMI8998 DTS.
> 
> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> ---
>  arch/arm64/boot/dts/qcom/pmi8998.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pmi8998.dtsi b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> index ffe587f281d8..89f959353ad5 100644
> --- a/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmi8998.dtsi
> @@ -60,6 +60,12 @@ pmi8998_lpg: pwm {
>  			status = "disabled";
>  		};
>  
> +		pmi8998_flash: led-controller@d300 {
> +			compatible = "qcom,spmi-flash-led";

This cannot be alone.

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

Best regards,
Krzysztof


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

end of thread, other threads:[~2023-05-17 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 18:21 [PATCH 0/2] arm64: dts: qcom: pmi8998: add and enable flash LED Dylan Van Assche
2023-05-17 18:21 ` [PATCH 1/2] arm64: dts: qcom: pmi8998: add " Dylan Van Assche
2023-05-17 19:07   ` Krzysztof Kozlowski
2023-05-17 18:21 ` [PATCH 2/2] arm64: dts: qcom: sdm845-shift-axolotl: enable " Dylan Van Assche

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.