Ram Chandrasekar | 5e51193 | 2018-02-06 16:34:02 -0700 | [diff] [blame] | 1 | =============================================================================== |
| 2 | BCL Peripheral driver for PMIC5: |
| 3 | =============================================================================== |
| 4 | Qualcomm Technologies, Inc's PMIC has battery current limiting peripheral, |
| 5 | which can monitor for high battery current and low battery voltage in the |
| 6 | hardware. The BCL peripheral driver interacts with the PMIC peripheral using |
| 7 | the SPMI driver interface. The hardware can take threshold for notifying for |
| 8 | high battery current or low battery voltage events. This driver works only |
| 9 | with PMIC version 5, where the same BCL peripheral can be found in multiple |
| 10 | PMIC's that are used in a device, with limited functionalities. For example, |
| 11 | one PMIC can have only vbat monitoring, while the other PMIC can have both |
| 12 | vbat and ibat monitoring. This is a common driver, that can interact |
| 13 | with the multiple BCL peripherals. |
| 14 | |
| 15 | Required Parameters: |
| 16 | - compatible: must be |
Manaf Meethalavalappu Pallikunhi | e49406e | 2018-03-09 18:34:14 +0530 | [diff] [blame] | 17 | 'qcom,bcl-v5' for bcl peripheral in PMIC version 5. |
Ram Chandrasekar | 5e51193 | 2018-02-06 16:34:02 -0700 | [diff] [blame] | 18 | - reg: <a b> where 'a' is the starting register address of the PMIC |
| 19 | peripheral and 'b' is the size of the peripheral address space. |
Ram Chandrasekar | 7b5c692 | 2018-02-27 17:07:12 -0700 | [diff] [blame^] | 20 | - interrupts: <a b c d> Where, |
| 21 | 'a' is the SLAVE ID of the PMIC, |
| 22 | 'b' is the peripheral ID, |
| 23 | 'c' is the interrupt number in PMIC and |
| 24 | 'd' is the interrupt type. |
Ram Chandrasekar | 5e51193 | 2018-02-06 16:34:02 -0700 | [diff] [blame] | 25 | - interrupt-names: user defined names for the interrupts. These |
| 26 | interrupt names will be used by the drivers to identify the |
| 27 | interrupts, instead of specifying the ID's. bcl driver will |
| 28 | accept these standard interrupts. |
Ram Chandrasekar | 7b5c692 | 2018-02-27 17:07:12 -0700 | [diff] [blame^] | 29 | "bcl-ibat-lvl0", |
| 30 | "bcl-ibat-lvl1", |
| 31 | "bcl-vbat-lvl0", |
| 32 | "bcl-vbat-lvl1", |
| 33 | "bcl-vbat-lvl2", |
Ram Chandrasekar | 5e51193 | 2018-02-06 16:34:02 -0700 | [diff] [blame] | 34 | |
| 35 | Example: |
Manaf Meethalavalappu Pallikunhi | e49406e | 2018-03-09 18:34:14 +0530 | [diff] [blame] | 36 | bcl@4200 { |
| 37 | compatible = "qcom,bcl-v5"; |
| 38 | reg = <0x4200 0x100>; |
Ram Chandrasekar | 7b5c692 | 2018-02-27 17:07:12 -0700 | [diff] [blame^] | 39 | interrupts = <0x2 0x42 0x0 IRQ_TYPE_NONE>, |
| 40 | <0x2 0x42 0x1 IRQ_TYPE_NONE>; |
| 41 | interrupt-names = "bcl-ibat-lvl0", |
| 42 | "bcl-vbat-lvl0"; |
Manaf Meethalavalappu Pallikunhi | e49406e | 2018-03-09 18:34:14 +0530 | [diff] [blame] | 43 | }; |