ipq807x: prpl-haze: enable LED driver on device tree
authorCheWei Chien <chewei.chien@wnc.com.tw>
Thu, 4 Jan 2024 10:09:06 +0000 (18:09 +0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 15 Jan 2024 15:59:57 +0000 (16:59 +0100)
Enable LED driver LP5562 on HAZE device tree and include its kernel
module package on default package for HAZE.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts
target/linux/qualcommax/image/ipq807x.mk

index 34499641596b5a26b8caf57d1fda31047adb0618..8fdfe981f9ce1599c8c2e280182359a495496304 100644 (file)
                ethernet2 = &dp3;
                ethernet3 = &dp2;
                label-mac-device = &dp6_syn;
+               led-boot = &led_system_blue;
+               led-failsafe = &led_system_red;
+               led-running = &led_system_green;
+               led-upgrade = &led_system_blue;
        };
 
        chosen {
                        bias-pull-up;
                };
        };
+
+       i2c_3_pins: i2c-3-state {
+               pins = "gpio46", "gpio47";
+               function = "blsp2_i2c";
+               drive-strength = <8>;
+               bias-disable;
+       };
 };
 
 &blsp1_uart5 {
 
        qcom,ath11k-calibration-variant = "prpl-Haze";
 };
+
+&blsp1_i2c3{
+       pinctrl-0 = <&i2c_3_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       led-controller@30 {
+               compatible = "ti,lp5562";
+               reg = <0x30>;
+               clock-mode = /bits/ 8 <2>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               led_system_red: chan@0 {
+                       chan-name = "red";
+                       led-cur = /bits/ 8 <0x20>;
+                       max-cur = /bits/ 8 <0x60>;
+                       color = <LED_COLOR_ID_RED>;
+                       reg = <0>;
+               };
+
+               led_system_green: chan@1 {
+                       chan-name = "green";
+                       led-cur = /bits/ 8 <0x20>;
+                       max-cur = /bits/ 8 <0x60>;
+                       color = <LED_COLOR_ID_GREEN>;
+                       reg = <1>;
+               };
+
+               led_system_blue: chan@2 {
+                       chan-name = "blue";
+                       led-cur = /bits/ 8 <0x20>;
+                       max-cur = /bits/ 8 <0x60>;
+                       color = <LED_COLOR_ID_BLUE>;
+                       reg = <2>;
+               };
+       };
+};
index f513d7f25cbb6a5f898a50bc75c815fc2d580c65..f5f0e261405b4250deee8004f95aa4fddd2010b4 100644 (file)
@@ -220,7 +220,7 @@ define Device/prpl_haze
        DEVICE_DTS_CONFIG := config@hk09
        SOC := ipq8072
        DEVICE_PACKAGES += ath11k-firmware-qcn9074 ipq-wifi-prpl_haze kmod-ath11k-pci \
-               mkf2fs f2fsck kmod-fs-f2fs
+               mkf2fs f2fsck kmod-fs-f2fs kmod-leds-lp5562
 endef
 TARGET_DEVICES += prpl_haze