From 97efa7c24ff3a0bf93c6e7f6ae9e0eb970084aff Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Tue, 23 Jun 2020 16:52:18 +0530 Subject: [PATCH] bindings: smb1398: Add binding documents for SMB1398 charger Add binding documentation for SMB1398 charger, which can work in DIV2 charge pump mode as downstream chargers or combo mode as a pre-regulator. This is a snapshot from msm-4.19 commit 83784b9c3513 ("dt-bindings: Add property to keep display reset gpio pin high"). Change-Id: I96d552224f6384c68fce1398e14159c46c257210 --- .../power/supply/qcom/smb1398-charger.txt | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 bindings/power/supply/qcom/smb1398-charger.txt diff --git a/bindings/power/supply/qcom/smb1398-charger.txt b/bindings/power/supply/qcom/smb1398-charger.txt new file mode 100644 index 00000000..5f1588f6 --- /dev/null +++ b/bindings/power/supply/qcom/smb1398-charger.txt @@ -0,0 +1,106 @@ +Qualcomm Technologies, Inc. SMB1398 Charger Specific Bindings + +SMB1398 combo charge chip can be working in different modes: +(1) DIV2 charge pump mode to work as a companion charger that can be paired + with Qualcomm Technologies, Inc. family of standalone chargers; +(2) DIV2 and 3-level buck combo mode to regulate output power from wireless + charger receiver and provide input power for downstream chargers. + +======================= +Required Node Structure +======================= + +SMB1398 Charger must be described in two levels of device nodes. + +================================== +First Level Node - SMB1398 Charger +================================== + +Charger specific properties: +- compatible + Usage: required + Value type: + Definition: "qcom,smb1396-div2-cp-master" for SMB1396 working in DIV2 + mode as a companion master charger. + "qcom,smb1396-div2-cp-slave" for SMB1396 working in DIV2 + mode as a companion slave charger. + "qcom,smb1398-pre-regulator" for SMB1398 working in combo + mode (auto transition between DIV2 CP and 3-level buck) as a + pre-regulator stand between wireless receiver and downstream + chargers. + +- interrupts + Usage: optional + Value type: + Definition: Peripheral interrupt specifier. This is required when SMB1396 + working as a DIV2 CP master. + +- interrupt-names + Usage: optional + Value type: + Definition: Interrupt names. This list must match up 1-to-1 with the + interrupts specified in the 'interrupts' property. This is + required when SMB1396 working as a DIV2 CP master. + +- io-channels +- io-channel-names + Usage: optional + Value type: + Definition: The IIO channel for measuring SMB1398 die temperature, + io-channel-names should be "die-temp". For other details about + IIO bindings see: + Documentation/devicetree/bindings/iio/iio-bindings.txt + These properties are required when SMB1396 working as a DIV2 CP + master. + +- qcom,div2-cp-min-ilim-ua + Usage: optional + Value type: + Definition: The minimum ILIM settings to enable SMB1398 working in DIV2 mode. + The switcher is disabled when ILIM is below this value. + If this values is not specified, the default minimum ILIM is 1A. + This is only applicable when SMB1396 working as a DIV2 CP master. + +- qcom,max-cutoff-soc + Usage: optional + Value type: + Definition: SOC beyond which SMB1398 is kept disabled. + If this value is not specified then default value is 85%. + This is only applicable when SMB1396 working as a DIV2 CP master. + +- qcom,ilim-ua-disable-slave + Usage: optional + Value type: + Definition: The minimum ILIM setting to disable slave CP after hitting taper. + If this value is not specified, the default value is 3 times of + "qcom,div2-cp-min-ilim-ua". This is only applicable when both + SMB1396 DIV2 CP master and slave are present. + +Peripheral specific properties: +======= +Example +======= + +smb1398_charger: qcom,combo_charger { + compatible = "qcom,smb1396-div2-cp-master"; + interrupt-parent = <&smb1398>; + status = "disabled"; + + io-channels = <&pm8150b_vadc ADC_AMUX_THM2>; + io-channel-names = "die_temp"; + + interrupts = <0x26 0x1 IRQ_TYPE_EDGE_RISING>, + <0x26 0x3 IRQ_TYPE_EDGE_RISING>, + <0x26 0x5 IRQ_TYPE_EDGE_RISING>, + <0x26 0x7 IRQ_TYPE_EDGE_RISING>, + <0x27 0x5 IRQ_TYPE_EDGE_RISING>, + <0x27 0x6 IRQ_TYPE_EDGE_RISING>, + <0x27 0x7 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "temp-shdwn", + "div2-irev", + "usbin-uv", + "usbin-ov", + "div2-ilim", + "div2-win-uv", + "div2-win-ov"; +};