diff --git a/qcom/discrete_charging.dtsi b/qcom/discrete_charging.dtsi index 22cad42a901e..c01efe8971dd 100644 --- a/qcom/discrete_charging.dtsi +++ b/qcom/discrete_charging.dtsi @@ -279,7 +279,7 @@ ti,bq2589x,enable-ico; ti,bq2589x,use-absolute-vindpm; }; - +/* bq2597x: bq2597x-charger@66 { compatible = "ti,bq25970-charger"; reg = <0x66>; @@ -324,6 +324,7 @@ ti,bq2597x,ac-ovp-threshold = <17>; ti,bq2597x,sense-resistor-mohm = <5>; }; +*/ }; &tlmm { diff --git a/qcom/khaje-rhode-dvt-overlay.dts b/qcom/khaje-rhode-dvt-overlay.dts index 1b0e1572e7fb..71add11077fb 100644 --- a/qcom/khaje-rhode-dvt-overlay.dts +++ b/qcom/khaje-rhode-dvt-overlay.dts @@ -21,3 +21,51 @@ qcom,msm-id = <518 0x10000>; qcom,board-id = <0 0xB000>; }; +&qupv3_se1_i2c { + status = "okay"; + bq2597x: bq2597x-charger@66 { + compatible = "ti,bq25970-charger"; + reg = <0x66>; + #io-channel-cells = <1>; + //ti,bq2597x,interrupt_gpios = <&pio 30 0>; + //interrupt-parent = <&pio>; + //interrupts = <2 IRQ_TYPE_EDGE_FALLING 2 0>; + //interrupt-names = "bq2597x_irq"; + + //pinctrl-names = "default_slave"; + //pinctrl-0 = <&bq2597x_int_default_slave>; + interrupt-parent = <&tlmm>; + interrupts = <3 0>; //irq num base on hardware design + bq2597x,irq-gpio = <&tlmm 3 0>; //irq num base on hardware design + + ti,bq2597x,bat-ovp-disable = <0>; + ti,bq2597x,bat-ocp_disable = <0>; + ti,bq2597x,bat-ovp-alarm-disable = <0>; + ti,bq2597x,bus-ocp-disable = <0>; + ti,bq2597x,bus-ovp-alarm-disable = <0>; + ti,bq2597x,bus-ocp-alarm-disable = <0>; + ti,bq2597x,bat-ucp-alarm-disable = <0>; + ti,bq2597x,bat-therm-disable = <0>; + ti,bq2597x,bus-therm-disable = <0>; + + ti,bq2597x,bat-ovp-threshold = <4500>; + ti,bq2597x,bat-ovp-alarm-threshold = <4450>; + ti,bq2597x,bat-ocp-threshold = <8000>; + ti,bq2597x,bat-ocp-alarm-threshold = <7500>; + + ti,bq2597x,bus-ovp-threshold = <12000>; + ti,bq2597x,bus-ovp-alarm-threshold = <11000>; + ti,bq2597x,bus-ocp-threshold = <3750>; + ti,bq2597x,bus-ocp-alarm-threshold = <3500>; + + ti,bq2597x,bat-ucp-alarm-threshold = <2000>; + + ti,bq2597x,bat-therm-threshold = <0x15>; + ti,bq2597x,bus-therm-threshold = <0x15>; + ti,bq2597x,die-therm-threshold = <125>; + + ti,bq2597x,ac-ovp-threshold = <17>; + ti,bq2597x,sense-resistor-mohm = <5>; + }; +}; + diff --git a/qcom/khaje-rhode-evt-overlay.dts b/qcom/khaje-rhode-evt-overlay.dts index e06fe0ff33ce..54bfd5917d5e 100644 --- a/qcom/khaje-rhode-evt-overlay.dts +++ b/qcom/khaje-rhode-evt-overlay.dts @@ -24,3 +24,51 @@ #include "camera/khaje-camera-sensor-mot-rhode-overlay_evt.dtsi" + +&qupv3_se1_i2c { + status = "okay"; + bq2597x: bq2597x-charger@65 { + compatible = "ti,bq25970-charger"; + reg = <0x65>; + #io-channel-cells = <1>; + //ti,bq2597x,interrupt_gpios = <&pio 30 0>; + //interrupt-parent = <&pio>; + //interrupts = <2 IRQ_TYPE_EDGE_FALLING 2 0>; + //interrupt-names = "bq2597x_irq"; + + //pinctrl-names = "default_slave"; + //pinctrl-0 = <&bq2597x_int_default_slave>; + interrupt-parent = <&tlmm>; + interrupts = <3 0>; //irq num base on hardware design + bq2597x,irq-gpio = <&tlmm 3 0>; //irq num base on hardware design + + ti,bq2597x,bat-ovp-disable = <0>; + ti,bq2597x,bat-ocp_disable = <0>; + ti,bq2597x,bat-ovp-alarm-disable = <0>; + ti,bq2597x,bus-ocp-disable = <0>; + ti,bq2597x,bus-ovp-alarm-disable = <0>; + ti,bq2597x,bus-ocp-alarm-disable = <0>; + ti,bq2597x,bat-ucp-alarm-disable = <0>; + ti,bq2597x,bat-therm-disable = <0>; + ti,bq2597x,bus-therm-disable = <0>; + + ti,bq2597x,bat-ovp-threshold = <4500>; + ti,bq2597x,bat-ovp-alarm-threshold = <4450>; + ti,bq2597x,bat-ocp-threshold = <8000>; + ti,bq2597x,bat-ocp-alarm-threshold = <7500>; + + ti,bq2597x,bus-ovp-threshold = <12000>; + ti,bq2597x,bus-ovp-alarm-threshold = <11000>; + ti,bq2597x,bus-ocp-threshold = <3750>; + ti,bq2597x,bus-ocp-alarm-threshold = <3500>; + + ti,bq2597x,bat-ucp-alarm-threshold = <2000>; + + ti,bq2597x,bat-therm-threshold = <0x15>; + ti,bq2597x,bus-therm-threshold = <0x15>; + ti,bq2597x,die-therm-threshold = <125>; + + ti,bq2597x,ac-ovp-threshold = <17>; + ti,bq2597x,sense-resistor-mohm = <5>; + }; +};