From patchwork Tue Feb 6 04:49:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10202375 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 D8F8860134 for ; Tue, 6 Feb 2018 05:09:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8E9528879 for ; Tue, 6 Feb 2018 05:09:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABE1C28A0B; Tue, 6 Feb 2018 05:09:00 +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 5134F28879 for ; Tue, 6 Feb 2018 05:09: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=SEk4aTzf/12i+w/U4zFEReDqpcHeL/c8Ag6Vymlv+sw=; b=Cn9oftkxgbdpgXY+dkl0omYGDB XOKp2sBIrNGLNOhM8cJoT3w09X8Lrhmql1oL9NFFBVx/EAOZH36G4Hd+C/u7mhDO6QGwjxIGxgCMW Q2BbQhoGTaZ2LApt7qB2oFWcKcvBhRaaYOSDA7lbY6ZiYCca3XOJxS44xXPMxmIVn3TCLCA0Mz0my FAg6NraO3k2ciQ/mofqyggNGpizakIHJ0QdfoGILaPeDGIa4LHdzGLDp5a/bG0dzdEfVnvZYEvDK8 iJjuXbVSz2qzgPugynwvQlhcz4UZPxa7/dPGX48NMYBxZl8Vwfq0SQAyItQiA+FQmERsq/+QqbTc+ GmVBjsew==; 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 1eivV5-0008Mp-MI; Tue, 06 Feb 2018 05:08:59 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eivV3-0008Mc-71 for linux-arm-kernel@bombadil.infradead.org; Tue, 06 Feb 2018 05:08:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=hP8PjOcCeEcaeHMbiugVmDABz3V/NQxF20I7cZxfcbk=; b=uv1gz6fROjJkp5NATIcJEI7D4 m3wtWykVSgbG/A6RlkWN7ewbq1a25g9xtN3dnDplEUKcV2TFt2qZfUhGFHhCJP/ug8uU4J3NDFrPx bAOdgZwgzJFVejALFaRz0qkiZT56yRRs2syo706zGwK//GVKRfpmKXHqzqeoq/EGbNnGaRCZKYqkG 6o0klgoFaxSGG0+NiXnmLXDulYknnbY7xN+13yzk3MI3JuNtB187MuPPpivRnaadVVr7mULbmbirn xrktyfsqHDEYy9/6Wv8qhXXIQz33RJ25e7GeQkReTbFyBRbzgs1wDrz9c1wZsrYfOGVo37zd2DiHS ftbaV4fqw==; Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eivEH-0004SJ-HF for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2018 04:51:38 +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 39D6472008D; Tue, 6 Feb 2018 04:51:26 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.25.39]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 53F0F7205E1; Tue, 6 Feb 2018 04:51:25 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.18.58.245]) (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:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Eyes-Lonely: 73c3680e6a00576e_1517892686031_4204897207 X-MC-Loop-Signature: 1517892686031:1804905417 X-MC-Ingress-Time: 1517892686031 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 5B27557019; Tue, 6 Feb 2018 04:51:21 +0000 (UTC) From: Icenowy Zheng To: Liam Girdwood , Rob Herring , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH v2 08/10] ARM: sun8i: h3: Add SY8106A regulator to Orange Pi PC Date: Tue, 6 Feb 2018 12:49:03 +0800 Message-Id: <20180206044905.30508-9-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: Ondrej Jirman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, 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 From: Ondrej Jirman Add SY8106A regulator to r_i2c bus and enable the r_i2c bus on Orange Pi PC, then set the power supply of the ARM cores to this regulator, in order to enable DVFS. Signed-off-by: Ondrej Jirman [Icenowy: Enable DVFS in this patch, slight changes and change commit message] Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai --- Changes in v2: - Reduce maximum voltage to 1.3V. - Slightly changed the comment at 1.0V minimum voltage for taking BSP DVFS table instead of Armbian one. arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts index d22546df1b82..ded9d8d6d008 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts @@ -98,6 +98,10 @@ status = "okay"; }; +&cpu0 { + cpu-supply = <®_sy8106a>; +}; + &ehci0 { status = "okay"; }; @@ -160,6 +164,29 @@ }; }; +&r_i2c { + status = "okay"; + + reg_sy8106a: regulator@65 { + compatible = "silergy,sy8106a"; + reg = <0x65>; + regulator-name = "vdd-cpux"; + /* + * The datasheet uses 1.1V as the minimum value of VDD-CPUX, + * however both the Armbian DVFS table and the official one + * have operating points with voltage under 1.1V, and both + * DVFS table are known to work properly at the lowest + * operating point. + * + * Use 1.0V as the minimum voltage instead. + */ + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1300000>; + regulator-boot-on; + regulator-always-on; + }; +}; + &r_pio { leds_r_opc: led_pins { pins = "PL10";