Loading Documentation/devicetree/bindings/power/supply/qcom/smb1355-charger.txt 0 → 100644 +107 −0 Original line number Diff line number Diff line Qualcomm Technologies, Inc. SMB1355 Charger Specific Bindings SMB1355 slave charger is paired with QTI family of standalone chargers to enable a high current, low profile Li+ battery charging system. The device provides 28V DC withstand, wide operating input range of 3.8 to 14.2V for standard 5V USB inputs as well as a wide variety of HVDCP Travel Adapters and is compatible with QTI's Quick Charge technology. ======================= Required Node Structure ======================= SMB1355 Charger must be described in two levels of device nodes. ================================== First Level Node - SMB1355 Charger ================================== Charger specific properties: - compatible Usage: required Value type: <string> Definition: "qcom,smb1355". - qcom,pmic-revid Usage: required Value type: phandle Definition: Should specify the phandle of SMB's revid module. This is used to identify the SMB subtype. - qcom,disable-ctm Usage: optional Value type: <empty> Definition: boolean flag. Usually a thermistor near usb/typeC connector is connected to AUX. Set this flag to indicate the thermistor doesn't exist. - qcom,parallel-mode Usage: optional Value type: <u32> Definition: Specifies parallel charging mode. If not specified, MID-MID option is selected by default. - qcom,stacked-batfet Usage: optional Value type: <empty> Definition: boolean flag. Specifies if parallel charger has stacked BATFET configuration. In stacked batfet the main and parallel charger's batfet are stacked one after the other and thus all the charge current (FCC) flows through main. In a non-stacked configuration each charger controls the charge current (FCC) separately. - qcom,die-temp-threshold-degc Usage: optional Value type: <u32> Definition: Specifies DIE temp threshold beyond which h/w starts mitigation. If not sepcified, 90 degrees centigrade is used. - qcom,hw-die-temp-mitigation Usage: optional Value type: bool Definition: Boolean property to enable h/w controlled die temp mitigation. ================================================ Second Level Nodes - SMB1355 Charger Peripherals ================================================ Peripheral specific properties: - reg Usage: required Value type: <prop-encoded-array> Definition: Address and size of the peripheral's register block. - interrupts Usage: required Value type: <prop-encoded-array> Definition: Peripheral interrupt specifier. - interrupt-names Usage: required Value type: <stringlist> Definition: Interrupt names. This list must match up 1-to-1 with the interrupts specified in the 'interrupts' property. ======= Example ======= smb1355_charger: qcom,smb1355-charger { compatible = "qcom,smb1355"; #address-cells = <1>; #size-cells = <1>; qcom,chgr@1000 { reg = <0x1000 0x100>; interrupts = <0x10 0x1 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "chg-state-change"; }; qcom,chgr-misc@1600 { reg = <0x1600 0x100>; interrupts = <0x16 0x1 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "wdog-bark"; }; }; Documentation/devicetree/bindings/power/supply/qcom/smb1390-charger-psy.txt 0 → 100644 +76 −0 Original line number Diff line number Diff line Qualcomm Technologies, Inc. SMB1390 Charger Specific Bindings SMB1390 charge pump is paired with QTI family of standalone chargers to enable a high current, high efficiency Li+ battery charging system. ======================= Required Node Structure ======================= SMB1390 Charger must be described in two levels of device nodes. ================================== First Level Node - SMB1390 Charger ================================== Charger specific properties: - compatible Usage: required Value type: <string> Definition: "qcom,smb1390-charger-psy". - qcom,pmic-revid Usage: required Value type: phandle Definition: Should specify the phandle of SMB's revid module. This is used to identify the SMB subtype. - io-channels - io-channel-names Usage: required Value type: <phandle> Definition: For details about IIO bindings see: Documentation/devicetree/bindings/iio/iio-bindings.txt ================================================ Second Level Nodes - SMB1390 Charger Peripherals ================================================ Peripheral specific properties: - interrupts Usage: required Value type: <prop-encoded-array> Definition: Peripheral interrupt specifier. - interrupt-names Usage: required Value type: <stringlist> Definition: Interrupt names. This list must match up 1-to-1 with the interrupts specified in the 'interrupts' property. ======= Example ======= smb1390_charger: qcom,charge_pump { compatible = "qcom,smb1390-charger-psy"; qcom,pmic-revid = <&smb1390_revid>; interrupt-parent = <&smb1390>; status = "disabled"; io-channels = <&pm8150b_vadc ADC_AMUX_THM2>; io-channel-names = "cp_die_temp"; qcom,core { interrupts = <0x10 0x0 IRQ_TYPE_EDGE_RISING>, <0x10 0x1 IRQ_TYPE_EDGE_RISING>, <0x10 0x2 IRQ_TYPE_EDGE_RISING>, <0x10 0x3 IRQ_TYPE_EDGE_RISING>, <0x10 0x4 IRQ_TYPE_EDGE_RISING>; interrupt-names = "switcher-off-window", "switcher-off-fault", "vph-ov-soft", "ilim", "temp-alarm"; }; }; drivers/power/supply/power_supply_sysfs.c +11 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ static const char * const power_supply_type_text[] = { "USB_PD", "USB_PD_DRP", "BrickID", "USB_HVDCP", "USB_HVDCP_3", "Wireless", "USB_FLOAT", "BMS", "Parallel", "Main", "Wipower", "USB_C_UFP", "USB_C_DFP", "Charge_Pump", }; static const char * const power_supply_usb_type_text[] = { Loading Loading @@ -445,6 +446,16 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(fcc_stepper_enable), POWER_SUPPLY_ATTR(toggle_stat), POWER_SUPPLY_ATTR(main_fcc_max), /* Charge pump properties */ POWER_SUPPLY_ATTR(cp_status1), POWER_SUPPLY_ATTR(cp_status2), POWER_SUPPLY_ATTR(cp_enable), POWER_SUPPLY_ATTR(cp_switcher_en), POWER_SUPPLY_ATTR(cp_die_temp), POWER_SUPPLY_ATTR(cp_isns), POWER_SUPPLY_ATTR(cp_toggle_switcher), POWER_SUPPLY_ATTR(cp_irq_status), POWER_SUPPLY_ATTR(cp_ilim), /* Local extensions of type int64_t */ POWER_SUPPLY_ATTR(charge_counter_ext), /* Properties of type `const char *' */ Loading drivers/power/supply/qcom/Kconfig +12 −0 Original line number Diff line number Diff line Loading @@ -15,4 +15,16 @@ config QPNP_SMB5 VBUS and VCONN regulators are registered for supporting OTG, and powered Type-C cables respectively. config SMB1390_CHARGE_PUMP_PSY tristate "SMB1390 power supply framework based driver" depends on MFD_I2C_PMIC help Say Y to include support for SMB1390 Charge Pump driver based on power supply framework. SMB1390 is a div2 charge pump capable of delivering 6A charge current with very high efficiency. It can work either as 2s to 1s pre-regulator or as a companion charger when paired with Qualcomm Technologies, Inc.’s family of standalone chargers to enable a high current, low profile Li+ battery charging system. endmenu drivers/power/supply/qcom/Makefile +1 −0 Original line number Diff line number Diff line # SPDX-License-Identifier: GPL-2.0 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_PSY) += smb1390-charger-psy.o pmic-voter.o Loading
Documentation/devicetree/bindings/power/supply/qcom/smb1355-charger.txt 0 → 100644 +107 −0 Original line number Diff line number Diff line Qualcomm Technologies, Inc. SMB1355 Charger Specific Bindings SMB1355 slave charger is paired with QTI family of standalone chargers to enable a high current, low profile Li+ battery charging system. The device provides 28V DC withstand, wide operating input range of 3.8 to 14.2V for standard 5V USB inputs as well as a wide variety of HVDCP Travel Adapters and is compatible with QTI's Quick Charge technology. ======================= Required Node Structure ======================= SMB1355 Charger must be described in two levels of device nodes. ================================== First Level Node - SMB1355 Charger ================================== Charger specific properties: - compatible Usage: required Value type: <string> Definition: "qcom,smb1355". - qcom,pmic-revid Usage: required Value type: phandle Definition: Should specify the phandle of SMB's revid module. This is used to identify the SMB subtype. - qcom,disable-ctm Usage: optional Value type: <empty> Definition: boolean flag. Usually a thermistor near usb/typeC connector is connected to AUX. Set this flag to indicate the thermistor doesn't exist. - qcom,parallel-mode Usage: optional Value type: <u32> Definition: Specifies parallel charging mode. If not specified, MID-MID option is selected by default. - qcom,stacked-batfet Usage: optional Value type: <empty> Definition: boolean flag. Specifies if parallel charger has stacked BATFET configuration. In stacked batfet the main and parallel charger's batfet are stacked one after the other and thus all the charge current (FCC) flows through main. In a non-stacked configuration each charger controls the charge current (FCC) separately. - qcom,die-temp-threshold-degc Usage: optional Value type: <u32> Definition: Specifies DIE temp threshold beyond which h/w starts mitigation. If not sepcified, 90 degrees centigrade is used. - qcom,hw-die-temp-mitigation Usage: optional Value type: bool Definition: Boolean property to enable h/w controlled die temp mitigation. ================================================ Second Level Nodes - SMB1355 Charger Peripherals ================================================ Peripheral specific properties: - reg Usage: required Value type: <prop-encoded-array> Definition: Address and size of the peripheral's register block. - interrupts Usage: required Value type: <prop-encoded-array> Definition: Peripheral interrupt specifier. - interrupt-names Usage: required Value type: <stringlist> Definition: Interrupt names. This list must match up 1-to-1 with the interrupts specified in the 'interrupts' property. ======= Example ======= smb1355_charger: qcom,smb1355-charger { compatible = "qcom,smb1355"; #address-cells = <1>; #size-cells = <1>; qcom,chgr@1000 { reg = <0x1000 0x100>; interrupts = <0x10 0x1 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "chg-state-change"; }; qcom,chgr-misc@1600 { reg = <0x1600 0x100>; interrupts = <0x16 0x1 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "wdog-bark"; }; };
Documentation/devicetree/bindings/power/supply/qcom/smb1390-charger-psy.txt 0 → 100644 +76 −0 Original line number Diff line number Diff line Qualcomm Technologies, Inc. SMB1390 Charger Specific Bindings SMB1390 charge pump is paired with QTI family of standalone chargers to enable a high current, high efficiency Li+ battery charging system. ======================= Required Node Structure ======================= SMB1390 Charger must be described in two levels of device nodes. ================================== First Level Node - SMB1390 Charger ================================== Charger specific properties: - compatible Usage: required Value type: <string> Definition: "qcom,smb1390-charger-psy". - qcom,pmic-revid Usage: required Value type: phandle Definition: Should specify the phandle of SMB's revid module. This is used to identify the SMB subtype. - io-channels - io-channel-names Usage: required Value type: <phandle> Definition: For details about IIO bindings see: Documentation/devicetree/bindings/iio/iio-bindings.txt ================================================ Second Level Nodes - SMB1390 Charger Peripherals ================================================ Peripheral specific properties: - interrupts Usage: required Value type: <prop-encoded-array> Definition: Peripheral interrupt specifier. - interrupt-names Usage: required Value type: <stringlist> Definition: Interrupt names. This list must match up 1-to-1 with the interrupts specified in the 'interrupts' property. ======= Example ======= smb1390_charger: qcom,charge_pump { compatible = "qcom,smb1390-charger-psy"; qcom,pmic-revid = <&smb1390_revid>; interrupt-parent = <&smb1390>; status = "disabled"; io-channels = <&pm8150b_vadc ADC_AMUX_THM2>; io-channel-names = "cp_die_temp"; qcom,core { interrupts = <0x10 0x0 IRQ_TYPE_EDGE_RISING>, <0x10 0x1 IRQ_TYPE_EDGE_RISING>, <0x10 0x2 IRQ_TYPE_EDGE_RISING>, <0x10 0x3 IRQ_TYPE_EDGE_RISING>, <0x10 0x4 IRQ_TYPE_EDGE_RISING>; interrupt-names = "switcher-off-window", "switcher-off-fault", "vph-ov-soft", "ilim", "temp-alarm"; }; };
drivers/power/supply/power_supply_sysfs.c +11 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ static const char * const power_supply_type_text[] = { "USB_PD", "USB_PD_DRP", "BrickID", "USB_HVDCP", "USB_HVDCP_3", "Wireless", "USB_FLOAT", "BMS", "Parallel", "Main", "Wipower", "USB_C_UFP", "USB_C_DFP", "Charge_Pump", }; static const char * const power_supply_usb_type_text[] = { Loading Loading @@ -445,6 +446,16 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(fcc_stepper_enable), POWER_SUPPLY_ATTR(toggle_stat), POWER_SUPPLY_ATTR(main_fcc_max), /* Charge pump properties */ POWER_SUPPLY_ATTR(cp_status1), POWER_SUPPLY_ATTR(cp_status2), POWER_SUPPLY_ATTR(cp_enable), POWER_SUPPLY_ATTR(cp_switcher_en), POWER_SUPPLY_ATTR(cp_die_temp), POWER_SUPPLY_ATTR(cp_isns), POWER_SUPPLY_ATTR(cp_toggle_switcher), POWER_SUPPLY_ATTR(cp_irq_status), POWER_SUPPLY_ATTR(cp_ilim), /* Local extensions of type int64_t */ POWER_SUPPLY_ATTR(charge_counter_ext), /* Properties of type `const char *' */ Loading
drivers/power/supply/qcom/Kconfig +12 −0 Original line number Diff line number Diff line Loading @@ -15,4 +15,16 @@ config QPNP_SMB5 VBUS and VCONN regulators are registered for supporting OTG, and powered Type-C cables respectively. config SMB1390_CHARGE_PUMP_PSY tristate "SMB1390 power supply framework based driver" depends on MFD_I2C_PMIC help Say Y to include support for SMB1390 Charge Pump driver based on power supply framework. SMB1390 is a div2 charge pump capable of delivering 6A charge current with very high efficiency. It can work either as 2s to 1s pre-regulator or as a companion charger when paired with Qualcomm Technologies, Inc.’s family of standalone chargers to enable a high current, low profile Li+ battery charging system. endmenu
drivers/power/supply/qcom/Makefile +1 −0 Original line number Diff line number Diff line # SPDX-License-Identifier: GPL-2.0 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_PSY) += smb1390-charger-psy.o pmic-voter.o