README.TXT
=========

Contents:

  o INTRODUCTION
  o CONFIGURATION

# INTRODUCTION
==============

  The Linux driver supports the LP5860 leds. The Linux driver supports communication through 
  the I2C bus and SPI bus.

# CONFIGURATION
===============

  1. Merge the two patches related to LP5860 into the Linux kernel v5.15. If the kernel version difference 
causes a conflict, please patch manually.
  
  2. Configure kernel with "make menuconfig"  and select CHARGER_LP5860.

  3. DTS configuration according to "/Documentation/devicetree/bindings/power/supply/LP5860.yaml".

i2c examples:
  - |

    &i2c0 {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;

        lp5860:ledscontrol@10 {
            compatible = "ti,lp5860";
            reg = <0x10>;
            ifs-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
            sync-gpio = <&pio 0 8 GPIO_ACTIVE_LOW>;
            enable-gpio = <&pio 0 9 GPIO_ACTIVE_HIGH>;
        };
    };


spi examples:
  - |

    &spi1  {
        status = "okay";

        lp5860:ledcontrol@0 {
            #address-cells = <1>;
            #size-cells = <0>;
            compatible = "ti,lp5860";
            reg = <0>;
            spi-mode = <SPI_MODE_0>;
            spi-max-frequency = <12000000>;
            ifs-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
            sync-gpio = <&pio 0 8 GPIO_ACTIVE_LOW>;
            enable-gpio = <&pio 0 9 GPIO_ACTIVE_HIGH>;
        };
    };