summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCheWei Chien2024-02-19 01:21:53 +0000
committerPetr Štetiar2024-04-17 10:44:57 +0000
commit26e882f06f732784b2fbb224044ba7add93a34d8 (patch)
treedc8093b6f62260524135adb9e732f436d11d9b8d
parent726d4be297311f87a4d1947b3ae2c1bf6bed75ac (diff)
downloadopenwrt-26e882f06f732784b2fbb224044ba7add93a34d8.tar.gz
ipq807x: prpl-haze: enable LED driver on device tree
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> Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit facelift] (cherry picked from commit fb45194305e6bf9b58f610c1528769320879c749)
-rw-r--r--target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts49
-rw-r--r--target/linux/ipq807x/image/generic.mk2
2 files changed, 50 insertions, 1 deletions
diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts
index 8a5200b4eb..60dc0ce28a 100644
--- a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts
+++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-haze.dts
@@ -21,6 +21,10 @@
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 {
@@ -78,6 +82,13 @@
bias-pull-up;
};
};
+
+ i2c_3_pins: i2c-3-state {
+ pins = "gpio46", "gpio47";
+ function = "blsp2_i2c";
+ drive-strength = <8>;
+ bias-disable;
+ };
};
&blsp1_uart5 {
@@ -306,3 +317,41 @@
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>;
+ };
+ };
+};
diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk
index 104a667894..d1ada0edfa 100644
--- a/target/linux/ipq807x/image/generic.mk
+++ b/target/linux/ipq807x/image/generic.mk
@@ -104,7 +104,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