From patchwork Wed Jan 30 08:42:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 10787877 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 12ED96C2 for ; Wed, 30 Jan 2019 08:43:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00B702E535 for ; Wed, 30 Jan 2019 08:43:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F315F2E538; Wed, 30 Jan 2019 08:43:54 +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=-5.2 required=2.0 tests=BAYES_00,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 97F072E535 for ; Wed, 30 Jan 2019 08:43:54 +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=juB2xe5XXWKngHPWtZ54vlohRfDAibkIOl679Grje4I=; b=ZbvvVEgoa8kSGG FcNd41eFQjKnbBGNak9SKIF54a+6HuOB1MzYcnNspA5N5Hp9TCahwmYKQyo2Im4FNkg7uSA4bA0Yl VanIaDZL/Wywlp5YqmvC7husJ/hMltrx6NxCgch8Wkr7IDJ4nsHAacTU7Q+8m4h+TXT9mFaCoIkql fap0FicUXt+9auYcI3GEjIW74WnfaHABw+MNRK2Zs1/JnQz8Tt+wbsXgIh0+CwXOYmhdBntOrNHbB OQWdlehB3w0pgH45pERqpqzE1FvN00qGwRUJ4t4a5pSquapUBj289MGA0mWqcI/qLxJk3IOelDxWE 6Ie1fLlkvcTzerWelzjw==; 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 1golTL-0003Jv-Pr; Wed, 30 Jan 2019 08:43:51 +0000 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76] helo=wens.csie.org) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1golS0-0002EA-0z for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:29 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id E39E45FD5D; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 07/10] arm64: dts: allwinner: h5: orange-pi-pc2: Add CPU regulator supply Date: Wed, 30 Jan 2019 16:42:00 +0800 Message-Id: <20190130084203.25053-8-wens@csie.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190130084203.25053-1-wens@csie.org> References: <20190130084203.25053-1-wens@csie.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190130_004228_274383_D36DA5EA X-CRM114-Status: GOOD ( 13.39 ) 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, Sergey Matyukevich , Andre Przywara , Chen-Yu Tsai , linux-kernel@vger.kernel.org, Emmanuel Vadot , linux-sunxi@googlegroups.com, Jagan Teki , Hauke Mehrtens , linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 The OrangePi PC 2 uses a Silergy SY8106A regulator to supply the CPU cores. The fixed voltage when I2C programmed regulation is not in action is slightly higher than 1.1V. The value in the device tree description is based on calculations of the resistor values from the schematics. Cc: Andre Przywara Cc: Icenowy Zheng Cc: Emmanuel Vadot Signed-off-by: Chen-Yu Tsai --- This patch is based on the schematics and has not been tested on an actual board. --- .../dts/allwinner/sun50i-h5-orangepi-pc2.dts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts index 3e0d5a9c096d..23cfad7c78f4 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts @@ -132,6 +132,10 @@ status = "okay"; }; +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; + &de { status = "okay"; }; @@ -207,6 +211,30 @@ status = "okay"; }; +&r_i2c { + status = "okay"; + + reg_vdd_cpux: regulator@65 { + compatible = "silergy,sy8106a"; + reg = <0x65>; + regulator-name = "vdd-cpux"; + silergy,fixed-microvolt = <1108474>; + /* + * 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; + }; +}; + &spi0 { status = "okay";