From patchwork Tue Feb 6 04:49:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10202371 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 CAF6260134 for ; Tue, 6 Feb 2018 05:02:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBDF0289B3 for ; Tue, 6 Feb 2018 05:02:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0B48289BB; Tue, 6 Feb 2018 05:02:02 +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 B09E3289B6 for ; Tue, 6 Feb 2018 05:02:00 +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=WUy6sGZ0S6TiL/Om/cFwwlxwFiTzXtKs5POxEL25lu0=; b=YQ0HNCn1PDZYoo6kwonad+711l AJRSOLRV/tS04GijDeZFfArXxRpNsFPDqWGeiODgYucvUDEOiQj1LcPFRjzFEgnbhd9/R6o+jx40E NJG+1z2whRJbUC6N+/g0msB8Ubb71/yz+gldiMxKrxsJo+XRkU3HB4POoeBzMAxaqhMIHKTFzqltL 9Pzw3Xm4BsziSNsiTBfG06OqG9W2utqRYJe/3Qkv0nO8ft1TXZjNYhdskI6NkzGRJwNbsryCGW5H/ J3c1hdIvC2rn8+bX/J3w3BGFHFSxkuIXmOhv/T2H5sD8CgIzOhOSfNG2QYCfePn0PWce8kEpgX9Pq GvTme7Jw==; 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 1eivOH-00069M-4G; Tue, 06 Feb 2018 05:01:57 +0000 Received: from cheetah.ash.relay.mailchannels.net ([23.83.222.34]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eivEA-0001qP-N1 for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2018 04:51:53 +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 48D143E012B; Tue, 6 Feb 2018 04:51:14 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.8.55]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 74BCC3E0405; Tue, 6 Feb 2018 04:51:13 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.18.36.131]) (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:14 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Shrill-Obese: 44d0cecf711e195a_1517892674077_1570902277 X-MC-Loop-Signature: 1517892674076:3667285135 X-MC-Ingress-Time: 1517892674076 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 9FC6E57019; Tue, 6 Feb 2018 04:51:09 +0000 (UTC) From: Icenowy Zheng To: Liam Girdwood , Rob Herring , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v2 06/10] ARM: sun8i: h2+: add SY8113B regulator used by Orange Pi Zero board Date: Tue, 6 Feb 2018 12:49:01 +0800 Message-Id: <20180206044905.30508-7-icenowy@aosc.io> In-Reply-To: <20180206044905.30508-1-icenowy@aosc.io> References: <20180206044905.30508-1-icenowy@aosc.io> 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 Zero 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 H2+ SoC. Add the device tree node of this regulator and set the cpu's cpu-supply property to it. Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai --- No changes in v2. arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts index 6713d0f2b3f4..34fc35737090 100644 --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts @@ -94,6 +94,27 @@ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; post-power-on-delay-ms = <200>; }; + + 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 {