ハイパスqpnp-VM-BMS電圧モードに基づいてバッテリ管理

CV:定電圧一定の圧力

SMMB充電器:充電器-ModeBatteryスイッチと、周辺スイッチモード充電器とブースト周辺機器を後押し

OCV:オープンcircuitvoltage

EOC:充電終了OfChargeエンド

UUC:UnusableCapacityない電気

DRIVERS \ソースコードファイル\カーネルを対応する\パワー\ qpnp-VM-bms.c、PMICバッテリ管理システムクアルコムQPNP電圧モード(Qualcomm'sQPNP電圧モード(VM)PMICバッテリ管理システム)、クライアントへのインタフェースを提供します電池は、関連するプロパティを読み取る準備ができている場合、その主な機能は、定期的なサンプリングVBAT(vattery電圧)を算出したSOC(状態ofcharge)に基づいています

カーネル\ドキュメント\ devicetreeの\バインディングを学習し、次の\パワー\ qpnp-VM-bms.txt

親には、次のプロパティが必要です

QCOM、vmbmsノード:カーネル\アーチ\アーム\ブート\ DTS QCOM \ pm8909_bms MSM-pm8909.dtsiファイル\を参照してください。

- compatible : Must be "qcom,qpnp-vm-bms" for the BM driver.

 

- reg              :Offset and length of the PMIC peripheral register map.

例えば、REGため= <0x4000の0x100の>。


- interrupts   : The interrupt mappings.

                The format should be

                <slave-id peripheral-idinterrupt-number>.

そのようなものとして

interrupts =       <0x0 0x40 0x0>,

                  <0x00x40 0x3>,

                  <0x00x40 0x4>,

                  <0x00x40 0x5>;

- interrupt-names : names for the mappedbms interrupt

              Thefollowing interrupts are required:

              0: leave CV state离开恒压状态

              1: enter CV state

              2: good ocv generated

              3: ocv_thr

              4: fifo update

              5: fsm state changed

そのようなものとして

interrupt-names = "leave_cv",

                "ocv_thr",

                "fifo_update_done",

                "fsm_state_change";

また、子ノードは、代替的に含むことができます。

- qcom,batt-pres-status : A subnode with aregister address for the SMBB

              batteryinterface's BATT_PRES_STATUS register. If this node is

              added,then the BMS will try to detect offmode battery removal

              viathe battery interface's offmode battery removal circuit.

これは、このノードが増加した場合、BMSは、プラグオフモード回路にパッチを適用するBATT_PRES_STATUSのSMMBアドレス試みるレジスタバッテリーインターフェースに対する子ノードであるオフモードによりバッテリバッテリーインタフェースを検出します

例えば

qcom,batt-pres-status@1208 {

    reg= <0x1208 0x1>;

};

バッテリー曲線:

- qcom,battery-data : A phandle to a nodecontaining the available batterydata

  profiles.See the batterydata bindings documentation for more

  details.

このノードの値がpHandleあり、それが有効なノード曲線データは、バッテリーを備え、\バインディング\ batterydata \ batterydata.txt \ devicetreeカーネル\ Documentationを参照してくださいを指します

在kernel\arch\arm\boot\dts\qcom\msm8909-qrd-skue.dtsi中定义

/ {
        qrd_batterydata:qcom,battery-data {
          qcom,rpull-up-kohm= <0>;

          qcom,vref-batt-therm= <1800000>;



          #include"batterydata-qrd-skue-4v35-2000mah.dtsi"

   };

};
&pm8909_bms {
       status= "okay";
       qcom,resume-soc= <95>;
       qcom,use-reported-soc;
       qcom,force-bms-active-on-charger;
       qcom,battery-data = <&qrd_batterydata>;

};

親は、プロパティが必要です

- qcom,v-cutoff-uv : cutoff voltage wherethe battery is considered dead in

                     micro-volts(微伏).

シャットダウン電圧は、SOCを計算するため、修正シャットダウン電圧として、この修正に加えて、電池はまたQCOM曲線データを変更する必要があり、V-カットオフ-UVは、実際には、好ましくは曲線データでバッテリーです。

例えばQCOMため、Vカットオフ-UV = <340万>。

- qcom,max-voltage-uv : maximum voltage forthe battery in micro-volts.

ミリボルト、例えばQCOM、最大電圧-UV = <4200000>の最大電池電圧。

- qcom,r-conn-mohm : connector resistancein milli-ohms.

抵抗が接続され、QCOMとして、R - メガオームCONN = <0>。

- qcom,shutdown-soc-valid-limit : If theocv upon restart is within this

                     distanceof the shutdown ocv, the BMS will try to force

                     thenew SoC to the old one to provide charge continuity.

                     Thatis to say,

                            if(abs(shutdown-soc - current-soc) < limit)

                            thenuse old SoC.

如QCOM、シャットダウン-SOC-有効な制限= <100>。

- qcom,low-soc-calculate-soc-threshold :The SoC threshold for when

                     theperiodic calculate_soc work speeds up. This ensures

                     SoCis updated in userspace constantly when we are near

                     shutdown.

SOCがこのしきい値を下回っている場合には、ユーザーが更新し続けることができるように、calculate_soc短い作業サイクル、SOCは、時間内にスペースを閉鎖します。QCOMとして、低SOC-計算-SOC閾値= <15>。

- qcom,low-voltage-threshold : The batteryvoltage threshold in micro-volts for

                     whenthe BMS tries to wake up and hold a wakelock to

                     ensurea clean shutdown.

シャットダウンのための低電圧しきい値この値に達すると、BMSは、クリーンシャットダウンを確保するために目を覚ますと、ウェイクロックを保持してみてください。QCOMとして、低電圧閾値= <3450000>。

  • QCOM、低電圧の計算-SOC-MS:後続の間Thetime期間

                   SoCrecalculations when the current voltage is below
    
                   qcom,low-voltagethreshold. This takes precedence over
    
                   qcom,low-soc-calculate-soc-ms.

バッテリ電圧がQCOM、低電圧閾値以下であり、次いでSOC期間を再計算するとき、1000 <=ようQCOM、低電圧の計算-SOC-MSなどQCOM、低SOC-計算-SOC-MSに好ましいです>;。

  • QCOM、低SOC-計算-SOC-MS:後続の間の時間期間

                   SoCrecalculations when the current SoC is below
    
                   qcom,low-soc-calculate-soc-threshold.This takes
    
                   precedenceover qcom,calculate-soc-ms.

QCOM SOCは、<5000> =、電流よりも低い低SOC-計算-SOC閾値ながら、次にQCOMよりも優先されるSOCの期間を再計算し、このような低SOC-計算-SOC-MSとして計算-SOC-MS、 ;

  • QCOM、以下クアルコム、-SOC-MSを計算します。それ以降のSoC periodbetween時間を

                   recalculationswhen the current SoC is above or equal
    
                   qcom,low-soc-calculate-soc-threshold.

現在のSOC> = QCOM、低SOC-計算-SOC-SOC閾値時間の計算。QCOMとして、計算-SOC-MS = <20000>。

  • QCOM、volatge-SOCタイムアウト-MS:モジュールが起動した後timeoutperiod

                   reportingvolage based SOC and does not use the VMBMS
    
                   algorithmfor SOC calculation.

何のアルゴリズムはVMBMS SOCを計算しないようにした場合、電圧モジュールは、この時間ベースのSOCの後に報告します。QCOM、volatge-SOCタイムアウト-MS = <60000>。

  • QCOM、BMS-VADC:VADCdeviceのphandle対応します。

phandle VADC対応装置、QCOM、BMS-VADC = <&pm8909_vadc>。

  • QCOM、BMS-adc_tm:定期的な設定に対応するADC_TMdeviceのphandle

                      measurements andreceive notifications for vbatt.

測定サイクルを設定して通知VBATTを受信するための装置を対応Phandle ADC_TM、。QCOM、BMS-adc_tm = <&pm8909_adc_tm>など。

  • QCOM、PMIC-REVID:Phandleは、周辺ノードをtherevisionする指します。

周辺ノードphandleの改定点、例えばQCOM、PMIC-REVID = <&pm8909_revid>。

親ノードオプションのプロパティ

親オプションの属性

  • QCOM、S1-サンプル間隔-MS:状態でアキュムレータのMSにおけるサンプリングレート

                   S1.(i.e) the rate at which the accumulator is being
    
                   filledwith vbat samples. Minimum value = 0 and
    
                   Maximumvalue = 2550ms.
  • QCOM、S2-サンプル間隔-MS:状態でアキュムレータのMSにおけるサンプリングレート

                   S2.(i.e) the rate at which the accumulator is being
    
                   filledwith vbat samples. Minimum value = 0 and
    
                   Maximumvalue = 2550ms.
  • QCOM、S1-サンプル数:数は1でFIFOのためaccululatedすることがofsamples

                   stateS1. Possible values are - 0, 4, 8, 16, 32, 64, 128,
    
                   256.
  • QCOM、S2-サンプル数:数は1でFIFOのためaccululatedすることがofsamples

                   stateS2. Possible values are - 0, 4, 8, 16, 32, 64, 128,
    
                   256.
  • QCOM、S1-FIFO-legth:FIFOの数は、状態S1に充填されるように、togenerate

                   thefifo_update_done interrupt. Possile values - 0 to 8
  • QCOM、S2-FIFO-legth:FIFOの数は、状態S2に充填されるように、togenerate

                   thefifo_update_done interrupt. Possible values- 0 to 8

いくつかのオプション属性は上述のない使用されません。

  • QCOM、力-S3オン中断:ブールpropertyto S3にBMSを強制(スリープ)状態

                   whileentering into system suspend.

この場合、システムが休止状態に入ったときに、このプロパティには、BMS S3(スリープ)状態を余儀なくされました。


- qcom,force-bms-active-on-charger: Boolproperty to keep BMS FSM active

                            ifcharger is present.

限り充電器として、BMS FSMはアクティブ確保。


- qcom,report-charger-eoc : Bool propertyto indicate if BMS needs to indicate

                     EOCto charger.

BMS命令は、充電器にEOC(充電終了)通知する必要があります


- qcom,ignore-shutdown-soc: A boolean thatcontrols whether BMS will

                     tryto force the startup SoC to be the same as the

                     shutdownSoC. Defining it will make BMS ignore the

                     shutdownSoC.

あなたはこのシャットダウンを定義する場合、SOCとして起動およびシャットダウンSOC時に強制しようとするかどうかをBMS制御はBMS SOCを無視し、SOCは、通常の状況下では、最後のシャットダウンを使用することはありませんので、これはそのブート手段を必要とするので、このプロパティの使用はありません


- qcom,use-voltage-soc : A boolean thatcontrols whether BMS will use

                     voltage-basedSoC instead of a coulomb counter based

                     one.Voltage-based SoC will not guarantee linearity.

BMSは、代わりにクーロン燃料計、電圧ベースのSOCのこの電圧に基づくSOCベースのアプローチの値が直線性を保証するものではありませんかどうかを判断します。


- qcom,disable-bms : Bool property to disable the VMBMS hardware module.

                     Enablethis property if BMS is not supported or an external

                     fuelgauge is used.

このプロパティは、VM BMSのハードウェアモジュールをオフにするために使用される、またはこの属性を有効に外部電源BMSタイミングの使用をサポートしていません。


- qcom,s3-ocv-tolerence-uv : The S3 stateOCV tolerence threshold in uV. The

                     LSBvalue is 300uV and maximum value is 76500uV.

S3の状態互換OCV閾値、最小値と最大値が300uV 76500uVあります。


- qcom,low-soc-fifo-length : The fifolength (of S2 STATE) to be used at lower

                     SOCs.If this value is not specified the system uses

                     defaultlenght.

FIFO長状態S2 SOCが低い場合には、指定されていない場合、システムのデフォルトの長さ、ここでQCOM、低SOC-FIFO長= <2>。


- qcom,resume-soc:    Capacity in percent at which charging should resume

                     whena fully charged battery drops below this level.

バッテリーがいっぱいになるとの割合がこの値よりも低い場合、充電が再開されます。QCOM、再開、SOCなど= <99>。


- qcom,low-temp-threshold : The temperaturethreshold below which the IBAT

                     averagingand UUC smoothening is disabled. This value

                     isin deci-degrees centigrade. If not specified it

                     defaultsto 0.

温度がしきい値よりも低く、例えば0に指定されていないデフォルトとしての機能を、平滑IBAT UUC(非消費)を平均化無効にする場合、ここで指定されていません。


- qcom,ibat-avg-samples : The number ofsamples to be averaged for IBAT

                     estimation.If not specified it defaults to 16.

                     Thepossible values are 1 to 16.

IBATの平均数の推定値を使用して、デフォルトは16、1〜16の実効値として指定されていないとして、我々は指定されていませんでした。

- qcom,batt-aging-comp : A boolean thatdefines if battery aging compensation

                     isenabled.

これは推奨さ、バッテリーの経年変化補償の定義を可能にし、私は使用しませんでしたを示しています。


- qcom,use-reported-soc : Bool property toenable the reported_soc logic. To

                     enablethis feature, qcom,resume-soc must be defined as

                     aproper value. The BMS is also required to control the

                     charging,discharging and recharging.

これはreported_socロジックを有効にするだけでなく、QCOMを定義するために、適切な値に-SOCを再開し、BMSは停止し、充電および再充電、充電の必要性を制御します。QCOM、使用報告-SOC与えクアルコムコードのデフォルトの定義は、我々はこのコア基板メーカーのコメント、およびQCOMを高め、レポート充電器-EOC

QCOM、属性値BATT-PRESステータス所望ノード

- reg : offset and length of the PMIC LBCbattery interface BATT_PRES_STATUS

              register

として

qcom,batt-pres-status@1208 {

    reg= <0x1208 0x1>;

};

QCOM、qpnp-CHG-PRESノードに必要な属性

- reg : offset and length of the PMIC LBCcharger interafce CHARGER_OPTION

              register.

として

qcom,qpnp-chg-pres@1008 {

    reg= <0x1008 0x1>;

};

おすすめ

転載: www.cnblogs.com/linhaostudy/p/11590548.html
おすすめ