From patchwork Mon Nov 26 15:27:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priit Laes X-Patchwork-Id: 10698509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F12613AD for ; Mon, 26 Nov 2018 15:29:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D267295A7 for ; Mon, 26 Nov 2018 15:29:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20E0929E86; Mon, 26 Nov 2018 15:29:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D9044295A7 for ; Mon, 26 Nov 2018 15:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8gVrcvgMAPWC1GYD7dcdYKP6d4fDK0D1ONAiskOYbrY=; b=DcAdc95moqjoTD lOLCO4NqgN93M5KT7L6wItES2ssUk3VuJMK6/qzt9BsJSnxMFRau6t1aA/KYCv834In659QyHVO2T Km1fDnoWi26SOdjE95xIjCpTEu+YWc0ybcrqHg+Kduh1DWoHKfpabwoY2g5u/4VnV57rGqgejDRQJ PcWRmQTtIYRBjrrgaTdmbYwfOx1FrjuJfI6LdWTnExr6q2q3IT/njq27Gl4zEDrEb//c9IrkjK/en JczrrtAvKvd0OtuZ/Zo3JnLXj89yoYFzu7s8MDOlsk7eFtaCrF0mNzKj6POvuTPPLTG0d/bEvock0 NgrNhS7pMJByZpRRs9Rg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRIpQ-00068A-TW; Mon, 26 Nov 2018 15:29:40 +0000 Received: from plaes.org ([188.166.43.21]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRIoc-0005N4-JN for linux-arm-kernel@lists.infradead.org; Mon, 26 Nov 2018 15:28:58 +0000 Received: from localhost (85.253.196.132.cable.starman.ee [85.253.196.132]) by plaes.org (Postfix) with ESMTPSA id 0970041C64; Mon, 26 Nov 2018 15:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=plaes.org; s=mail; t=1543246095; bh=OUsll2pSZ+358NKNJxIvPOwFWCiSRmYw6WUlwJb5uoA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JUDeyeuPsJnifS/ateXI/uKf1+1hYIbC0VJnuf3ZPEugPFWQnUWo8XjIZ6vtuFesx XCSi6aN/qT4sQgUYGvLOcegxNnUELpkGUueu5XsqBd0MxG2xa+7LdwUMIrjL3Lj/hD duviv/2m4PHcT2pGDinQPj5Hmn7KD7mtet98ulCJ+P1YqziPO4I1hb8m66cjUv29dd +aWnYu2ygMNB11PARsm2U940A1Mf6Wm9MuKxB1Wirb/XCcDQv/iwSJewy0wYN6ubbR UbP98T9yFjdJKqRZiCkADXfEeXp0FxDtZnFMJ7KzHJqng14VGvLQXubM0y3vQqSSXJ 7VUeFl7KqW1tw== From: Priit Laes To: Lee Jones , Rob Herring , Mark Rutland , Chen-Yu Tsai , Maxime Ripard , Sebastian Reichel , Hans de Goede , Liam Girdwood , Mark Brown , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 09/14] regulator: dts: add full voltage range to LDO4 on the Lime2 Date: Mon, 26 Nov 2018 17:27:50 +0200 Message-Id: <0b1aa5b28cb5efe17c04150a181ef1fa4027bc55.1543245984.git-series.plaes@plaes.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181126_072851_387541_20C0AEE2 X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Olliver Schinagl , Priit Laes Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Olliver Schinagl With commit b43776d65a33b46092 ("ARM: dts: sunxi: Use axp209.dtsi for Olinuxino Lime2") we force them an arbitrary 2.8 volts. Granted, for LDO3 this may be less arbitrary, but for LDO4 this is just wrong. In the defense of LDO3, LDO3 is the regulator that feeds port bank E, which has no other purpose then a CSI/TS interface, however the case may still be, that the connected IO may be just as well be 3.3 volts. The big misnomer is however, that the schematic names GPIO-2 pin4 LDO3_2.8V, rather then VDD-CSI0 or similar. This is much worse for LDO4 however, which is not referenced on any pin, is now set to 2.8 volts, but port bank G can also support various other peripherals such as UARTS etc. By having 2.8 volts however for LDO4, we thus now have peripherals that no longer function properly all of the time. Ideally, we want to set a supply voltage for each port bank, but the monolithic nature of the sunxi pinctroller currently prevents this and as such, the board should at least configure the LDO4 with the proper ranges. Until we can set the consumer at the port bank level, a child device-tree has to do something like: ®_ldo4 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; While doing this the same way results in the same solution currently, we force the hack into the final devicetree rather then having it wrong at the board level. Signed-off-by: Olliver Schinagl Signed-off-by: Priit Laes --- arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts index ffafe97..1b9867f 100644 --- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts @@ -250,9 +250,10 @@ }; ®_ldo4 { - regulator-min-microvolt = <2800000>; - regulator-max-microvolt = <2800000>; - regulator-name = "vddio-csi1"; + regulator-always-on; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vdd-io-pg"; }; ®_usb0_vbus {