| /OK3568_Linux_fs/kernel/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 | qcom_smbb.txt | 1 Qualcomm Switch-Mode Battery Charger and Boost 4 - compatible: 8 - "qcom,pm8941-charger" 10 - reg: 12 Value type: <prop-encoded-array> 15 - interrupts: 17 Value type: <prop-encoded-array> 21 - charge done 22 - charge fast mode 23 - charge trickle mode [all …]
|
| /OK3568_Linux_fs/kernel/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> 122 /* OTG/Host mode */ 128 } otg; member 130 /* SDP/CDP/DCP USB charging cable notifications */ 150 else if (cc > info->max_cc) in axp288_charger_set_cc() 151 cc = info->max_cc; in axp288_charger_set_cc() 153 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. 132 * struct smb347_charger - smb347 charger instance 140 * @charging_enabled: is charging enabled 144 * @pre_charge_current: current (in uA) to use in pre-charging phase 146 * charging cycle terminates 148 * pre-charge to fast charge mode [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 20 #include <linux/usb/otg.h> 72 #define TWL4030_ICHGEOC BIT(4) /* Battery current end-of-charge */ 131 int usb_mode, ac_mode; /* charging mode requested */ 206 * CGAIN == 0: ICHG = (BCIICHG * 1.7) / (2^10 - 1) - 0.85 207 * CGAIN == 1: ICHG = (BCIICHG * 3.4) / (2^10 - 1) - 1.7 209 * CGAIN == 0: val * 1.6618 - 0.85 * 1000 210 * CGAIN == 1: (val * 1.6618 - 0.85 * 1000) * 2 218 return (regval * 16618 - 8500 * 1000) / 5; in regval2ua() 220 return (regval * 16618 - 8500 * 1000) / 10; in regval2ua() [all …]
|
| H A D | rk816_battery.c | 5 * Author: chenjh <chenjh@rock-chips.com> 51 #define BAT_INFO(fmt, args...) pr_info("rk816-bat: "fmt, ##args) 193 u8 otg_in; /* OTG device attached status */ 194 u8 otg_pmic5v; /* OTG device power supply from PMIC */ 316 return (get_boot_sec() > x) ? (get_boot_sec() - x) : 0; in base2sec() 337 d = (value - table[i - 1]) * (MAX_INTERPOLATE / (size - 1)); in interpolate() 338 d /= table[i] - table[i - 1]; in interpolate() 339 d = d + (i - 1) * (MAX_INTERPOLATE / (size - 1)); in interpolate() 360 c = -c; in ab_div_c() 367 ans = -ans; in ab_div_c() [all …]
|
| H A D | ab8500_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2012 31 #include <linux/mfd/abx500/ab8500-bm.h> 33 #include <linux/usb/otg.h> 92 /* Lowest charger voltage is 3.39V -> 0x4E */ 110 /* UsbLineStatus register - usb types */ 172 * struct ab8500_charger_interrupts - ab8500 interupts 216 * struct ab8500_charger - ab8500 Charger device information 357 dev_dbg(di->dev, "SW Fallback: %d\n", fallback); in ab8500_enable_disable_sw_fallback() 359 if (is_ab8500(di->parent)) { in ab8500_enable_disable_sw_fallback() [all …]
|
| H A D | rt9455_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 22 #define RT9455_DRIVER_NAME "rt9455-charger" 166 #define GET_MASK(fid) (BIT(rt9455_reg_fields[fid].msb + 1) - \ 170 * Each array initialised below shows the possible real-world values for a 172 * ascending order. The index of each real-world value represents the value 264 for (i = 0; i < tbl_size - 1; i++) in rt9455_find_idx() 268 return (tbl_size - 1); in rt9455_find_idx() 278 ret = regmap_field_read(info->regmap_fields[field], &v); in rt9455_get_field_val() 282 v = (v >= tbl_size) ? (tbl_size - 1) : v; in rt9455_get_field_val() 294 return regmap_field_write(info->regmap_fields[field], idx); in rt9455_set_field_val() [all …]
|
| H A D | bq25890_charger.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 88 u8 ilim_en; /* enable ILIM pin */ 264 * Most of the val -> idx conversions can be computed, given the minimum, 335 ret = regmap_field_read(bq->rmap_fields[field_id], &val); in bq25890_field_read() 345 return regmap_field_write(bq->rmap_fields[field_id], val); in bq25890_field_write() 362 rtbl_size = (rtbl->max - rtbl->min) / rtbl->step + 1; in bq25890_find_idx() 365 idx < rtbl_size && (idx * rtbl->step + rtbl->min <= value); in bq25890_find_idx() 370 return idx - 1; in bq25890_find_idx() 384 return (rtbl->min + idx * rtbl->step); in bq25890_find_val() 424 mutex_lock(&bq->lock); in bq25890_power_supply_get_property() [all …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| /OK3568_Linux_fs/kernel/arch/arm/boot/dts/ |
| 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> 13 model = "BQ Edison2 Quad-Core"; 14 compatible = "mundoreader,bq-edison2qc", "rockchip,rk3188"; 22 compatible = "pwm-backlight"; 23 power-supply = <&vsys>; 27 gpio-keys { 28 compatible = "gpio-keys"; [all …]
|
| H A D | rk3308-dot-rk816-v10-aarch32.dts | 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 6 /dts-v1/; 8 #include <dt-bindings/input/input.h> 12 model = "Rockchip RK3308 Dot Rk816-3 V10 (AArch32)"; 13 compatible = "rockchip,rk3308-dot-rk816-v10-aarch32", "rockchip,rk3308"; 16 …bootargs = "earlycon=uart8250,mmio32,0xff0c0000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rootfs… 19 acodec_sound: acodec-sound { 20 compatible = "rockchip,multicodecs-card"; 21 rockchip,card-name = "rockchip,rk3308-acodec"; 22 rockchip,codec-hp-det; [all …]
|
| /OK3568_Linux_fs/kernel/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 …]
|
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 44 tristate "Active-semi ACT8945A" 49 Support for the ACT8945A PMIC from Active-semi. This device 50 features three step-down DC/DC converters and four low-dropout 66 sun4i-gpadc-iio and the hwmon driver iio_hwmon. 69 called sun4i-gpadc. 88 tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down 119 over at91-usart-serial driver and usart-spi-driver. Only one function 135 tristate "Atmel HLCDC (High-end LCD Controller)" 172 tristate "X-Powers AC100" [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/phy/ |
| H A D | phy-rockchip-naneng-usb2.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <generic-phy.h> 15 #include <reset-uclass.h> 25 POWER_SUPPLY_TYPE_USB_DCP, /* Dedicated Charging Port */ 26 POWER_SUPPLY_TYPE_USB_CDP, /* Charging Downstream Port */ 27 POWER_SUPPLY_TYPE_USB_FLOATING, /* DCP without shorting D+/D- */ 41 u32 enable; member 48 * @chg_en: charge detector enable signal. 60 * @bypass_otgsuspendm: otg-suspendm bypass control register. 62 * @bvalidfall_det_en: vbus valid fall detection enable register. [all …]
|
| H A D | phy-rockchip-inno-usb2.c | 4 * SPDX-License-Identifier: GPL-2.0+ 10 #include <generic-phy.h> 18 #include <reset-uclass.h> 34 POWER_SUPPLY_TYPE_USB_DCP, /* Dedicated Charging Port */ 35 POWER_SUPPLY_TYPE_USB_CDP, /* Charging Downstream Port */ 36 POWER_SUPPLY_TYPE_USB_FLOATING, /* DCP without shorting D+/D- */ 50 u32 enable; member 55 * @cp_det: charging port detected successfully. 56 * @dcp_det: dedicated charging port detected successfully. 80 * struct rockchip_usb2phy_port_cfg: usb-phy port configuration. [all …]
|
| /OK3568_Linux_fs/kernel/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. 21 #include <linux/usb/otg.h> 137 * cable is present and we need to be runtime-enabled 172 /*-------------------------------------------------------------------------*/ 183 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n", in twl4030_i2c_write_u8_verify() 191 dev_dbg(twl->dev, "Write%d[%d,0x%x] wrote %02x but read %02x\n", in twl4030_i2c_write_u8_verify() [all …]
|
| /OK3568_Linux_fs/kernel/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 24 #include <linux/dma-mapping.h> 46 void __iomem *tbase = musb->ctrl_base; in tusb_get_revision() 63 void __iomem *tbase = musb->ctrl_base; in tusb_print_revision() 66 rev = musb->tusb_revision; in tusb_print_revision() 91 * Workaround for spontaneous WBUS wake-up issue #2 for tusb3.0. 96 void __iomem *tbase = musb->ctrl_base; in tusb_wbus_quirk() 109 dev_dbg(musb->controller, "Enabled tusb wbus quirk ctrl %08x ena %08x\n", in tusb_wbus_quirk() [all …]
|
| /OK3568_Linux_fs/kernel/arch/arm/mach-pxa/ |
| H A D | magician.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * i-mate JAM, O2 Xda mini, Orange SPV M500, Qtek s100, Qtek s110 5 * and T-Mobile MDA Compact. 7 * Copyright (c) 2006-2007 Philipp Zabel 20 #include <linux/mfd/htc-pasic3.h> 23 #include <linux/platform_data/gpio-htc-egpio.h> 28 #include <linux/regulator/gpio-regulator.h> 30 #include <linux/platform_data/i2c-pxa.h> 33 #include <asm/mach-types.h> 39 #include <linux/platform_data/video-pxafb.h> [all …]
|
| /OK3568_Linux_fs/kernel/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> 32 #include <linux/usb/otg.h> 60 * enum usb_chg_state - Different states involved in USB charger detection. 96 unsigned int enable; member 100 * struct rockchip_chg_det_reg - usb charger detect registers 101 * @cp_det: charging port detected successfully. 102 * @dcp_det: dedicated charging port detected successfully. 126 * struct rockchip_usb2phy_port_cfg - usb-phy port configuration. [all …]
|
| /OK3568_Linux_fs/kernel/drivers/usb/chipidea/ |
| H A D | usbmisc_imx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <linux/usb/otg.h> 80 /* HSIC enable */ 86 /* For imx6dql, it is host-only controller, for later imx6, it is otg's */ 104 /* The default DM/DP value is pull-down */ 145 /* It's called when we need to enable/disable usb wakeup */ 165 struct imx_usbmisc *usbmisc = dev_get_drvdata(data->dev); in usbmisc_imx25_init() 169 if (data->index > 1) in usbmisc_imx25_init() 170 return -EINVAL; in usbmisc_imx25_init() 172 spin_lock_irqsave(&usbmisc->lock, flags); in usbmisc_imx25_init() [all …]
|