]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: qcom: msm8916-longcheer-l8910: Enable RGB LED
authorAndré Apitzsch <git@apitzsch.eu>
Fri, 13 Oct 2023 20:51:36 +0000 (22:51 +0200)
committerBjorn Andersson <andersson@kernel.org>
Sat, 21 Oct 2023 21:24:54 +0000 (14:24 -0700)
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>
Link: https://lore.kernel.org/r/20231013-bq_leds-v1-1-cc374369fc56@apitzsch.eu
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts

index e64bf687ca7dbc3e06686add85cd59396ed7d18e..3b7fdb6797a942298ac399a3a434b3cdc2795396 100644 (file)
@@ -8,6 +8,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)";
        };
 };
 
+&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";
 
        qcom,hphl-jack-type-normally-open;
 };
 
+&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>;