arm64: dts: qcom: pmi8998: add and enable flash LED controller
Subsystems (4)
v3 cover arm64: dts: qcom: pmi8998: add and enable flash LED controller
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.
* Changelog *
Changes in v2:
- Document compatible for PMI8998 to fix missing compatible in DTS.
- Improved commit messages, following [2]
Changes in v3:
- Adjust led-max-microamp and flash-max-microamp to better match downstream.
- Add Acked-by and Reviewed-by tags
[1] https://lore.kernel.org/all/[email protected]
[2] https://lore.kernel.org/all/[email protected]/
Kind regards,
Dylan Van Assche
Dylan Van Assche (3):
dt-bindings: leds: qcom,spmi-flash-led: add PMI8998
arm64: dts: qcom: pmi8998: add flash LED controller
arm64: dts: qcom: sdm845-shift-axolotl: enable flash LEDs
.../bindings/leds/qcom,spmi-flash-led.yaml | 1 + arch/arm64/boot/dts/qcom/pmi8998.dtsi | 6 +++++ .../boot/dts/qcom/sdm845-shift-axolotl.dts | 22 +++++++++++++++++++ 3 files changed, 29 insertions(+)
Signature · 1 line
2.40.1
PATCH v3 1/3 dt-bindings: leds: qcom,spmi-flash-led: add PMI8998
Document compatible for PMI8998 Torch and Flash LED controller.
--- Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml +1 -0
@@ -26,6 +26,7 @@ properties: - qcom,pm8150c-flash-led - qcom,pm8150l-flash-led - qcom,pm8350c-flash-led + - qcom,pmi8998-flash-led - const: qcom,spmi-flash-led reg:
Signature · 1 line
2.40.1
Re: [PATCH v3 1/3] dt-bindings: leds: qcom,spmi-flash-led: add PMI8998
Quoted 7 lines · Dylan Van Assche
Document compatible for PMI8998 Torch and Flash LED controller.
Signed-off-by Dylan Van Assche <[email protected]>--- Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml | 1 + 1 file changed, 1 insertion(+)
Applied, thanks
Signature · 1 line
Lee Jones [李琼斯]
PATCH v3 2/3 arm64: dts: qcom: pmi8998: add flash LED controller
In reply to Dylan Van AsscheQualcomm 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 controller node to PMI8998 DTS.
--- arch/arm64/boot/dts/qcom/pmi8998.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/pmi8998.dtsi +6 -0
@@ -60,6 +60,12 @@ pmi8998_lpg: pwm { status = "disabled"; }; + pmi8998_flash: led-controller@d300 { + compatible = "qcom,pmi8998-flash-led", "qcom,spmi-flash-led"; + reg = <0xd300>; + status = "disabled"; + }; + pmi8998_wled: leds@d800 { compatible = "qcom,pmi8998-wled"; reg = <0xd800>, <0xd900>;
Signature · 1 line
2.40.1
PATCH v3 3/3 arm64: dts: qcom: sdm845-shift-axolotl: enable flash LEDs
In reply to Dylan Van AsscheThe 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 and enable the flash LED controller to control them in PMI8998.
--- .../boot/dts/qcom/sdm845-shift-axolotl.dts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts +22 -0
@@ -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 = <100000>; + flash-max-microamp = <1100000>; + flash-max-timeout-us = <1280000>; + }; + + led-1 { + function = LED_FUNCTION_FLASH; + color = <LED_COLOR_ID_YELLOW>; + led-sources = <2>; + led-max-microamp = <100000>; + flash-max-microamp = <1100000>; + flash-max-timeout-us = <1280000>; + }; +}; + &qup_uart9_rx { drive-strength = <2>; bias-pull-up;
Signature · 1 line
2.40.1
Re: [PATCH v3 3/3] arm64: dts: qcom: sdm845-shift-axolotl: enable flash LEDs
Quoted 7 lines · 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 and enable the flash LED controller to control them in PMI8998.
Signed-off-by Dylan Van Assche <[email protected]>Reviewed-by Konrad Dybcio <[email protected]>
// Caleb (they/them)
Quoted 37 lines
--- .../boot/dts/qcom/sdm845-shift-axolotl.dts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+)arch/arm64/boot/dts/qcom/sdm845-shift-axolotl.dts +22
-0@@ -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 = <100000>; + flash-max-microamp = <1100000>; + flash-max-timeout-us = <1280000>; + }; + + led-1 { + function = LED_FUNCTION_FLASH; + color = <LED_COLOR_ID_YELLOW>; + led-sources = <2>; + led-max-microamp = <100000>; + flash-max-microamp = <1100000>; + flash-max-timeout-us = <1280000>; + }; +}; + &qup_uart9_rx { drive-strength = <2>; bias-pull-up;
Re: (subset) [PATCH v3 0/3] arm64: dts: qcom: pmi8998: add and enable flash LED controller
In reply to Dylan Van AsscheQuoted 11 lines · 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.
* Changelog *
Changes in v2:
- Document compatible for PMI8998 to fix missing compatible in DTS.
- Improved commit messages, following [2][...]
Applied, thanks!
[2/3] arm64: dts: qcom: pmi8998: add flash LED controller
commit: 9139bb56734a14c156d3ef736c22a06bd1a9d22c
[3/3] arm64: dts: qcom: sdm845-shift-axolotl: enable flash LEDs
commit: 8587d217ec3c09268d2023758e5fd6dbc3529c2bBest regards,
Signature · 1 line
Bjorn Andersson <[email protected]>