From patchwork Wed Oct 2 11:25:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 11170889 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4ECCE17EE for ; Wed, 2 Oct 2019 11:36:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3496520679 for ; Wed, 2 Oct 2019 11:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726239AbfJBLgJ (ORCPT ); Wed, 2 Oct 2019 07:36:09 -0400 Received: from hermes.aosc.io ([199.195.250.187]:42755 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726464AbfJBLgJ (ORCPT ); Wed, 2 Oct 2019 07:36:09 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 0750482CE0; Wed, 2 Oct 2019 11:26:39 +0000 (UTC) From: Icenowy Zheng To: Sebastian Reichel , Chen-Yu Tsai Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [PATCH 0/2] Enable USB BC detection to raise AXP813 Vbus current Date: Wed, 2 Oct 2019 19:25:43 +0800 Message-Id: <20191002112545.58481-1-icenowy@aosc.io> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Unlike previous AXP PMICs, the AXP813 PMIC (and AXP803) supports port detection defined in USB Battery Charging Specification 1.2, and sets the real Vbus current based on a pre-defined value (which is the original Vbus current limitation field) and the port status. However, the detection needs manual activision. If it's not active, the PMIC will assume a SDP and limit the Vbus current to 500mA. This patchset contains two patches, one enables the USB BC 1.2 detection, the other exports the real applied Vbus limitation. Icenowy Zheng (2): power: supply: axp20x_usb_power: enable USB BC detection on AXP813 power: supply: axp20x_usb_power: add applied max Vbus support for AXP813 drivers/power/supply/axp20x_usb_power.c | 140 +++++++++++++++++++++++- 1 file changed, 137 insertions(+), 3 deletions(-)