From patchwork Tue Feb 6 04:49:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10202373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 180BC60134 for ; Tue, 6 Feb 2018 05:06:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 005522880B for ; Tue, 6 Feb 2018 05:06:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E88D128A0C; Tue, 6 Feb 2018 05:06:38 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 8EB1D2880B for ; Tue, 6 Feb 2018 05:06:38 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=6VzPOu+FIEDs/QzdmhP9V1GYdZTWSYXXY4cNhGohBwg=; b=dxU7/WTZ1/fcH+CcKwmlxes2j0 LkuDWAVn4UvQcZNpOxcOjspkL56UinlPg8La3aH9zAOhzuhC7Yq/sW5ushntbz/t1wfYfZYhCI3Zz PbfHSeDao84hW5zlP9jB1FYk8YsAzzV3J1UBqVmnKlLXBdlKZvd4a3qWE0Lf5ZmA8X3x7ycM/5N3F 7wVXtQVCFXdkUtdTPwUs1tQvcubtqm5JW8vnUd3eLu/gw7IXFJWeTksDLx8isdbIddxvuzgorSlwS kuftXV+VtxxZCBIU5+T3xEkebMtUQ85CqEn95nz+fVNPr9rGW6f+8n39Fjqxl6WITgs1YL+zNTrYQ ypTnJzSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eivSn-0007u6-Nm; Tue, 06 Feb 2018 05:06:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eivSl-0007pz-UW for linux-arm-kernel@bombadil.infradead.org; Tue, 06 Feb 2018 05:06:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CbE41O9Pq/G5AIGxZv6VJPQIbHJ2//SxJ1qhipgTVKk=; b=stVutHnCOagdqYVhdLVA3mjIv IxhrRkCvBSbuG489en6hcTrwAJ5CpCIb5o+0f9enidKgcopJzUO3nbhA6247GhQNmk1ezH12nJGRB aVW0U4FM8wH8kxqWSlQjDnXC8lw2voPlHjqT873Z0xYNommoMylj+00/NtZjqiDl+1Wn/qZyZaF5t ilnx2USK7VI3lLLfIC6rVD8sgaKOlqtLVfCHeo11/5pz9mvsr656I4Hib/kiWqOUsLDv5g64DAccz kVnRE1xxmryKA0h7wkghGcFHCzFIpeTdrY4JDnWC79kCg+XXNRRx/YyP8PxHg5dge4YddWitnH4vb dkSy/RmVw==; Received: from antelope.ash.relay.mailchannels.net ([23.83.222.4]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eivEJ-0003ym-He for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2018 04:51:42 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 19E483E0478; Tue, 6 Feb 2018 04:51:20 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.23.35]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 132C73E011F; Tue, 6 Feb 2018 04:51:18 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.18.63.202]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.13.1); Tue, 06 Feb 2018 04:51:20 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Reaction-Harbor: 6fca0b086ecca7be_1517892679703_78330957 X-MC-Loop-Signature: 1517892679703:783988433 X-MC-Ingress-Time: 1517892679703 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 4EBD457019; Tue, 6 Feb 2018 04:51:15 +0000 (UTC) From: Icenowy Zheng To: Liam Girdwood , Rob Herring , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v2 07/10] ARM: sun8i: h3: add SY8113B regulator used by Orange Pi One board Date: Tue, 6 Feb 2018 12:49:02 +0800 Message-Id: <20180206044905.30508-8-icenowy@aosc.io> In-Reply-To: <20180206044905.30508-1-icenowy@aosc.io> References: <20180206044905.30508-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180206_045140_078433_6E2C91B8 X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. 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: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 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 Orange Pi One board has a SY8113B regulator, which is controlled via GPIO and capable of outputing 1.1V when the PL6 GPIO is set to output 0 or 1.3V when the PL6 GPIO is set to input or output 1, and the output is the power supply of the ARM cores in H3 SoC. Add the device tree node of this regulator and set the cpu's cpu-supply property to it. Signed-off-by: Icenowy Zheng --- New patch in v2. arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts index 82e5d28cd698..d8250aacfda1 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts @@ -88,6 +88,27 @@ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; }; }; + + reg_sy8113b: gpio-regulator { + compatible = "regulator-gpio"; + regulator-name = "vdd-cpux"; + regulator-type = "voltage"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <50>; /* 4ms */ + + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ + enable-active-high; + gpios-states = <0x1>; + states = <1100000 0x0 + 1300000 0x1>; + }; +}; + +&cpu0 { + cpu-supply = <®_sy8113b>; }; &ehci0 {