Loading Documentation/devicetree/bindings/power/supply/qcom/smb1398-charger.txt 0 → 100644 +106 −0 Original line number Diff line number Diff line 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: <string> 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: <prop-encoded-array> Definition: Peripheral interrupt specifier. This is required when SMB1396 working as a DIV2 CP master. - interrupt-names Usage: optional Value type: <stringlist> 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: <phandle> 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: <u32> 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: <u32> 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: <u32> 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"; }; drivers/power/supply/qcom/Kconfig +13 −0 Original line number Diff line number Diff line Loading @@ -120,4 +120,17 @@ config SMB1390_CHARGE_PUMP_PSY SMB1390 is a div2 charge pump capable of delivering 6A charge current with very high efficiency. config SMB1398_CHARGER tristate "SMB1398 power supply framework based driver" depends on MFD_I2C_PMIC help Say Y to include the support of SMB1398 Charge driver based on power supply framework. SMB1398 is a combo charger chip which can work in different modes: (1) DIV2 charge pump mode to work as a companion charger to be paired with Qualcomm Technologies, Inc.’s family of standalone chargers; (2) DIV2 and 3-level buck combo mode to regulate the output power from wireless charger receiver and provide the input for downstream chargers. endmenu drivers/power/supply/qcom/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,4 @@ obj-$(CONFIG_QPNP_QNOVO5) += qpnp-qnovo5.o battery.o obj-$(CONFIG_QPNP_SMB5) += step-chg-jeita.o battery.o qpnp-smb5.o smb5-lib.o pmic-voter.o storm-watch.o schgm-flash.o obj-$(CONFIG_SMB1390_CHARGE_PUMP) += smb1390-charger.o pmic-voter.o obj-$(CONFIG_SMB1390_CHARGE_PUMP_PSY) += smb1390-charger-psy.o pmic-voter.o obj-$(CONFIG_SMB1398_CHARGER) += smb1398-charger.o pmic-voter.o drivers/power/supply/qcom/smb1398-charger.c 0 → 100644 +2479 −0 File added.Preview size limit exceeded, changes collapsed. Show changes Loading
Documentation/devicetree/bindings/power/supply/qcom/smb1398-charger.txt 0 → 100644 +106 −0 Original line number Diff line number Diff line 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: <string> 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: <prop-encoded-array> Definition: Peripheral interrupt specifier. This is required when SMB1396 working as a DIV2 CP master. - interrupt-names Usage: optional Value type: <stringlist> 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: <phandle> 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: <u32> 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: <u32> 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: <u32> 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"; };
drivers/power/supply/qcom/Kconfig +13 −0 Original line number Diff line number Diff line Loading @@ -120,4 +120,17 @@ config SMB1390_CHARGE_PUMP_PSY SMB1390 is a div2 charge pump capable of delivering 6A charge current with very high efficiency. config SMB1398_CHARGER tristate "SMB1398 power supply framework based driver" depends on MFD_I2C_PMIC help Say Y to include the support of SMB1398 Charge driver based on power supply framework. SMB1398 is a combo charger chip which can work in different modes: (1) DIV2 charge pump mode to work as a companion charger to be paired with Qualcomm Technologies, Inc.’s family of standalone chargers; (2) DIV2 and 3-level buck combo mode to regulate the output power from wireless charger receiver and provide the input for downstream chargers. endmenu
drivers/power/supply/qcom/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,4 @@ obj-$(CONFIG_QPNP_QNOVO5) += qpnp-qnovo5.o battery.o obj-$(CONFIG_QPNP_SMB5) += step-chg-jeita.o battery.o qpnp-smb5.o smb5-lib.o pmic-voter.o storm-watch.o schgm-flash.o obj-$(CONFIG_SMB1390_CHARGE_PUMP) += smb1390-charger.o pmic-voter.o obj-$(CONFIG_SMB1390_CHARGE_PUMP_PSY) += smb1390-charger-psy.o pmic-voter.o obj-$(CONFIG_SMB1398_CHARGER) += smb1398-charger.o pmic-voter.o
drivers/power/supply/qcom/smb1398-charger.c 0 → 100644 +2479 −0 File added.Preview size limit exceeded, changes collapsed. Show changes