From patchwork Fri Feb 15 13:49:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10814987 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 CC7DB1575 for ; Fri, 15 Feb 2019 13:50:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7B032F45D for ; Fri, 15 Feb 2019 13:50:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5F1A2F4EA; Fri, 15 Feb 2019 13:50:14 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 5A4452F53A for ; Fri, 15 Feb 2019 13:50:14 +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=TrP7AAFJzax5UkwYI6wNXIwGAovkUScbX2PA+whW/MM=; b=sCuS1p7p8UsZPfiG6vgTAOavC5 LEHeBM3wdxVXcZR9iS6UKbMTVkY8D/xRi3mcix6W7/RI3WHq/+AmaWnMWNBMPpOvwT6vIBdRPYsf4 mM62EhtF8MpFEG9jGO6UI0sfkqbpXU76CJJfYnyNZ2Ihe11iF9H6dU/X1OgoxuOnuxsk3yUqyzmig pr5tTUi2tv1Qrx2YRXF1JTNJ4bl8XACafFBHND5aWztctXkR2yAU/9PFnVbexdsZ3ZQXY2oLrq5AH 33AUqfF9kLGGoo3spooBlGtSa+sWWuJS2pfzqFyNIPIahInB0qTIpThKgE+wRFvM9ZDxlZOeCkN1s KP6dAQ3A==; 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 1gudsZ-0003io-97; Fri, 15 Feb 2019 13:50:11 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gudsA-0002sE-6p for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 13:49:48 +0000 Received: by mail-pf1-x444.google.com with SMTP id h1so4871029pfo.7 for ; Fri, 15 Feb 2019 05:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ua7hPALHiIARKMyM5vp4cVSEQYhQCAK1y4Mldl9hYmE=; b=SUdIkILNKbrThMwrxZCsayoWOfbdTX2g56JlRBeoSzkw2koyMBpkm7D+A4pqlPqu8j 6sx0NZck7pEzDzw6W7xd23f8MOesVRLOw6bn43qcPozZou+cQppqxliMNEEg3u3+O67D UedNnVtK4cBiv7cFAbdM0AvmVIsT2BVniaXo4nB7aTj7/MNy7iIGju/znkqO0JsQ2nCO IV6VwZKto4jmkJ7j1pTDdWTuy1aaU0UnNcQoquE++yEJqOf5oJAICGVrATOg0HkvFEf/ w1qfKxEkzn8ha8cGZDHV4LTPsL5UZdL11DGKHke694k+Q57okGW6uY2bE1o3ThDu9ovD J3LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ua7hPALHiIARKMyM5vp4cVSEQYhQCAK1y4Mldl9hYmE=; b=gpd00hYVijLKMELR+tkjLn5hd8P240V1iCXXuS0jj65X0e45qjOS8g4P/iG8rwuLkj P0PS3HiCVI5WIq5/N6fR18ofbO6tmQmf3XxthEJ6UWZ2ymh2rGLbZR9pGVHza2h4DSZl oM9f2YrxgpX/cejVEmul0y2og3ez+UvFubxfHV2yW68xkxCPHGqYe6YS8Ib3gu/y4eea av5M8cSRCxe+ClcTHouBpx9cQ/aPj32L3Dl2Kv4cGxgEnilrx2OzOqFUDTQ7Bhh0ABhY WtJs9ooOY+6yZVwYbIoxOpM1OKHeKMt2282RiJ3Axa+Hfddu+vnWvkhdDmWDEoCBQtK+ G2UA== X-Gm-Message-State: AHQUAubgE5g6KjTAHK3tByB/0a/k6dGkBeRkdiBmF71llGX+lsxZ+Voo M6scytmQ7jzHeJd8BptUDtY= X-Google-Smtp-Source: AHgI3IbZsCVHGI52vrVzACQkZi2FipVAL9Drh7gLlLvOIgexSuvkL/MdN9BbOT+NL1zwQgV3++C72g== X-Received: by 2002:a62:a9b:: with SMTP id 27mr9834425pfk.223.1550238585509; Fri, 15 Feb 2019 05:49:45 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id v9sm8595498pfg.144.2019.02.15.05.49.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 05:49:44 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATVH v2 1/4] arm64: dts: allwinner: h6: orangepi: Add CPU supply regulator Date: Fri, 15 Feb 2019 08:49:34 -0500 Message-Id: <20190215134937.10259-2-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215134937.10259-1-tiny.windzz@gmail.com> References: <20190215134937.10259-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_054946_325663_23E7D73C X-CRM114-Status: GOOD ( 13.46 ) 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: Yangtao Li , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 The original orangepi use the dcdca to supply the CPU cores. According to the axp805 spec, the range of dcdca is 0.6 to 1.1v, 1.12 to 1.52v. In order to support more CPU frequency, slightly increase the voltage maximum and minimum. In fact, in sunxi's sdk, the actual minimum and maximum voltage of the cpu is smaller or larger than the datasheet. For some better quality ic, the minimum voltage can be smaller. For some poor quality ic, the maximum voltage needs to be increased a little. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi index b2526dac2fcf..e7aebaf91ede 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi @@ -159,8 +159,8 @@ reg_dcdca: dcdca { regulator-always-on; - regulator-min-microvolt = <810000>; - regulator-max-microvolt = <1080000>; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1160000>; regulator-name = "vdd-cpu"; }; @@ -191,6 +191,10 @@ }; }; +&cpu0 { + cpu-supply = <®_dcdca>; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_ph_pins>; From patchwork Fri Feb 15 13:49:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10814989 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 5DECB17D5 for ; Fri, 15 Feb 2019 13:50:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4950D2F54D for ; Fri, 15 Feb 2019 13:50:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 479A72F5E6; Fri, 15 Feb 2019 13:50: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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 E49A62F54D for ; Fri, 15 Feb 2019 13:50: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: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=I7rlD2JsQeWr5RDNu6ThPBi7ysAxpSM3eUBmGSEfZm4=; b=MF6yiXGan9gZBeugyBTXg04bgV pAnonGyBka1eJXT8cL6bDQtuwYBEEk1GHGBO/SbOoKFjItudSRNNYGxGPNGUILOYCOXCeX02/jlk6 S+y0qKOGlaYoWzTkRX8AA77UOuYRs34m8NZ6ROFNxTrWBpapZiDw5QG6hzoy0FgrqCP2W8dbdRdGS Y95/pYwVu0V11psHYZLOEwUiELCAMEYrOXGNZ3yMm+63ldq02WqKDA39Z0MYCuuI8D3FpiW537/qU QX6Q8tWJ+UDsJmhvnA8YtlAKd7rw1DzFIhl3puRMmWHmcLZSx1VYfmXSUGrVQKTAnu1KSsHsBnpib 4jUIx1Kw==; 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 1gudsl-0004gE-Pq; Fri, 15 Feb 2019 13:50:23 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gudsD-0002wH-Lq for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 13:49:51 +0000 Received: by mail-pg1-x542.google.com with SMTP id w7so4831358pgp.13 for ; Fri, 15 Feb 2019 05:49:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YN48q3Zw1C88JTVxjBmspop5bBKX5JFTmVnaYzS0vaw=; b=U1Y8ABFNe6DijqVmeFghi1ptQycTLD+AneOaZGTppxTLyooSw/+mP+mPaQPTgJ5jLg zGJBTFfultmw9FNXiUzJ7NbKw5IbHOq07XuI73OTMPZcYsmyMY4b0+SifPOpik0+VWVe 3lp7eFdrtkAUz2tn90iufIslKWgaEMd5thLSbi0ru6lnRE7Rvnbt80bTlMFqGS5FC/yO bBvBw/C/ui0AcQm2amMXlBDDPimk3rHUJAGmA55oRh2OakBUbkaxOicGmYyEL7fhub7R A3VvbN4OL3YzjuEjlJUgT45g67RVDhi4dv2sRXKMlO+Rux62gGm0+/slngYHCePB9hWq K5CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YN48q3Zw1C88JTVxjBmspop5bBKX5JFTmVnaYzS0vaw=; b=FD2rM61wX7MefwxgO+skO+NK8dSnohgFhdJvL+JSzHgtpgXtJQFMtgYX+c/Ce8On24 6iGs/WFfBAeyCN7+9XTeWwpTcycaN47kVrvvlDIHhV+eKXJD9zN1OMmX2GGUTyEGZJ+R 6jhEOtC6XV1TKs9SzVPuevcH5TCkQleqDxK2bjKiwKaW6ErSvwJFtuyMsyoNV9TArJOt lYcmg2oqZcpH8+HGKlRN1XVcti4Ai+gWC9xeg8Ec74/Ms4IZszkjf/l0xwmrJuPFqH6b J9fyhWyV6QBVwX35OuMe66398wFi1Xq9kB6WklSp9d/KU6X5+KoL3OWcCJvao2QEixrH an+A== X-Gm-Message-State: AHQUAuZmAKGl0De5IwWcyhnVRnMjMJ1KtcTqCT5FaiPHaQsEQPgmY/uL nRtU583lmTLUaS5HN/rLstw= X-Google-Smtp-Source: AHgI3IanpSBU/woZi/rbo/sAUBkkZZHXhkf3OiaM5s7cI2TzXZ53uDCHzdYMrtQ9WKuwbM7l6bm5cg== X-Received: by 2002:a62:e515:: with SMTP id n21mr10020282pff.159.1550238589121; Fri, 15 Feb 2019 05:49:49 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id z62sm13122129pfi.4.2019.02.15.05.49.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 05:49:48 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATVH v2 2/4] arm64: dts: allwinner: h6: pine: Add CPU supply regulator Date: Fri, 15 Feb 2019 08:49:35 -0500 Message-Id: <20190215134937.10259-3-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215134937.10259-1-tiny.windzz@gmail.com> References: <20190215134937.10259-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_054949_749313_F5D00963 X-CRM114-Status: GOOD ( 13.46 ) 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: Yangtao Li , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 The original pine use the dcdca to supply the CPU cores. According to the axp805 spec, the range of dcdca is 0.6 to 1.1v, 1.12 to 1.52v. In order to support more CPU frequency, slightly increase the voltage maximum and minimum. In fact, in sunxi's sdk, the actual minimum and maximum voltage of the cpu is smaller or larger than the datasheet. For some better quality ic, the minimum voltage can be smaller. For some poor quality ic, the maximum voltage needs to be increased a little. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts index bdb8470fc8dc..95c81250c2b3 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts @@ -213,8 +213,8 @@ reg_dcdca: dcdca { regulator-always-on; - regulator-min-microvolt = <810000>; - regulator-max-microvolt = <1080000>; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1160000>; regulator-name = "vdd-cpu"; }; @@ -251,6 +251,10 @@ }; }; +&cpu0 { + cpu-supply = <®_dcdca>; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_ph_pins>; From patchwork Fri Feb 15 13:49:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10814991 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 250BE6C2 for ; Fri, 15 Feb 2019 13:50:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 119142F533 for ; Fri, 15 Feb 2019 13:50:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0EDA22F532; Fri, 15 Feb 2019 13:50: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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 AC1E92F5C9 for ; Fri, 15 Feb 2019 13:50:47 +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=dDOkV6jlUsS08FE8T4N2xl55Rv/6nrXa2cE+qZp+Gd4=; b=jZARe+65gP/k1UiuQl3Pkv1RNM MZ3+EF2QlG/9N86WMUpzyM++wC8RkcCQVapHyWLJyMU1A8Mf5g8ZI+R+xKDbpbvkXcepAuygmYyOA f+ByXxO9lJ4Gh7eDMRoIk/n/vSHLcHf2TEKMBDAm2+EoAtZQ6k7WnXmy+i+QZstud3IBUP8a09PKE 1huLTTquDio/+s03fsdv78RfA4sPEjss6ONSGji+2/8mbc3LIll5cmzZ3baSsMzgT/gTmBpdwrOrI KQcggVo598PgyMMdLBbTQv+fc9G60Ub0A/jmp5q2A1uwf8DwOyY58nYSmCT3tyFFV1BLdA75nmxUC 735u3MiQ==; 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 1gudt8-00050J-04; Fri, 15 Feb 2019 13:50:46 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gudsI-0002yP-LK for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 13:49:56 +0000 Received: by mail-pg1-x530.google.com with SMTP id q206so4856644pgq.4 for ; Fri, 15 Feb 2019 05:49:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uccmsO0qVZau17wPhnmEOlY4fogBW79/IYa238V6d90=; b=KKheqm56wSJPNiObAsGRMR7nrwuSfrpChRtT2s+Z6r4ZCn17x5n/EYfI51tsXdaqpG FCBLKJLo6I2Z8v1+YZEXb/oB6nCinG3V/usVnVfxVeEKUmuWhIS/ALxIxvVu0BYaE9z7 irViSXv7Tn2WD0Naf2S9WObt6PPqL9d+oz0dbN0MdICsRoD/VBq0f4eXqeqKFDeq/FiR lQoP6F03APlT4zzYFTleBlQTVrWTaqcbdeVDoBEJ8LlHA+Pw+MbKRVa4PzesSimEjapk Jv1WUUbbkVwEbe+oFyCJ0+KzKvWDBF6rBLSNyEe4dOXe/ur4Jy15/ZyDR+Me6nW9dMoW B+NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uccmsO0qVZau17wPhnmEOlY4fogBW79/IYa238V6d90=; b=EarjdQgqn+euWGjjaYu98DJsXv3kpGgw6f7IDDN/e2W9uSbKRNL/6MO5Sh8OUtpapj WT7nk2cGr2lsitbbknr5q6wi4GJkgNnKj5UV+JEUHEKC8iQClvZYd2dFAFvQ5A0dKmsp qs7ZQjhFGcKFV6PxCrcg2Zkgb4qr39Ox6DS/TsiRXgFsZo9gfF3X+ws2iBKNr1h0C56B TJIRXb2WwtsM9DWwrljMiXWj8jQq8sBjyYbU581X2IO9nbOwBcaKh4DaDcCurjMr7uBw +N/x6VsrWAIzRKFm8XnJz7SP0z75NDkHaotosrO1vT5KieEikagsG+cbkanaL5ypLG06 /Q2A== X-Gm-Message-State: AHQUAubAu+tmgw+1IJiugB84S8EPm/X1X+bMLHBdFSrub7iTnlZVUOow QaBI7gGnAr8tvpg/iit0AvI= X-Google-Smtp-Source: AHgI3IYakrreBuSO4RtFWN/QeHmDAv0CIXF8Jmh5Tj8DSnyIC2iF243BrWxBRJj+AtrXTXroF3jijg== X-Received: by 2002:a63:c204:: with SMTP id b4mr5442261pgd.335.1550238593092; Fri, 15 Feb 2019 05:49:53 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id m7sm12430968pfj.162.2019.02.15.05.49.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 05:49:52 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATVH v2 3/4] arm64: dts: allwinner: h6: Add clock to CPU cores Date: Fri, 15 Feb 2019 08:49:36 -0500 Message-Id: <20190215134937.10259-4-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215134937.10259-1-tiny.windzz@gmail.com> References: <20190215134937.10259-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_054954_703700_D39BE800 X-CRM114-Status: GOOD ( 11.58 ) 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: Yangtao Li , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 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: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index d93a7add67e7..723f5d991a74 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -26,6 +26,8 @@ device_type = "cpu"; reg = <0>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; cpu1: cpu@1 { @@ -33,6 +35,8 @@ device_type = "cpu"; reg = <1>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; cpu2: cpu@2 { @@ -40,6 +44,8 @@ device_type = "cpu"; reg = <2>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; cpu3: cpu@3 { @@ -47,6 +53,8 @@ device_type = "cpu"; reg = <3>; enable-method = "psci"; + clocks = <&ccu CLK_CPUX>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; }; From patchwork Fri Feb 15 13:49:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10814993 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 6AFA414E1 for ; Fri, 15 Feb 2019 13:50:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5372E2F4E5 for ; Fri, 15 Feb 2019 13:50:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47E3F2F5F9; Fri, 15 Feb 2019 13:50:56 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,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 D55CF2F533 for ; Fri, 15 Feb 2019 13:50:55 +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=oXEObjJA7ELdTXL2Ezshw9BhWYBYYFsfK3/FooeULhc=; b=IuOngB+DsxIDX37EdvD4X0RdA+ 6qM85VZOoeAOnZvwAI9KAM25qw33GDLHGFLM/W5/kjdr6Dsk9Cta09xSzjUjftLHX6AfDjVypLMW2 4XVKWdDAe5MnCpvHJfxOrMXY05uNVR+0/pVl6W+Y65aw+5tZTxRdkh6XudaeOPgSP7duO5xa8juyo 6cwY2uRKCvR5bUoQIly86GSqrfzFzAzGhJnF2Mj7kPLoyUx5PCP/UbgaREWhFNiazUc1CB96G4uIo 9Bb7+P2fKiBhPvoyj/r9lTICe8WxEdYPrw2Hb196wAnO7cr7byKk4lXYN11K7a26a/uExq284EiCZ e5sBT7Mg==; 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 1gudtG-00059L-Gk; Fri, 15 Feb 2019 13:50:54 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gudsL-000310-G8 for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 13:50:19 +0000 Received: by mail-pf1-x442.google.com with SMTP id n74so4868681pfi.9 for ; Fri, 15 Feb 2019 05:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lmPr0f7y3m5+PsytZvDuOz52e0HbFaKrkiyNn/QTcv0=; b=rYtk3b6yXh3QjciyPCKhT/XhQJlnGpaykwgjpFwiLRAYm40PsxbBKy0yPYVhoJ2bje 7GXwcjQLLkCQ6xmOyo823Getk6KGWMEsFdBE8K9PuRj3XwqJQJOZgHlByl4hm/Ze8lC8 AKGs9/78KhWgyiSTtzR/UsSOWgSXcVqVRNsgvlmnbwE+X8HLMzD7ZEFi0GrR3UXVFlmf 9d/mImnSXYvaplQkTOO6/LpWiNZunpkVBb6Ts7yuv/bBhYUvClnSKG3K/3w/ox1XuVFn lGjQlQqlrFgOn91Cy20zuqBIHaGE1DFyfZNmHrVn/izVOI4LguqHAli95oe7EyUB69rB aGJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lmPr0f7y3m5+PsytZvDuOz52e0HbFaKrkiyNn/QTcv0=; b=q6wjrEkST7AsTvG+Fjg5h4BlPCj3aPLkOJUFbx8uHHXtiWJOTtFa5YVdaR1r7nVpjA nRORio7IohAWDZXucNqJ9pIMeS7fBqTbfq4dYZGOfn5LS+4zoWvwqdEg42n7dX7bpZXx ++gZ8bGjcmiWCSNz17OUob70CHwvoFsUM7AYgFNMjPMx93/L6tPSjw5glA/46nj2X/l9 74IDWv3j0Rqltkeyt9ZRm83mykzy7IhwvZlc3PMKpWHt/WweFw890YXGkE0YP6fy8Juv sNvq5RTgiwHvLixR0Yy+QlksdJ/fjCwFeQG0c6UcpoSUoll3OxZ8JFNtLJJlAYVtdTC3 dDPA== X-Gm-Message-State: AHQUAubPlLn/CJoNeZrxTQUxjzYm/FoZKLJ1CgJDf/kCQ+7DBPl0TnLi HiUCtM0JKSv96+af+0MuO/c= X-Google-Smtp-Source: AHgI3IbNk3I5+OCPsiR4MT7lg4rskqavJlLuodBpXsexgfJQ+vhB2leyMMcL5uSa/a769rP32BGtkg== X-Received: by 2002:a65:490e:: with SMTP id p14mr5464986pgs.373.1550238596863; Fri, 15 Feb 2019 05:49:56 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id j5sm6871172pfe.84.2019.02.15.05.49.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 05:49:56 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATVH v2 4/4] arm64: dts: allwinner: h6: Add CPU Operating Performance Points table Date: Fri, 15 Feb 2019 08:49:37 -0500 Message-Id: <20190215134937.10259-5-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215134937.10259-1-tiny.windzz@gmail.com> References: <20190215134937.10259-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_054957_856369_72485B2B X-CRM114-Status: GOOD ( 13.21 ) 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: Yangtao Li , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Add an OPP (Operating Performance Points) table for the CPU cores to enable DVFS (Dynamic Voltage & Frequency Scaling) on the H6. This information comes from github. When the four CPUs are running at 1.8 GHz, 100% busy, it is easy to heat up and make the system restart. And currently H6 does not support the thermal driver, can not get the temperature information of the cpu to control the highest frequency. So temporarily remove the opp of 1.8GHz. When the four CPUs operate at 1.4 GHz, 100% busy, the temperature is stable at about 90 degrees, and the system can still operate normally. Signed-off-by: Yangtao Li --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 55 ++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 723f5d991a74..84fb47062fe6 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -28,6 +28,8 @@ enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; }; cpu1: cpu@1 { @@ -37,6 +39,8 @@ enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; }; cpu2: cpu@2 { @@ -46,6 +50,8 @@ enable-method = "psci"; clocks = <&ccu CLK_CPUX>; clock-latency-ns = <244144>; /* 8 32k periods */ + operating-points-v2 = <&cpu_opp_table>; + #cooling-cells = <2>; }; cpu3: cpu@3 { @@ -55,6 +61,55 @@ 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@480000000 { + opp-hz = /bits/ 64 <480000000>; + opp-microvolt = <800000 800000 880000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@720000000 { + opp-hz = /bits/ 64 <720000000>; + opp-microvolt = <800000 800000 880000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@816000000 { + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <800000 800000 880000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@888000000 { + opp-hz = /bits/ 64 <888000000>; + opp-microvolt = <800000 800000 940000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@1080000000 { + opp-hz = /bits/ 64 <1080000000>; + opp-microvolt = <840000 840000 1060000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@1320000000 { + opp-hz = /bits/ 64 <1320000000>; + opp-microvolt = <900000 900000 1160000>; + clock-latency-ns = <244144>; /* 8 32k periods */ + }; + + opp@1488000000 { + opp-hz = /bits/ 64 <1488000000>; + opp-microvolt = <960000 960000 1160000>; + clock-latency-ns = <244144>; /* 8 32k periods */ }; };