/openbmc/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | mediatek,mt6370-charger.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: MediaTek MT6370 Battery Charger 10 - ChiaEn Wu <chiaen_wu@richtek.com> 14 Provides Battery Charger, Boost for OTG devices and BC1.2 detection. 18 const: mediatek,mt6370-charger 22 Specify what irqs are needed to be handled by MT6370 Charger driver. 23 We need to use the IRQ "MT6370_IRQ_OVPCTRL_UVP_D" to know when USB [all …]
|
H A D | bq2415x.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: TI bq2415x Li-Ion Charger 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 19 - ti,bq24150 20 - ti,bq24150a 21 - ti,bq24151 22 - ti,bq24151a [all …]
|
H A D | mt6360_charger.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Battery charger driver for MT6360 PMIC from MediaTek Integrated. 10 - Gene Chen <gene_chen@richtek.com> 14 Provides Battery Charger, Boost for OTG devices and BC1.2 detection. 18 const: mediatek,mt6360-chg 20 richtek,vinovp-microvolt: 25 usb-otg-vbus-regulator: 32 - compatible [all …]
|
H A D | isp1704.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: NXP ISP1704 USB Charger Detection 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 20 nxp,enable-gpio: 24 usb-phy: 26 description: USB PHY the ISP1704 is connected to 29 - compatible [all …]
|
H A D | bq24257.yaml | 1 # SPDX-License-Identifier: GPL-2.0 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Bq24250, bq24251 and bq24257 Li-Ion Charger 11 - Sebastian Reichel <sre@kernel.org> 14 - $ref: power-supply.yaml# 19 - ti,bq24250 20 - ti,bq24251 21 - ti,bq24257 29 ti,battery-regulation-voltage: [all …]
|
H A D | richtek,rt9471.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Richtek RT9471 3A Single Cell Switching Battery charger 10 - Alina Yu <alina_yu@richtek.com> 11 - ChiYuan Huang <cy_huang@richtek.com> 14 RT9471 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for 15 portable applications. It supports USB BC1.2 port detection, current and 19 https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf 28 charge-enable-gpios: [all …]
|
H A D | richtek,rt9467.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Richtek RT9467 Switching Battery Charger with Power Path Management 10 - ChiYuan Huang <cy_huang@richtek.com> 11 - ChiaEn Wu <chiaen_wu@richtek.com> 14 RT9467 is a switch-mode single cell Li-Ion/Li-Polymer battery charger for 16 MOSFETs, input current sensing and regulation, high-accuracy voltage 20 The RT9467 also features USB On-The-Go (OTG) support. It also integrates 21 D+/D- pin for USB host/charging port detection. [all …]
|
/openbmc/linux/drivers/power/supply/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 6 power supply (batteries, AC, USB) monitoring by userspace 51 which include a battery charger and a boost converter. 54 tristate "MAX8925 battery charger support" 57 Say Y here to enable support for the battery charger in the Maxim 61 tristate "WM831X backup battery charger support" 64 Say Y here to enable support for the backup battery charger 93 tristate "ADP5061 battery charger driver" 98 charger. 104 tristate "Active-semi ACT8945A charger driver" [all …]
|
H A D | isp1704_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ISP1704 USB Charger Detection driver 6 * Copyright (C) 2012 - 2013 Pali Rohár <pali@kernel.org> 22 #include <linux/usb/otg.h> 23 #include <linux/usb/ulpi.h> 24 #include <linux/usb/ch9.h> 25 #include <linux/usb/gadget.h> 63 return usb_phy_io_read(isp->phy, reg); in isp1704_read() 68 return usb_phy_io_write(isp->phy, val, reg); in isp1704_write() 73 gpiod_set_value(isp->enable_gpio, on); in isp1704_charger_set_power() [all …]
|
H A D | max8925_power.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 2009-2010 Marvell International Ltd. 69 struct power_supply *usb; member 87 struct max8925_chip *chip = info->chip; in __set_charger() 89 /* enable charger in platform */ in __set_charger() 90 if (info->set_charger) in __set_charger() 91 info->set_charger(1); in __set_charger() 92 /* enable charger */ in __set_charger() 93 max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 1 << 7, 0); in __set_charger() 96 max8925_set_bits(info->gpm, MAX8925_CHG_CNTL1, 1 << 7, 1 << 7); in __set_charger() [all …]
|
H A D | ab8500_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 5 * Charger driver for AB8500 32 #include <linux/usb/otg.h> 36 #include "ab8500-bm.h" 37 #include "ab8500-chargalg.h" 39 /* Charger constants */ 94 /* Lowest charger voltage is 3.39V -> 0x4E */ 107 /*External charger control*/ 112 /* UsbLineStatus register - usb types */ [all …]
|
H A D | axp288_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * axp288_charger.c - X-power AXP288 PMIC Charger driver 5 * Copyright (C) 2016-2017 Hans de Goede <hdegoede@redhat.com> 18 #include <linux/usb/otg.h> 134 /* SDP/CDP/DCP USB charging cable notifications */ 160 else if (cc > info->max_cc) in axp288_charger_set_cc() 161 cc = info->max_cc; in axp288_charger_set_cc() 163 reg_val = (cc - CHRG_CCCV_CC_OFFSET) / CHRG_CCCV_CC_LSB_RES; in axp288_charger_set_cc() 167 ret = regmap_update_bits(info->regmap, in axp288_charger_set_cc() 171 info->cc = cc; in axp288_charger_set_cc() [all …]
|
H A D | max14577_charger.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // max14577_charger.c - Battery charger driver for the Maxim 14577/77836 11 #include <linux/mfd/max14577-private.h> 17 struct power_supply *charger; member 49 struct regmap *rmap = chg->max14577->regmap; in max14577_get_charger_state() 55 * - CHGCTRL2/MBCHOSTEN == 1 in max14577_get_charger_state() 56 * - STATUS2/CGMBC == 1 in max14577_get_charger_state() 59 * - handle FULL after Top-off timer (EOC register may be off in max14577_get_charger_state() 60 * and the charger won't be charging although MBCHOSTEN is on) in max14577_get_charger_state() 61 * - handle properly dead-battery charging (respect timer) in max14577_get_charger_state() [all …]
|
/openbmc/linux/drivers/phy/ti/ |
H A D | phy-tusb1210.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * tusb1210.c - TUSB1210 USB ULPI PHY driver 42 /* TUSB1210 charger detection work states */ 75 ret = ulpi_write(tusb->ulpi, reg, val); in tusb1210_ulpi_write() 77 dev_err(&tusb->ulpi->dev, "error %d writing val 0x%02x to reg 0x%02x\n", in tusb1210_ulpi_write() 87 ret = ulpi_read(tusb->ulpi, reg); in tusb1210_ulpi_read() 92 dev_err(&tusb->ulpi->dev, "error %d reading reg 0x%02x\n", ret, reg); in tusb1210_ulpi_read() 102 gpiod_set_value_cansleep(tusb->gpio_reset, 1); in tusb1210_power_on() 103 gpiod_set_value_cansleep(tusb->gpio_cs, 1); in tusb1210_power_on() 108 tusb1210_ulpi_write(tusb, TUSB1210_VENDOR_SPECIFIC2, tusb->vendor_specific2); in tusb1210_power_on() [all …]
|
/openbmc/linux/drivers/extcon/ |
H A D | extcon-axp288.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * extcon-axp288.c - X-Power AXP288 PMIC extcon cable detection driver 5 * Copyright (c) 2017-2018 Hans de Goede <hdegoede@redhat.com> 19 #include <linux/extcon-provider.h> 22 #include <linux/usb/role.h> 26 #include <asm/intel-family.h> 53 /* BC USB status register */ 118 "Last wake caused by a charger insertion", 137 ret = regmap_read(info->regmap, AXP288_PS_BOOT_REASON_REG, &val); in axp288_extcon_log_rsi() 139 dev_err(info->dev, "failed to read reset source indicator\n"); in axp288_extcon_log_rsi() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 11 host USB ports. Many of 30-pin connectors including PDMI are 25 tristate "X-Power AXP288 EXTCON support" 29 Say Y here to enable support for USB peripheral detection 30 and USB MUX switching by X-Power AXP288 PMIC. 39 FSA9480 microUSB switch and accessory detector chip. The FSA9480 is a USB 41 I2C and enables USB data, stereo and mono audio, video, microphone 55 Say Y here to enable extcon support for USB OTG ports controlled by 68 Say Y here to enable extcon support for charger detection / control 75 Say Y here to enable extcon support for charger detection / control [all …]
|
H A D | extcon-intel-cht-wc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Extcon charger detection driver for Intel Cherrytrail Whiskey Cove PMIC 7 * Copyright (C) 2013-2015 Intel Corporation. All rights reserved. 10 #include <linux/extcon-provider.h> 22 #include <linux/usb/role.h> 24 #include "extcon-intel.h" 67 /* 0 - open drain, 1 - regular push-pull output */ 69 /* 0 - pin is controlled by SW, 1 - by HW */ 125 * According to the spec. we should read the USB-ID pin ADC value here in cht_wc_extcon_get_id() 126 * to determine the resistance of the used pull-down resister and then in cht_wc_extcon_get_id() [all …]
|
/openbmc/linux/drivers/usb/common/ |
H A D | usb-conn-gpio.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * USB GPIO Based Connection Detection Driver 9 * Some code borrowed from drivers/extcon/extcon-usb-gpio.c 22 #include <linux/usb/role.h> 44 struct power_supply *charger; member 55 * ------------------------------------ 62 * - VBUS only - we want to distinguish between [1] and [2], so ID is always 1 63 * - ID only - we want to distinguish between [1] and [4], so VBUS = ID 75 id = info->id_gpiod ? in usb_conn_detect_cable() 76 gpiod_get_value_cansleep(info->id_gpiod) : 1; in usb_conn_detect_cable() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 8 bool "USB LED Triggers" 11 This option adds LED triggers for USB host and/or gadget activity. 13 Say Y here if you are working on a system with led-class supported 14 LEDs and you want to use them as activity indicators for USB host or 18 tristate "USB ULPI PHY interface support" 22 USB 2.0 PHY interface. The ULPI specification defines a standard set 27 The ULPI interfaces (the buses) are registered by the drivers for USB 33 protocol) and USB charger detection. 39 tristate "USB GPIO Based Connection Detection Driver" [all …]
|
/openbmc/linux/include/linux/usb/ |
H A D | phy.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * USB PHY defines 5 * These APIs may be used between USB controllers. USB device drivers 15 #include <linux/usb.h> 16 #include <uapi/linux/usb/charger.h> 31 USB_EVENT_CHARGER, /* usb dedicated charger */ 46 /* single-role peripheral, and dual-role default-b */ 51 /* extra dual-role default-b states */ 55 /* dual-role default-a */ 109 /* Support USB charger */ [all …]
|
H A D | tcpm.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Copyright 2015-2017 Google, Inc 10 #include <linux/usb/typec.h> 54 #define TCPC_MUX_USB_ENABLED BIT(0) /* USB enabled */ 59 * struct tcpc_dev - Port configuration and callback functions 64 * and cc=Rp-def. This allows the tcpm to provide a fallback 65 * current-limit detection method for the cc=Rp-def case. 66 * For example, some tcpcs may include BC1.2 charger detection 82 * Optional; if supported by hardware, called to start dual-role 83 * toggling or single-role connection detection. Toggling stops [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/mfd/ |
H A D | stericsson,ab8500.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: ST-Ericsson Analog Baseband AB8500 and AB8505 10 - Linus Walleij <linus.walleij@linaro.org> 13 the AB8500 "Analog Baseband" is the mixed-signals integrated circuit 14 handling power management (regulators), analog-to-digital conversion 15 (ADC), battery charging, fuel gauging of the battery, battery-backed 16 RTC, PWM, USB PHY and some GPIO lines in the ST-Ericsson U8500 platforms 20 AB8505 also exist, the difference in AB8505 is that some of the USB and [all …]
|
H A D | ricoh,rn5t618.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Andreas Kemnade <andreas@kemnade.info> 14 integrates 3 to 5 step-down DCDC converters, 7 to 10 low-dropout regulators, 16 The RN5T618/RC5T619 provides additionally a Li-ion battery charger, 18 The RC5T619 additionally includes USB charger detection and an RTC. 21 - if: 30 "^(DCDC[1-4]|LDO[1-5]|LDORTC[12])$": 33 - if: [all …]
|
/openbmc/linux/drivers/phy/rockchip/ |
H A D | phy-rockchip-inno-usb2.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include <linux/clk-provider.h> 11 #include <linux/extcon-provider.h> 29 #include <linux/usb/of.h> 30 #include <linux/usb/otg.h> 52 * enum usb_chg_state - Different states involved in USB charger detection. 53 * @USB_CHG_STATE_UNDEFINED: USB charger is not connected or detection 57 * @USB_CHG_STATE_PRIMARY_DONE: Primary detection is completed (Detects 59 * @USB_CHG_STATE_SECONDARY_DONE: Secondary detection is completed (Detects 61 * @USB_CHG_STATE_DETECTED: USB charger type is determined. [all …]
|
/openbmc/u-boot/doc/ |
H A D | README.power-framework | 5 # SPDX-License-Identifier: GPL-2.0+ 9 ------------ 11 This document describes the second version of the u-boot's PMIC (Power 16 ---------- 18 Boards supported by u-boot are getting increasingly complex. Developers and 20 devices are now available on the board - namely power managers (PMIC), fuel 21 gauges (FG), micro USB interface controllers (MUIC), batteries, multi-function 25 ----------------------------------- 28 The same device - e.g. MAX8997 uses two different I2C busses and addresses. 36 one operation - e.g. PMIC enables LDO. [all …]
|