This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/LP5562: LP5562: cannot enable lp5562 linux driver

Part Number: LP5562
Other Parts Discussed in Thread: LP3944, LP5521, LP5523, LP8501

Tool/software: Linux

Dear TI support

I got your linux driver from below.

https://e2e.ti.com/support/power-management/f/196/t/816435

I add below patches.

diff --git a/arch/arm64/boot/dts/sony/ac0.dtsi b/arch/arm64/boot/dts/sony/ac0.dtsi
index eea25ace471a..dfff81bd2e87 100644
--- a/arch/arm64/boot/dts/sony/ac0.dtsi
+++ b/arch/arm64/boot/dts/sony/ac0.dtsi
@@ -283,6 +283,35 @@
clock-frequency = <355000>;
qcom,clk-freq-out = <100000>;
status = "okay";
+ lp5562@60 {
+ compatible = "ti,lp5562";
+ reg = <0x60>;
+ clock-mode = /bits/8 <1>;
+
+ chan0 {
+ chan-name = "R";
+ led-cur = /bits/ 8 <0x20>;
+ max-cur = /bits/ 8 <0x60>;
+ };
+
+ chan1 {
+ chan-name = "G";
+ led-cur = /bits/ 8 <0x20>;
+ max-cur = /bits/ 8 <0x60>;
+ };
+
+ chan2 {
+ chan-name = "B";
+ led-cur = /bits/ 8 <0x20>;
+ max-cur = /bits/ 8 <0x60>;
+ };
+
+ chan3 {
+ chan-name = "W";
+ led-cur = /bits/ 8 <0x20>;
+ max-cur = /bits/ 8 <0x60>;
+ };
+ };
};

/* I2C: QUP13 */
diff --git a/arch/arm64/configs/ac0_defconfig b/arch/arm64/configs/ac0_defconfig
index 8c9e96701461..4bf7fd7003c0 100644
--- a/arch/arm64/configs/ac0_defconfig
+++ b/arch/arm64/configs/ac0_defconfig
@@ -3314,7 +3314,7 @@ CONFIG_LEDS_CLASS=y
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_LP5523 is not set
-# CONFIG_LEDS_LP5562 is not set
+CONFIG_LEDS_LP5562=y
# CONFIG_LEDS_LP8501 is not set
# CONFIG_LEDS_LP8860 is not set
# CONFIG_LEDS_PCA955X is not set

But we cannot see below sysfs

  echo 2 > /sys/bus/i2c/devices/xxxx/select_engine     # 2 is for green channel
  echo "RGB" > /sys/bus/i2c/devices/xxxx/engine_mux    # engine mux for RGB
  echo 1 > /sys/class/firmware/lp5562/loading
  echo "4000600040FF6000" > /sys/class/firmware/lp5562/data
  echo 0 > /sys/class/firmware/lp5562/loading
  echo 1 > /sys/bus/i2c/devices/xxxx/run_engine

We found below errors.

[ 13.070920] i2c_geni a88000.i2c: i2c error :-107
[ 13.070938] lp5562 0-003c: device detection err: -107
[ 13.071150] lp5562: probe of 0-003c failed with error -107

Please give me your advices.

Best regards,

Hiromitsu