From patchwork Tue Dec 11 15:17:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priit Laes X-Patchwork-Id: 1011136 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=plaes.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=plaes.org header.i=@plaes.org header.b="c7MgmDx9"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43Dk8m39Pbz9s7h for ; Wed, 12 Dec 2018 02:18:00 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726740AbeLKPRY (ORCPT ); Tue, 11 Dec 2018 10:17:24 -0500 Received: from plaes.org ([188.166.43.21]:59618 "EHLO plaes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbeLKPRX (ORCPT ); Tue, 11 Dec 2018 10:17:23 -0500 Received: from localhost (unknown [213.204.46.240]) by plaes.org (Postfix) with ESMTPSA id 5DE9541289; Tue, 11 Dec 2018 15:17:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=plaes.org; s=mail; t=1544541441; bh=snlyZLidIJEaCnhVA6nQ3LGjhvn8FydspTFdTImmP0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c7MgmDx9DJLinzSnvgYeehR6oxBBjhN6sfII3g77a3+YcmFKIc2+DW71ABMJ7XZBO BPyrnGgsqFnp9MLtW3O21DWnFNhpW9CvtFyJJfy5xuVGqkhRPYUlG0PhMPrcNEOtTd 77rquDIP6CxjtiV6wfRbaLYrGrBr0LBRjeXw4Z3q6Nf6EBb8eN7A8rZ8rQaw9q72Cl 6UlrmOkbXazg76Hmym3D5tz0VVWkX1pHHBGYyQ+bJbJo4OidLk6InKxMWM5Avcs1Um KBlNg7Pnb+sTv6a3QT+6baskHeCOqaJT5k4JrEDAFC19kwfr5Gnu1CrSOM/LWrdf0E R7dxb9fA+W2ig== From: Priit Laes To: Lee Jones , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard , Liam Girdwood , Mark Brown , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Olliver Schinagl , linux-sunxi Cc: Priit Laes Subject: [PATCH v2 5/8] dt-bindings: mfd: axp20x: Add software based soft_start for AXP209 LDO3 Date: Tue, 11 Dec 2018 17:17:09 +0200 Message-Id: <25e67fe9b5397aa5f11bdd7026e4ae6be51dd18b.1544512919.git-series.plaes@plaes.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: References: MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Olliver Schinagl In the past, there have been words on various lists that if LDO3 is disabled in u-boot, but enabled in the DTS, the axp209 driver would fail to continue/hang. Several enable/disable patches have been issues to devicetree's in both the kernel and u-boot to address this issue. What really happened however, was that the AXP209 shuts down without a notice and without setting an interrupt. This is caused when LDO3 gets overloaded, for example with large capacitors on the LDO3 output. Normally, we would expect that AXP209 would source 200 mA as per datasheet and set and trigger an interrupt when being overloaded. For some reason however, this does not happen. As a work-around, implement software-based 'regulator-soft-start' property for AXP209 LDO3 regulator, which is used to first bring up the LDO3 to the lowest possible voltage and then enable the LDO. After that, we can set the requested voltage as usual. Combining this setting with the regulator-ramp-delay allows LDO3 to come up slowly and staggered, potentially reducing overall inrush current. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes --- Documentation/devicetree/bindings/mfd/axp20x.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt index c626605..2af4ff9 100644 --- a/Documentation/devicetree/bindings/mfd/axp20x.txt +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt @@ -37,6 +37,9 @@ more information: - regulator-ramp-delay: sets the ramp up delay in uV/us AXP20x/DCDC2: 1600, 800 AXP20x/LDO3: 1600, 800 +- regulator-soft-start: enable the output at the lowest possible voltage and + only then set the desired voltage + AXP20x/LDO3: software-based implementation Optional properties: - x-powers,dcdc-freq: defines the work frequency of DC-DC in KHz