From patchwork Wed Jan 30 08:41:54 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: 10787873 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 61BBC91E for ; Wed, 30 Jan 2019 08:43:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A0462E481 for ; Wed, 30 Jan 2019 08:43:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A5372E4CD; Wed, 30 Jan 2019 08:43: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=-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 A4AA42E481 for ; Wed, 30 Jan 2019 08:43:01 +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=LXiErsoT8XB4yQQl1HG+VV0CjiK2gVP+3DI39AawkMw=; b=o0q2rNHgDYO6y9 Euer2IDlgK/Hy4zTkTFZ/S47Z8EN3Sn60y6jNFlUf7f80DGJuMhYVlKUDFk8IY8p5t4JHmF8RuE29 2CDM+Pj3QH5DSd2rSokrXzJU+JENcoyQ2hLsvPLe9WWei8jQQqoOQpHpPtwue+yih6zOUVvjgVBjw Sn+iiseyXenHHVUKfzVMu+WhmfM9W7+g1XIPNcY4SSiaTJHe2ixFb5jYKlw0InpAR3KNDUGQ4kmL7 8sBFAAUGrlbBKyvVJDhjIRPKT104gDOc/OdLzr6+9ucCjkqGcLOrEElZ487hU4HrSLll+7bA+cDvH 8nsUNs0gTmm5KU665HCQ==; 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 1golSV-0002j0-5m; Wed, 30 Jan 2019 08:42:59 +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 1golRx-0002Cp-EW for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:27 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id BC1575FA83; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 01/10] ARM: dts: sunxi: bananapi-m2-plus-v1.2: Fix CPU supply voltages Date: Wed, 30 Jan 2019 16:41:54 +0800 Message-Id: <20190130084203.25053-2-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_004225_702025_BE7A0AC5 X-CRM114-Status: GOOD ( 10.71 ) 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 Bananapi M2+ uses a GPIO line to change the effective resistance of the CPU supply regulator's feedback resistor network. The voltages described in the device tree were given directly by the vendor. This turns out to be slightly off compared to the real values. The updated voltages are based on calculations of the feedback resistor network, and verified down to three decimal places with a multi-meter. Fixes: 6eeb4180d4b9 ("ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device trees") Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi index 53edd1faee99..a567567763f4 100644 --- a/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi +++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi @@ -16,13 +16,13 @@ regulator-type = "voltage"; regulator-boot-on; regulator-always-on; - regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1300000>; + regulator-min-microvolt = <1108475>; + regulator-max-microvolt = <1308475>; regulator-ramp-delay = <50>; /* 4ms */ gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */ gpios-states = <0x1>; - states = <1100000 0x0 - 1300000 0x1>; + states = <1108475 0x0 + 1308475 0x1>; }; }; From patchwork Wed Jan 30 08:41:55 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: 10787871 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 CCAE891E for ; Wed, 30 Jan 2019 08:42:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9B602E4C3 for ; Wed, 30 Jan 2019 08:42:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD87E2E4D3; Wed, 30 Jan 2019 08:42:48 +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 122C92E4C3 for ; Wed, 30 Jan 2019 08:42:48 +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=E1Uk7Dpv2dRBcH14S1CHs9frjur1+AKr30lFX8Qk0AA=; b=EygGdxHr4mM6VY M15/3Ivzfr+CuhZAQ3ol/H80iC7+7Lm2kQ3bFHgu4ztdBhYDBmZlhqYuNjt1vWtLNP/lXrWKHubHe viRpkvOwvTu5no9I2I4sIF/4T7QW9ty1ptdlgalsJ4ZXXM/GOzfr4VVAIjx4Vi3IwkCE5iwsLO6Rs akqmn6VcZYR+UHKq4B4v42gqmLPTnF3/v3TWUgjX+K9RuluI246xQrAblaYCf+Cjrh5FSLugSalAX SuM7lH0DHq5UHxR2vMKE5+eyW+TGabdKXKfZniOat+KMcQ/6LIuZDy34o2yGWoT5WkIsQ/nNZSumP mvH8CYVfLnM146WouyqA==; 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 1golSE-0002Qs-Ih; Wed, 30 Jan 2019 08:42:42 +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 1golRw-0002Co-T2 for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:26 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id C130D5FD01; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 02/10] ARM: dts: bananapi-m2-plus: Add CPU supply regulator Date: Wed, 30 Jan 2019 16:41:55 +0800 Message-Id: <20190130084203.25053-3-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_004225_129260_3DFE956F X-CRM114-Status: GOOD ( 11.71 ) 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 original Bananapi M2+ uses a fixed regulator to supply the CPU cores. According to Bananapi, the retail v1.1 version is designed to supply 1.3V. Actual measurements show 1.310V. Earlier engineering samples had it at 1.4V, but this is not covered here. Signed-off-by: Chen-Yu Tsai --- .../boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi | 30 +++++++------------ arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 14 +++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi index a567567763f4..39834329b6ae 100644 --- a/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi +++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi @@ -5,27 +5,19 @@ #include "sunxi-bananapi-m2-plus.dtsi" -/ { +®_vdd_cpux { /* * Bananapi M2+ v1.2 uses a GPIO line to change the effective * resistance on the CPU regulator's feedback pin. */ - reg_vdd_cpux: vdd-cpux { - compatible = "regulator-gpio"; - regulator-name = "vdd-cpux"; - regulator-type = "voltage"; - regulator-boot-on; - regulator-always-on; - regulator-min-microvolt = <1108475>; - regulator-max-microvolt = <1308475>; - regulator-ramp-delay = <50>; /* 4ms */ - gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */ - gpios-states = <0x1>; - states = <1108475 0x0 - 1308475 0x1>; - }; -}; - -&cpu0 { - cpu-supply = <®_vdd_cpux>; + compatible = "regulator-gpio"; + regulator-type = "voltage"; + regulator-min-microvolt = <1108475>; + regulator-max-microvolt = <1308475>; + regulator-ramp-delay = <50>; /* 4ms */ + enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ + gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */ + gpios-states = <0x1>; + states = <1108475 0x0 + 1308475 0x1>; }; diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi index 3bed375b9c03..eb90f53ae958 100644 --- a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi +++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi @@ -99,6 +99,16 @@ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; }; + reg_vdd_cpux: vdd-cpux { + compatible = "regulator-fixed"; + regulator-name = "vdd-cpux"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1310000>; + regulator-max-microvolt = <1310000>; + gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ + }; + wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; @@ -108,6 +118,10 @@ }; }; +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; + &de { status = "okay"; }; From patchwork Wed Jan 30 08:41:56 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: 10787889 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 5437391E for ; Wed, 30 Jan 2019 08:45:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40F2D205FD for ; Wed, 30 Jan 2019 08:45:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EE762E53C; Wed, 30 Jan 2019 08:45:22 +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 EAA8F2E541 for ; Wed, 30 Jan 2019 08:45:21 +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=a95pNU9i/FfOJDuN4oivgPDYSfAW/+3QtxnDFzbVgJk=; b=tnIIlqJd+R5waA Wh/Q9mMsjc6Ff0rHPHMdgXGUT1yKNbZdMDGlJIj58veF+qy2JefR8pEe/7SXfhFV8YP6ES8/+FyV4 N3rQN3os9BvGen5wxCcv7akUXioFRbl1i8iErsAgxWOhdJRKTFVRkKHIrdRGoNp8YvVvkQscFW3ZL GuiGrRXw2jmZSOlYG8Zgsm8dFeVfwNOMNyeLL8B1mDZBNuOI8UYPVNdzh7rnuRZvYDfOXqlcidlvG s+EBb98JR27BkmP8OHQbhuWr3H9INdIw+WS/2LwsSh9+7gf/Ls1SXakIP3aeg4ztsjebmvFsSXYik C1FfIQwnCzPnMyhgEyCw==; 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 1golUk-0005JM-IH; Wed, 30 Jan 2019 08:45:18 +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 1golS1-0002Cq-LX for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:33 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id C6BB65FD0F; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 03/10] arm64: dts: allwinner: h5: Hook up cpu regulator supplies Date: Wed, 30 Jan 2019 16:41:56 +0800 Message-Id: <20190130084203.25053-4-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_004230_179724_D8DE528A X-CRM114-Status: UNSURE ( 9.36 ) 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, 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 Some of the device trees for H5 boards already have the CPU supply regulator defined, but they are not referenced in the CPU node. Add the reference, so CPU DVFS mechanisms can see them. Signed-off-by: Chen-Yu Tsai --- .../boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts | 4 ++++ arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts index 85e7993a74e7..0c7b2b3d92f9 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-emlid-neutis-n5-devboard.dts @@ -71,6 +71,10 @@ status = "okay"; }; +&cpu0 { + cpu-supply = <&vdd_cpux>; +}; + &de { status = "okay"; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts index 506e25ba028a..10e52b612892 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo-plus2.dts @@ -126,6 +126,10 @@ status = "okay"; }; +&cpu0 { + cpu-supply = <&vdd_cpux>; +}; + &ehci0 { status = "okay"; }; From patchwork Wed Jan 30 08:41:57 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: 10787875 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 E852D6C2 for ; Wed, 30 Jan 2019 08:43:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E9C2E52A for ; Wed, 30 Jan 2019 08:43:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8FCF2E538; Wed, 30 Jan 2019 08:43:17 +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 644272E52A for ; Wed, 30 Jan 2019 08:43:17 +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=FRVhiQDSfXlOG7QMZGsCfPR+zARmq3N3imq4+PnGwCg=; b=S+kgd3oXCnKgxY jNp7gfsHrNGa7C9wZmNB3BeSy4eSTl4CUe7tKjt3KdxxbjF8YEkgD0m4g/u1LH0k1kZ+Q4LtacsB/ ur6Qt2lyMz5RMY3L7K6krKumSLihtwbWSiV5rF4JrBMPEEkIgC0yZ1rfM/5oaMuxVMNfvhKPeQN6E wD4UMyeYyNY5PvlTu3ku/wBK3yBt8szhd6lxLxBBWSSgI/osRVJ4LWCw63XRxGdkarrtarJs98lrY eALPGLxpwmCOyHgBdVtnLacHs4B7lQ1MPmPheQGXs41i4pQGpCxHyZU2wHWrV1Tt7hpzaPd39UMyu ro1jdO2cTntGln75Tl0g==; 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 1golSk-0002zT-T7; Wed, 30 Jan 2019 08:43:14 +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 1golRx-0002Cm-LU for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:27 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id D0AF35FD23; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 04/10] arm64: dts: allwinner: h5: nanopi-neo2: Add CPU regulator supply Date: Wed, 30 Jan 2019 16:41:57 +0800 Message-Id: <20190130084203.25053-5-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_004226_528963_62822D18 X-CRM114-Status: GOOD ( 10.68 ) 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 Nanopi Neo 2 uses a fixed regulator to supply the CPU cores. The feedback resistor network can be changed by toggling a GPIO line. This is effectively a GPIO controlled regulator that can change between 1.1V and 1.3V. Cc: Icenowy Zheng 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-nanopi-neo2.dts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts index cc268a69786c..08ffdfb78137 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-neo2.dts @@ -99,6 +99,26 @@ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ status = "okay"; }; + + reg_vdd_cpux: vdd-cpux { + 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 */ + enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ + gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL6 */ + gpios-states = <0x1>; + states = <1100000 0x0 + 1300000 0x1>; + }; +}; + +&cpu0 { + cpu-supply = <®_vdd_cpux>; }; &ehci0 { From patchwork Wed Jan 30 08:41:58 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: 10787885 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 793A591E for ; Wed, 30 Jan 2019 08:44:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66B1C2E53C for ; Wed, 30 Jan 2019 08:44:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AE172E53B; Wed, 30 Jan 2019 08:44:49 +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 CC2ED2E53C for ; Wed, 30 Jan 2019 08:44:48 +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=c5zay4zk5CVAK7rHiA2HLjKOCeCyh6oeI3hBt+5Ghcc=; b=r9iSjbr5xh9nwE rh78JKDdOEaw+OhISVonNDa75FWWamyAU88z2EMBIoNXaeqEJUit5yEKGtfSnkAIf2x1ZdULAgdBF 1lkUsEw4YtZXhOansm4AnYNPYfVE9p7xz6IXa78lQPwRM/BiB78cSH0xcSx1rknPxzRqrTcvPItiJ hdtObf+OD7JuiYq1waxvT1VBCvVPDG8/Ju7XY7BwnjFeBX4VDbbIfxPuraiqkVB+pF8un+G/48Zj+ vzBo98e18YMDmx0XMdyiAzombmE6eS/xL4HzHt6gr7mPmIwzzM/tmYQjJZVPVqIKR9CuSrZ0Nhveh glwDyu5gMxqld3Qcjwcg==; 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 1golUD-0004ES-4e; Wed, 30 Jan 2019 08:44:45 +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 1golS1-0002EZ-Ie for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:33 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id D613C5FD4D; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 05/10] arm64: dts: allwinner: h5: orange-pi-zero-plus: Add CPU regulator supply Date: Wed, 30 Jan 2019 16:41:58 +0800 Message-Id: <20190130084203.25053-6-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_004230_189817_AADF5B2D X-CRM114-Status: GOOD ( 12.69 ) 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 Zero Plus uses a fixed regulator to supply the CPU cores. The feedback resistor network can be changed by toggling a GPIO line. This is effectively a GPIO controlled regulator that can change between roughly 1.1V and 1.3V. The actual voltage is slightly higher. The values used in the device tree description are based on calculations using the resistor values from the schematics. Cc: Hauke Mehrtens Signed-off-by: Chen-Yu Tsai --- This patch is based on the schematics and has not been tested on an actual board. --- .../sun50i-h5-orangepi-zero-plus.dts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts index 1238de25a969..3493eea7cf29 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus.dts @@ -57,6 +57,26 @@ enable-active-high; gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ }; + + reg_vdd_cpux: vdd-cpux { + compatible = "regulator-gpio"; + regulator-name = "vdd-cpux"; + regulator-type = "voltage"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1108475>; + regulator-max-microvolt = <1307810>; + regulator-ramp-delay = <50>; /* 4ms */ + enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ + gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL6 */ + gpios-states = <0x1>; + states = <1108475 0x0 + 1307810 0x1>; + }; +}; + +&cpu0 { + cpu-supply = <®_vdd_cpux>; }; &ehci0 { From patchwork Wed Jan 30 08:41:59 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: 10787883 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 9D26791E for ; Wed, 30 Jan 2019 08:44:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87A852E53F for ; Wed, 30 Jan 2019 08:44:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B87E2E53D; Wed, 30 Jan 2019 08:44:34 +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 CE82F2E50B for ; Wed, 30 Jan 2019 08:44:33 +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=Fptor2SeeBAn4mS+tjH/btLVEHiD/vMB0JUsQLDT5ro=; b=HhtpSBNkE06xYU fE2RM68TLvLA0bx8HatKyu5BJSwO9PU9l8yAgw74h2mIOhrrXTMKtDYk21chmqz49GQVyEe05ripG l5igTQwMbybU0HQw61jHuTTHeD+v4did5KsiQM5VUxW4+cKjWCuI8vJwFoUPCxbZvzd/9mW4BBNOG PoEuBjtxgxndwAXoG1oJrFwpmzW/AwNPSFqs8dAaYO1bXU20LKqjBIMMMk3tswzp9DbICD/ndmR/1 gIhpuJegXmX41N0Wp4GKhh/x0zXx0GctcNAMY9cgm0LumoKKUhwC0MAoTErUS6iotlkKz1ybLapSn RFNhe8mXn8H+VGwb1mkw==; 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 1golTy-0003y5-Eg; Wed, 30 Jan 2019 08:44:30 +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-0002EB-MG for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:31 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id DBF0D5FD57; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 06/10] arm64: dts: allwinner: h5: orange-pi-zero-plus2: Add CPU regulator supply Date: Wed, 30 Jan 2019 16:41:59 +0800 Message-Id: <20190130084203.25053-7-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_004229_753668_54816BAE X-CRM114-Status: GOOD ( 12.56 ) 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 Zero Plus 2 uses a fixed regulator to supply the CPU cores. The feedback resistor network can be changed by toggling a GPIO line. This is effectively a GPIO controlled regulator that can change between roughly 1.1V and 1.3V. The actual voltage is slightly higher. The values used in the device tree description are based on calculations using the resistor values from the schematics. Cc: Jagan Teki Cc: Sergey Matyukevich Signed-off-by: Chen-Yu Tsai --- This patch is based on the schematics and has not been tested on an actual board. --- .../sun50i-h5-orangepi-zero-plus2.dts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts index 53c8c11620e0..801c681307ef 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts @@ -76,6 +76,22 @@ regulator-max-microvolt = <3300000>; }; + reg_vdd_cpux: vdd-cpux { + compatible = "regulator-gpio"; + regulator-name = "vdd-cpux"; + regulator-type = "voltage"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <1108475>; + regulator-max-microvolt = <1307810>; + regulator-ramp-delay = <50>; /* 4ms */ + enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ + gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL6 */ + gpios-states = <0x1>; + states = <1108475 0x0 + 1307810 0x1>; + }; + wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; @@ -84,6 +100,10 @@ }; }; +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; + &de { status = "okay"; }; 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"; From patchwork Wed Jan 30 08:42:01 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: 10787881 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 E87AB6C2 for ; Wed, 30 Jan 2019 08:44:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D59CC2E500 for ; Wed, 30 Jan 2019 08:44:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9D022E53A; Wed, 30 Jan 2019 08:44:19 +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 7D20C2E500 for ; Wed, 30 Jan 2019 08:44:19 +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=v/lOmA0yq6maR67DKQWUv/N/LdcXR8SdhRdom8fmlq0=; b=UwLGowsvbUl5jx OASx0v1SMETR0ZwexLi5PJb9rw2yYGM0Bf5ZtPsUUEkugUvTLic5sqi37ubUgNpJY0wWjarmFDne5 JjwSpUt8lTM3f7JlXfARSCb2ppgeA9DNy5Hq/PQEqygI5pnr0bXULOquIG23p1pUoiVSXrIEfct+n DL4A83Sai7koA6xBZikz2SnW1uh4R3pLubauoBVJuR1VPpm4tDblYXj/2M8KS7WjF7rhg3o23wojX 3xquQZrdosBt+6kGa8ZeXnVxQ8/LwOmHh0EFMPXMfrMixTRQ+rycJaAAE3wHBSmzHU8VmUBLJJZFu /V+FR6Sr7D9ZarS/QoOA==; 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 1golTk-0003jd-W4; Wed, 30 Jan 2019 08:44:16 +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-0002EC-IL for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:31 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id E8E315FDC1; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 08/10] arm64: dts: allwinner: h5: orange-pi-prime: Add CPU regulator supply Date: Wed, 30 Jan 2019 16:42:01 +0800 Message-Id: <20190130084203.25053-9-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_004229_756239_4EF783DE X-CRM114-Status: GOOD ( 13.85 ) 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 Prime 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: Icenowy Zheng Signed-off-by: Chen-Yu Tsai --- This patch is based on the schematics and has not been tested on an actual board. --- .../allwinner/sun50i-h5-orangepi-prime.dts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts index b75ca4d7d001..e866a0734bb3 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts @@ -139,6 +139,10 @@ status = "okay"; }; +&cpu0 { + cpu-supply = <®_vdd_cpux>; +}; + &de { status = "okay"; }; @@ -222,6 +226,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; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; From patchwork Wed Jan 30 08:42:02 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: 10787887 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 6F24491E for ; Wed, 30 Jan 2019 08:45:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59D61205FD for ; Wed, 30 Jan 2019 08:45:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D83A2E53B; Wed, 30 Jan 2019 08:45:04 +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 00874205FD for ; Wed, 30 Jan 2019 08:45:03 +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=Nk2o5jzjpi6otifJuYxzHj7sieplF6xr7xkRg4XxAO8=; b=pL7d07wSTRWhk6 09kApxj+2kiYcrM6Ky9O9fzkxHMeK6ReH+IY/8PmqH1vHJenuKy9g38WGta6Xl4JWV+DCbbVqpNys RKResogle3vR2hoIP3pW4kfNmaJ3rTOfVjr9DjqmWhghVIo3Yzi4qDWn+TNK9ylyvGfOekDFgxIPq kSvhbDA5oobgxV5oT1iI6WPy3HtCB+Enz2v8RUPW0d5oVlHyFC8KuYAfx3C2UHR80dwef2CloUxe2 LL3NJeqzR2/czSBbeJXwPH2/+BYufhjC+hXbS/hwvgdYgq6Ofyu/k8fi6n4AJsR7QiOISZHoxSkdJ ujORPSJpZCKCUuiSozUw==; 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 1golUR-0004TG-Tc; Wed, 30 Jan 2019 08:44:59 +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 1golS2-0002Ee-Ep for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:33 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id EE99B5FDD0; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 09/10] arm64: dts: allwinner: h5: Add clock to CPU cores Date: Wed, 30 Jan 2019 16:42:02 +0800 Message-Id: <20190130084203.25053-10-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_004231_064639_FA2E5168 X-CRM114-Status: UNSURE ( 9.97 ) 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, 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 ARM CPU cores are fed by the CPU clock from the CCU. Add a reference to the clock for each CPU core, along with the clock transition latency. Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi index c22621b4b8e9..25bb8227a6fd 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi @@ -52,6 +52,8 @@ device_type = "cpu"; reg = <0>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; cpu@1 { @@ -59,6 +61,8 @@ device_type = "cpu"; reg = <1>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; cpu@2 { @@ -66,6 +70,8 @@ device_type = "cpu"; reg = <2>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; cpu@3 { @@ -73,6 +79,8 @@ device_type = "cpu"; reg = <3>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; }; From patchwork Wed Jan 30 08:42:03 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: 10787879 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 214A391E for ; Wed, 30 Jan 2019 08:44:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D4822C6CD for ; Wed, 30 Jan 2019 08:44:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B89C2E53A; Wed, 30 Jan 2019 08:44:06 +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 A11C52E534 for ; Wed, 30 Jan 2019 08:44:05 +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=nUInO3G/wmes9DhWNEWsPptjhHRV2Es7ZARPhgTej6A=; b=J+GA01qTd9qE1U r277JKXw4yA65EgGnyJmDlkCQqoc1KnAD7/zHlp2oisydRx5HAwJix/9tLEHudp1BeBX4knixKpUO 8ADLN65d4Fe0r2iNwvIde5w3ymjThjNitv8b+gx4SSuWPUFiPD9i0kISKkC1Z6imomv/GZb4lnkOk S1TvdZJNIoS+W9+T8/fS6Mtv5Qbh8zWn5T681qEoPFJg3MLAmKFtfo5jYsX6ZtiP4q0qqlZ3Zk9NF +pXlNhjdEVifKRa9SxLtQvRVc5lajulISSlASqhGGJ7cd148l13fjrlRbPyIGBt8cZBIl4Q6fkzs5 1tyt1SkHWKKTOMCIfXig==; 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 1golTX-0003TT-3D; Wed, 30 Jan 2019 08:44:03 +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 1golS1-0002Ed-Ql for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2019 08:42:34 +0000 Received: by wens.csie.org (Postfix, from userid 1000) id F3F675FE11; Wed, 30 Jan 2019 16:42:17 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard Subject: [PATCH 10/10] arm64: dts: allwinner: h5: Add CPU Operating Performance Points table Date: Wed, 30 Jan 2019 16:42:03 +0800 Message-Id: <20190130084203.25053-11-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_004230_331513_C22573DE X-CRM114-Status: GOOD ( 10.45 ) 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 Add an OPP (Operating Performance Points) table for the CPU cores to enable DVFS (Dynamic Voltage & Frequency Scaling) on the H5. The table originates from Armbian, but the maximum voltage is raised slightly to account for boards using slightly higher voltages. This has been tested on the Libre Computer ALL-H3-CC-H5 and the Bananapi M2+ v1.2 H5, both with adequate cooling. The former has a fixed 1.2V regulator, while the latter has a GPIO controlled regulator switchable between 1.1V and 1.3V. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 67 ++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi index 25bb8227a6fd..0e83b8a25f9c 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi @@ -54,6 +54,8 @@ enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; }; cpu@1 { @@ -63,6 +65,8 @@ enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; }; cpu@2 { @@ -72,6 +76,8 @@ enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; }; cpu@3 { @@ -81,6 +87,67 @@ enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; + }; + }; + + cpu_opp_table: opp_table { + compatible = "operating-points-v2"; + opp-shared; + + opp@408000000 { + opp-hz = /bits/ 64 <408000000>; + opp-microvolt = <1000000 1000000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@648000000 { + opp-hz = /bits/ 64 <648000000>; + opp-microvolt = <1040000 1040000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@816000000 { + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <1080000 1080000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@912000000 { + opp-hz = /bits/ 64 <912000000>; + opp-microvolt = <1120000 1120000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@960000000 { + opp-hz = /bits/ 64 <960000000>; + opp-microvolt = <1160000 1160000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@1008000000 { + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <1200000 1200000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@1056000000 { + opp-hz = /bits/ 64 <1056000000>; + opp-microvolt = <1240000 1240000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@1104000000 { + opp-hz = /bits/ 64 <1104000000>; + opp-microvolt = <1260000 1260000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@1152000000 { + opp-hz = /bits/ 64 <1152000000>; + opp-microvolt = <1300000 1300000 1310000>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; };