/openbmc/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | summit,smb347-charger.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/power/supply/summit,smb347-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - David Heidelberg <david@ixit.cz> 11 - Dmitry Osipenko <digetx@gmail.com> 16 - summit,smb345 17 - summit,smb347 18 - summit,smb358 26 monitored-battery: [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# 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. 24 https://www.richtek.com/assets/product_file/RT9467/DS9467-01.pdf [all …]
|
H A D | qcom,pm8941-charger.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/qcom,pm8941-charger.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Qualcomm Switch-Mode Battery Charger and Boost 10 - Sebastian Reichel <sre@kernel.org> 15 - qcom,pm8226-charger 16 - qcom,pm8941-charger 23 - description: charge done 24 - description: charge fast mode [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# 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 16 voltage regulations in both charging and boost mode. 19 https://www.richtek.com/assets/product_file/RT9471=RT9471D/DS9471D-02.pdf 28 charge-enable-gpios: 29 description: GPIO used to turn on and off charging. [all …]
|
/openbmc/linux/drivers/power/supply/ |
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> 126 /* OTG/Host mode */ 132 } otg; member 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() [all …]
|
H A D | smb347-charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 #include <dt-bindings/power/summit,smb347-charger.h> 26 #define SMB3XX_SOFT_TEMP_COMPENSATE_DEFAULT -1 29 #define SMB3XX_TEMP_USE_DEFAULT -273 34 * reloaded from non-volatile registers after POR. 136 * struct smb347_charger - smb347 charger instance 149 * @pre_charge_current: current (in uA) to use in pre-charging phase 151 * charging cycle terminates 153 * pre-charge to fast charge mode 158 * current [%100 - %130] (in degree C) [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 5 Say Y here to enable power supply class support. This allows 15 Say Y here to enable debugging messages for power supply class 35 Say Y here to enable support APM status emulation using 42 Say Y here to enable support for the generic battery driver 57 Say Y here to enable support for the battery charger in the Maxim 64 Say Y here to enable support for the backup battery charger 71 Say Y here to enable support for the power management unit 78 Say Y here to enable support for the power management unit 90 Say Y here to enable battery monitor for Marvell 88PM860x chip. [all …]
|
H A D | isp1704_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 2012 - 2013 Pali Rohár <pali@kernel.org> 22 #include <linux/usb/otg.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() 77 * Determine is the charging port DCP (dedicated charger) or CDP (Host/HUB 80 * REVISIT: The method is defined in Battery Charging Specification and is 103 /* Enable strong pull-up on DP (1.5K) and reset */ in isp1704_charger_type() 138 /* Clear the DP and DM pull-down bits */ in isp1704_charger_verify() [all …]
|
H A D | qcom_smbb.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * This driver is for the multi-block Switch-Mode Battery Charger and Boost 6 * integrated, single-cell lithium-ion battery charger. 8 * Sub-components: 9 * - Charger core 10 * - Buck 11 * - DC charge-path 12 * - USB charge-path 13 * - Battery interface 14 * - Boost (not implemented) [all …]
|
H A D | twl4030_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 #include <linux/usb/otg.h> 73 #define TWL4030_ICHGEOC BIT(4) /* Battery current end-of-charge */ 132 int usb_mode, ac_mode; /* charging mode requested */ 207 * CGAIN == 0: ICHG = (BCIICHG * 1.7) / (2^10 - 1) - 0.85 208 * CGAIN == 1: ICHG = (BCIICHG * 3.4) / (2^10 - 1) - 1.7 210 * CGAIN == 0: val * 1.6618 - 0.85 * 1000 211 * CGAIN == 1: (val * 1.6618 - 0.85 * 1000) * 2 219 return (regval * 16618 - 8500 * 1000) / 5; in regval2ua() 221 return (regval * 16618 - 8500 * 1000) / 10; in regval2ua() [all …]
|
H A D | ab8500_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 32 #include <linux/usb/otg.h> 36 #include "ab8500-bm.h" 37 #include "ab8500-chargalg.h" 94 /* Lowest charger voltage is 3.39V -> 0x4E */ 112 /* UsbLineStatus register - usb types */ 174 * struct ab8500_charger_interrupts - ab8500 interrupts 218 * struct ab8500_charger - ab8500 Charger device information 359 dev_dbg(di->dev, "SW Fallback: %d\n", fallback); in ab8500_enable_disable_sw_fallback() [all …]
|
H A D | bq25890_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 90 u8 ilim_en; /* enable ILIM pin */ 113 char name[28]; /* "bq25890-charger-%d" */ 272 * Most of the val -> idx conversions can be computed, given the minimum, 322 0, -10, -20, -30, -40, -60, -70, -80, 323 -90, -10, -120, -140, -150, -170, -190, -210, 367 ret = regmap_field_read(bq->rmap_fields[field_id], &val); in bq25890_field_read() 377 return regmap_field_write(bq->rmap_fields[field_id], val); in bq25890_field_write() 394 rtbl_size = (rtbl->max - rtbl->min) / rtbl->step + 1; in bq25890_find_idx() 397 idx < rtbl_size && (idx * rtbl->step + rtbl->min <= value); in bq25890_find_idx() [all …]
|
H A D | mt6360_charger.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/devm-helpers.h> 170 ret = regmap_read(mci->regmap, MT6360_PMU_FOD_STAT, ®val); in mt6360_get_chrdet_ext_stat() 186 val->intval = pwr_rdy ? true : false; in mt6360_charger_get_online() 205 ret = regmap_read(mci->regmap, MT6360_PMU_CHG_STAT, ®val); in mt6360_charger_get_status() 221 ret = -EIO; in mt6360_charger_get_status() 225 val->intval = status; in mt6360_charger_get_status() 236 ret = regmap_read(mci->regmap, MT6360_PMU_CHG_STAT, ®val); in mt6360_charger_get_charge_type() 248 case 0x00: /* Not Charging */ in mt6360_charger_get_charge_type() 256 val->intval = type; in mt6360_charger_get_charge_type() [all …]
|
H A D | rt9455_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 #define RT9455_DRIVER_NAME "rt9455-charger" 165 #define GET_MASK(fid) (BIT(rt9455_reg_fields[fid].msb + 1) - \ 169 * Each array initialised below shows the possible real-world values for a 171 * ascending order. The index of each real-world value represents the value 265 for (i = 0; i < tbl_size - 1; i++) in rt9455_find_idx() 269 return (tbl_size - 1); in rt9455_find_idx() 279 ret = regmap_field_read(info->regmap_fields[field], &v); in rt9455_get_field_val() 283 v = (v >= tbl_size) ? (tbl_size - 1) : v; in rt9455_get_field_val() 295 return regmap_field_write(info->regmap_fields[field], idx); in rt9455_set_field_val() [all …]
|
/openbmc/linux/drivers/usb/phy/ |
H A D | phy-fsl-usb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Jerry Huang <Chang-Ming.Huang@freescale.com> 32 #include "phy-fsl-usb.h" 43 #define DRIVER_DESC "Freescale USB OTG Transceiver Driver" 46 static const char driver_name[] = "fsl-usb2-otg"; 109 fsl_writel(temp, &usb_dr_regs->ulpiview); in write_ulpi() 113 /* -------------------------------------------------------------*/ 114 /* Operations that will be called from OTG Finite State Machine */ 121 tmp = fsl_readl(&usb_dr_regs->otgsc) & ~OTGSC_INTSTS_MASK; in fsl_otg_chrg_vbus() 124 /* stop discharging, start charging */ in fsl_otg_chrg_vbus() [all …]
|
H A D | phy-gpio-vbus-usb.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * gpio-vbus.c - simple GPIO VBUS sensing driver for B peripheral devices 20 #include <linux/usb/otg.h> 47 * some bouncing due to current surges (e.g. charging local capacitance) 60 struct regulator *vbus_draw = gpio_vbus->vbus_draw; in set_vbus_draw() 67 enabled = gpio_vbus->vbus_draw_enabled; in set_vbus_draw() 74 gpio_vbus->vbus_draw_enabled = 1; in set_vbus_draw() 81 gpio_vbus->vbus_draw_enabled = 0; in set_vbus_draw() 84 gpio_vbus->mA = mA; in set_vbus_draw() 89 return gpiod_get_value(gpio_vbus->vbus_gpiod); in is_vbus_powered() [all …]
|
H A D | phy-mxs-usb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2012-2014 Freescale Semiconductor, Inc. 12 #include <linux/usb/otg.h> 188 { .compatible = "fsl,imx6sx-usbphy", .data = &imx6sx_phy_data, }, 189 { .compatible = "fsl,imx6sl-usbphy", .data = &imx6sl_phy_data, }, 190 { .compatible = "fsl,imx6q-usbphy", .data = &imx6q_phy_data, }, 191 { .compatible = "fsl,imx23-usbphy", .data = &imx23_phy_data, }, 192 { .compatible = "fsl,vf610-usbphy", .data = &vf610_phy_data, }, 193 { .compatible = "fsl,imx6ul-usbphy", .data = &imx6ul_phy_data, }, 194 { .compatible = "fsl,imx7ulp-usbphy", .data = &imx7ulp_phy_data, }, [all …]
|
/openbmc/linux/arch/arm/boot/dts/rockchip/ |
H A D | rk3188-bqedison2qc.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 7 /dts-v1/; 8 #include <dt-bindings/i2c/i2c.h> 9 #include <dt-bindings/input/input.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 14 model = "BQ Edison2 Quad-Core"; 15 compatible = "mundoreader,bq-edison2qc", "rockchip,rk3188"; 29 compatible = "pwm-backlight"; 30 power-supply = <&vsys>; 34 gpio-keys { [all …]
|
/openbmc/linux/drivers/mfd/ |
H A D | tps65010.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * tps65010 - driver for tps6501x power management chips 6 * Copyright (C) 2004-2005 David Brownell 27 /*-------------------------------------------------------------------------*/ 37 /*-------------------------------------------------------------------------*/ 40 * voltage regulators, lithium ion/polymer battery charging, GPIOs, LEDs, 47 * battery-insert != device-on. 65 unsigned charging:1; member 84 /*-------------------------------------------------------------------------*/ 97 ? " (charging)" : ""), in dbg_chgstat() [all …]
|
/openbmc/linux/drivers/platform/x86/x86-android-tablets/ |
H A D | lenovo.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * Copyright (C) 2021-2023 Hans de Goede <hdegoede@redhat.com> 24 #include "shared-psy-info.h" 25 #include "x86-android-tablets.h" 30 * The Android kernels have a hack in the i915 driver to write a non-standard 31 * panel specific DSI register to set the duty-cycle of the LCD's PWM output. 44 PROPERTY_ENTRY_U32("hid-descr-addr", 0x0001), 45 PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 150), 54 * The HiDeep IST940E touchscreen comes up in I2C-HID mode. The native protocol 58 * PROPERTY_ENTRY_U32("hid-descr-addr", 0x0020), [all …]
|
/openbmc/linux/drivers/phy/ti/ |
H A D | phy-twl4030-usb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * twl4030_usb - TWL4030 USB transceiver, talking to OMAP OTG controller 5 * Copyright (C) 2004-2007 Texas Instruments 10 * - HS USB ULPI mode works. 11 * - 3-pin mode support may be added in future. 22 #include <linux/usb/otg.h> 138 * cable is present and we need to be runtime-enabled 175 /*-------------------------------------------------------------------------*/ 186 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n", in twl4030_i2c_write_u8_verify() 194 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n", in twl4030_i2c_write_u8_verify() [all …]
|
/openbmc/linux/drivers/usb/musb/ |
H A D | tusb6010.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * TUSB6010 USB 2.0 OTG Dual Role controller 9 * - Driver assumes that interface to external host (main CPU) is 27 #include <linux/dma-mapping.h> 36 struct gpio_desc *enable; member 51 void __iomem *tbase = musb->ctrl_base; in tusb_get_revision() 68 void __iomem *tbase = musb->ctrl_base; in tusb_print_revision() 71 rev = musb->tusb_revision; in tusb_print_revision() 96 * Workaround for spontaneous WBUS wake-up issue #2 for tusb3.0. 101 void __iomem *tbase = musb->ctrl_base; in tusb_wbus_quirk() [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> 30 #include <linux/usb/otg.h> 52 * enum usb_chg_state - Different states involved in USB charger detection. 87 unsigned int enable; member 91 * struct rockchip_chg_det_reg - usb charger detect registers 92 * @cp_det: charging port detected successfully. 93 * @dcp_det: dedicated charging port detected successfully. 117 * struct rockchip_usb2phy_port_cfg - usb-phy port configuration. [all …]
|
/openbmc/linux/arch/arm/boot/dts/ti/omap/ |
H A D | omap4-epson-embt2ws.dts | 1 // SPDX-License-Identifier: GPL-2.0-only 5 /dts-v1/; 7 #include <dt-bindings/input/input.h> 11 model = "Epson Moverio BT-200"; 19 backlight-left { 20 compatible = "pwm-backlight"; 22 power-supply = <&unknown_supply>; 25 backlight-right { 26 compatible = "pwm-backlight"; 28 power-supply = <&unknown_supply>; [all …]
|
/openbmc/linux/drivers/usb/chipidea/ |
H A D | usbmisc_imx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <linux/usb/otg.h> 81 /* HSIC enable */ 87 /* For imx6dql, it is host-only controller, for later imx6, it is otg's */ 105 /* The default DM/DP value is pull-down */ 147 /* It's called when we need to enable/disable usb wakeup */ 170 struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); in usbmisc_imx25_init() 174 if (data->index > 1) in usbmisc_imx25_init() 175 return -EINVAL; in usbmisc_imx25_init() 177 spin_lock_irqsave(&usbmisc->lock, flags); in usbmisc_imx25_init() [all …]
|