From 5017b8cdb7ebeb32d7f12a05b34d58662e137dbe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Apitzsch?= Date: Fri, 13 Oct 2023 22:51:36 +0200 Subject: [PATCH] arm64: dts: qcom: msm8916-longcheer-l8910: Enable RGB LED MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit l8910 uses KTD2026 LED driver. Add it to the device tree. Tested-by: Stephan Gerhold Signed-off-by: André Apitzsch Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231013-bq_leds-v1-1-cc374369fc56@apitzsch.eu Signed-off-by: Bjorn Andersson --- .../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 e64bf687ca7db..3b7fdb6797a94 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts @@ -8,6 +8,7 @@ #include #include #include +#include / { model = "BQ Aquaris X5 (Longcheer L8910)"; @@ -86,6 +87,46 @@ }; }; +&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 = ; + function = LED_FUNCTION_STATUS; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + }; + + led@1 { + reg = <1>; + color = ; + }; + + led@2 { + reg = <2>; + color = ; + }; + }; + }; +}; + &blsp_i2c3 { status = "okay"; @@ -130,6 +171,16 @@ qcom,hphl-jack-type-normally-open; }; +&pm8916_gpios { + status_led_default: status-led-default-state { + pins = "gpio3"; + function = PMIC_GPIO_FUNC_NORMAL; + power-source = ; + bias-disable; + output-high; + }; +}; + &pm8916_resin { status = "okay"; linux,code = ; -- 2.30.2