From patchwork Fri Feb 15 15:53: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: 10815119 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 8000513A4 for ; Fri, 15 Feb 2019 15:54:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D7E32EC3B for ; Fri, 15 Feb 2019 15:54:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EFD52ED1D; Fri, 15 Feb 2019 15:54:07 +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 1034C2EC3B for ; Fri, 15 Feb 2019 15:54:06 +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=s3IgF4xLM/b9tfy5/Ywd1aP1Fy D5pT0R3DAoarlB6Y5s96do0mOC/xuBp4/0ROiIm4iHeInPxtdy8x/k3yqAS5yV7U75N0i8pujEaO3 ZzZ/6wSh5y+V9mOhr++SejtlibklYTLB93+llzYjwi/OybsFm9ODziJZpow2Yr46e2wkRC7iBm7D1 /i6atxrsDUeCiMSQo5XZy3FEmZ8iZY3Lhig9RswFLp/cl8tzLd0/i5DHOewIJDGRSG8yP42QMlC9h XPPG2Hf+315CSU1aABAOvzHHOzm4rcxMfYcW5VtFGjdOzmg9QeE3SlcM15vJLVPg915jm+PECVxiQ AN8Ko5bA==; 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 1gufoT-0006Vm-7h; Fri, 15 Feb 2019 15:54:05 +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 1gufoN-0006OD-Qw for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 15:54:03 +0000 Received: by mail-pf1-x442.google.com with SMTP id q1so5018138pfi.5 for ; Fri, 15 Feb 2019 07:53:59 -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=cWbTGWwcksU58COyasdg2y9snthOMSvYD3iH71rA5Pdpn9tfRgoiXp0bWDTlhJBRms 8yO+h/Qx2/g7u4UJXfL79nYJq0fZ2ZnhRbkiGi8qHJBWhQKPKmLr7jzR2Dw9F6Q8thIt in82IrQE+5SUt59zfdDabCRNxIwerm3/0mHmeO0wOfNVw5Pv4zt7DrvP4Df+lbhxNg8n PcJjm8Af7Vn2Qm4FcYMK5gi2sq20P0r8FXS+Sz6b+77xuw5lFWR9prlP4yDiJzV3BMb/ kgH1d6GMYffnGbnD0nZKwQ0HXjx6Y7baYkSDTv3S5hvYDFp2CNJLREYj4TCIEVCZYtk7 wDAg== 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=LqutnnXyOH+e4go/VDM+fHERNdtZDLwyZjMRJY80vdshVoCDRJWaqv8EKV639w2ByG P8zPFyeZHNChB37CMPJInE2w80+oqXSDj7kU4Cx6aE8YbSCN9aBaNKTg+EBKWHE9OlAf 4gYWSlzk/iV/wCEa1qbWo8Yb9CUmxDD0IDBQTmtoa17WfyUYuQozTEbzVssfaT6oQTv9 ZOA1LETPYJSJoX6B6TYv1O38+tTTmEdwm3G0SldhDjuehoRYRfnEAKpZ7E3yFv0hkXSQ gLkxP8KTwQGDpEPd3xSnGPh2J5GqoJbGP0QoVnILB9ZSmLSGYnxemCa607MfqBSngkUb TqrA== X-Gm-Message-State: AHQUAuZtbgYat51Gu9I2pUPszmzWJhR97gphuX/J5l2/t0sTdywwuO4g Q68SwVhxANqyommZSXYlXB7HslzpNXc= X-Google-Smtp-Source: AHgI3Ib7h/RNzKj9f2oMf8yn4Dn9ea2wY/ByCaKy7dCzF/lrDfpnlj1DHWBIUFRtKh+ML3OtyL7bVQ== X-Received: by 2002:aa7:83c2:: with SMTP id j2mr10375984pfn.119.1550246039438; Fri, 15 Feb 2019 07:53:59 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id n73sm8130397pfj.148.2019.02.15.07.53.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 07:53:58 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH v3 1/4] arm64: dts: allwinner: h6: orangepi: Add CPU supply regulator Date: Fri, 15 Feb 2019 10:53:35 -0500 Message-Id: <20190215155338.10564-2-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215155338.10564-1-tiny.windzz@gmail.com> References: <20190215155338.10564-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_075400_395609_36C68D39 X-CRM114-Status: GOOD ( 13.67 ) 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 15:53: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: 10815121 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 E92C913A4 for ; Fri, 15 Feb 2019 15:54:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D49BB2EE39 for ; Fri, 15 Feb 2019 15:54:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C653D2EEC0; Fri, 15 Feb 2019 15:54: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_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 7C5A32EE39 for ; Fri, 15 Feb 2019 15:54:22 +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=TGNEjtva9HxinT0EkE9z82Keaq tp2Yu3bQMfsrgD2LNrMwP43VwJgzHUr1L7jbiHsilehg7oaEuM+OnDYkRlly1p/CErUdKugTYYCpo ARoKVHh8ZhboHsLMGfEnPOjSscO6F7PjQCGh/xOyS5iulBviOq745RQxCuJWefpEZuD3PAqpP44uJ feP+MzDRbjSy31x8nY8t+MxwnMbjsqytWfjwlV5+oQ8C285zJ9tyjRYPl7qWd8V9MxzuTFBnZUHm5 P8sox/POU9TUPsum9RG0GmHdD9bxQR/DrCxYTALNzKgneWHWCsl686xLEo0yM9jBu0IQmJDDmSx2Y lmkABwEQ==; 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 1gufoj-0006qa-NV; Fri, 15 Feb 2019 15:54:21 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gufoS-0006V2-LL for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 15:54:06 +0000 Received: by mail-pl1-x644.google.com with SMTP id o6so5130810pls.13 for ; Fri, 15 Feb 2019 07:54:04 -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=cb0QzSvId+z25WhlzgfX5mIlvBFIAUsRQ0SctR9h2phfPj2w1odL1yoTdMbz62oOE1 cqdjg1Kl255cn94fOlOjuKvZRDCHRRuKkRGoE0NeO/MClnP3bmGW4BqPwA3Ako4/LOlK mAIwfoJrPBBRuHeSOwkKGaMGslizuZWDcDZV0htArlTuFX5Id14T/+yRH6s64QTt23Aw k/0QeF9TvrPXNhoZcYZK3GgziLhcAOKYc29dmeXMLykwXXSrwbyM32+cEQyPsZcelU/q cmsf2ZYjEhzI9VzbLTy5eyiCt3mlCuKB3Dty74Gua3meRrhH7e+JFFPRFkgjH0eelQs2 hCeA== 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=Ax0rTqYCc76PyjDQ8b/BNaLSn9c4yajFtATGRgfMbwup/Pfd+7f/rzyVMbIYmvnTcy yWFE5+Wf16wLhLqacEikbqNIXbuOGxv0RZ7+XychdADSHFNeVmIdStnV6/slsH83xHpk a9gjfs5i8fzMHt/bkhxueTbAOpcG80a/YySRtHmy0YVXfPOGelMH9LE7iUal3/h6vjZo Baa5C2UD29kzo92NECIs2LvzUp5cWRyRn6Go3JaXK5uqPdyLNPKJai1Xr/n2S6+1k9uu P3X5+DeRw7vhA7fYpsayN9KTu96ZSMTB57fNzl54Ifc52feckTeYZgQaXj85Q7rZmQ01 qfbg== X-Gm-Message-State: AHQUAuYug5f0rU4Ldk6oZTRds4xRcVbV9nRsyBYv9iVVWsHb7V83RCky KC7AMUwftVY7PJPKAHBks7k= X-Google-Smtp-Source: AHgI3IaV+xJCF4+x5CO7mMHlTRM5Lh4YexFgYI8b++u1BnbiH7vz1DsuQQ9HSkIoW0uO+QBiv3WNRw== X-Received: by 2002:a17:902:6bc9:: with SMTP id m9mr10731462plt.173.1550246044191; Fri, 15 Feb 2019 07:54:04 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id b9sm5956952pgt.66.2019.02.15.07.54.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 07:54:03 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH v3 2/4] arm64: dts: allwinner: h6: pine: Add CPU supply regulator Date: Fri, 15 Feb 2019 10:53:36 -0500 Message-Id: <20190215155338.10564-3-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215155338.10564-1-tiny.windzz@gmail.com> References: <20190215155338.10564-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_075404_708840_14FA81D2 X-CRM114-Status: GOOD ( 13.38 ) 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 15:53: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: 10815123 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 8CA3F13A4 for ; Fri, 15 Feb 2019 15:54:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ADCA2EEB8 for ; Fri, 15 Feb 2019 15:54:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EEEA2EEC2; Fri, 15 Feb 2019 15:54: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 259772EEB8 for ; Fri, 15 Feb 2019 15:54:34 +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=pnV4yV13Ypi6/siVnBNG39e3/W LuONQBN3hS8sOrShy1SIhizdg1sZbV8oEJN0RKK9LTf/pwNwbIjAxR/EoU8+AIUN+fW+U26x+1VNg Se0d9vH7LYwke5/Q/fqL5Vy6/C1g5agssxNeeLMea15H5nggOjlLDhc3/3KuD2ugumyFewFAZYabS V+13PA04OUX/KQ3H6yK3PjEPR54DQXZjkeMfw+ZsO1bU3JLYfDRKuQEaQIgf+0WP1I5/IB5EyjH7e SPUEETF3SGSwlm7jwTpgRNvVD2wR4beUgYjniwkCn72XuOpCK5tJRGmXsay4kN0MsOlFXwyoKcOw3 o2enL1Hw==; 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 1gufot-00072U-R4; Fri, 15 Feb 2019 15:54:31 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gufoV-0006Z6-Ut for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 15:54:12 +0000 Received: by mail-pl1-x644.google.com with SMTP id c4so102802pls.11 for ; Fri, 15 Feb 2019 07:54:07 -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=emxoL1KzvzBcIgE2xzDLh7qQzKB5SPIhFRdU/nNbfCtvQ3N2E0XxdLeXWEw5rtjIqM kRk6rj0ofsbvEBSyjwXDDG8RdvsAZp/t8rRWT0E95HrJuh5q6Vm0SeVxWHqDM0WD7Jn+ uVBum94XxNDtNnfv8ap3JWNhdkbSBivgcE7W0fPGLEyZWXEtT6CZSa2+VM0uJlsvVWMz 2rBn2+BMW3XzTmmS5JUUrlPnK/FTmXjhcGnmeXBvuA+42WEDvUAzGXRDTw8zg1U1ZTPC gZY69Q7rtlfVa1gotmkEpvX++r82UIVP94lp53OA+oqI69XmjdmR6oPFSm3yjYZfkU2l FHXw== 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=mYStxaa1SvVrLRMSi5frP9tmfDjrmZh6aAA/K2IjSO8IE90HBBAZgX4MKdMJV4tp0T uJomimLk/UMKbMEr7PrBu0KfwvbInCfrYNDHC2B9blqL2bxTXMAZ2mkWCwUZc9uV+/21 j46LeHeF01Kx7zOoLAjxY7rFAEeu5JJHKkzP9SmqXE6bK5ODF7GCY7BsAqhlHhN7zd0h 30nsaS2KxIUUFyubUqSr6CobyS6XI2GOJoS0LvanLKzvvPIbhc4TrE+BDrblIh6cxjPE osU3WeeylWocjTMzAFWL35g/GwVYI6Zg7oeIXSgNMH2CgAUjcz1GIEjccOX+HeovKvnT BxWg== X-Gm-Message-State: AHQUAuavVxtHEqYxAOkcLJItYy7ISugIemaeUIkUYGvh6GlOLYpAIz2s rZOoXV56I+Eje8b6MYOMbRQ= X-Google-Smtp-Source: AHgI3IbrDAhQRuLksuCQbodqFBztTLP/msRY10qRi8FyOrURXineipyQrjlm6aaywNpMUCb9I3dFLQ== X-Received: by 2002:a17:902:8346:: with SMTP id z6mr6310437pln.74.1550246047408; Fri, 15 Feb 2019 07:54:07 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id f2sm6217792pgp.32.2019.02.15.07.54.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 07:54:06 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH v3 3/4] arm64: dts: allwinner: h6: Add clock to CPU cores Date: Fri, 15 Feb 2019 10:53:37 -0500 Message-Id: <20190215155338.10564-4-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215155338.10564-1-tiny.windzz@gmail.com> References: <20190215155338.10564-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_075408_513649_7DA04E77 X-CRM114-Status: GOOD ( 11.79 ) 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 15:53:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10815125 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 8186B14E1 for ; Fri, 15 Feb 2019 15:54:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DF662EEB8 for ; Fri, 15 Feb 2019 15:54:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60C882EEC2; Fri, 15 Feb 2019 15:54:44 +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 0434B2EEB8 for ; Fri, 15 Feb 2019 15:54:44 +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=ucNqZrOvJ+Y29FAi50aKm3B5F8 wtbl/7KWAUUogrKWjZ3R/8FBsliYtO7dPPfSLt2Ou/G8HyE9B+cufL4ZC4F7XpbyvK+dKRZycfMsA YyhlrlvA8jaVO2KjxNvJCjX8FyjKfkR0NxVGx5B6BWtWtgPgXndhhzmyj0Jlvuwr2kSDHiuBczODB +tFniWhZH26cqWKG+qwurkZJX9PuuScQq5y63pHTPE4nJ0bHoKb9w2QOWG9eCEtFxmZa42/N9uP8o FtoNH6F52B0fk80M/vq1ozWS7xl2y2Vsu4Aztm3RsgMiBQAf0LLrv9Qs87lXwEmR4SAW6GAbLMvCW lY+frZDA==; 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 1gufp4-0007GN-M6; Fri, 15 Feb 2019 15:54:42 +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 1gufoZ-0006f8-7E for linux-arm-kernel@lists.infradead.org; Fri, 15 Feb 2019 15:54:20 +0000 Received: by mail-pg1-x542.google.com with SMTP id h11so2630315pgl.0 for ; Fri, 15 Feb 2019 07:54:11 -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=LfgTGXGNz4XzA7myb/CJBlRgbI9FYUnrZGUY31wHWnDKeMnkeVMt/pEbj+lZv0cto/ XVvqsoE1QawsMZrFzQbWe/oxetlwuDALWeM394LIdUFDpzDmYtCkFvFa3rnCQA6xMd6K //iRzR40DgXg0ekCM18vY7PYRSVmApSYQ+s1t187bOm4bpl1Zo9Nk7kgwxqaYydNHEtO JQU2hqGunWs6IiRrk0nUZPmiTso++EnbwuTuUWU34cv+rPq/pCbydxXvWqatLK8rf+iH beHo5zrUHjsGezCT+xItEhXvgv1GVvkpYmKu73zJAekOqU677wbpZCQ3+urKEVKEhLaO KWCw== 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=NiGKbgZfv4LkeLiS/5qrY7L0iSW68iELk/COhcpjHGYOXjY2gOYqNu3MOHyMEWR5s2 lwotByLsYDGQHKfTMLlSdvtyD35JlOOCoMXmB96DHx2oyMZm/JSSfPl5cHZt+iD3weer loBC0xs67dIRi3uQNGLduvTO3vqObH4tw+89WDzfpX3WFoRyQ1wkMbF0e5D0otowK7Ad LIWSNoVpxl0hmPp3Y3vuGUVFZ0S7zR1/hfJVafWSHu34H2MKMJsV3ErniL4O2DTvHRRC syqQ+fCk7NXZuyB61QAvF2HJ+/KkGDNeAJ8QhqEG/3rJQ4JT0s2Q2iFxtYJVNa8JQTVC XN3g== X-Gm-Message-State: AHQUAubX8zpbgy26+x6pb2VUoZVxf/NIZbKTk+s4kDi8JPg0YTkbTy4k UIv4OFAfwFk+s6SF6vV6kkb2YfMkdsI= X-Google-Smtp-Source: AHgI3IZC/YMxbW52MymaCchdH5AtkZkpgsGvF+MvLIKCfxV1rCXjwN2BXW6AXUfIJ5ZH11vVSIN6OQ== X-Received: by 2002:a62:ee0e:: with SMTP id e14mr10498438pfi.201.1550246050734; Fri, 15 Feb 2019 07:54:10 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id m20sm6256084pgv.93.2019.02.15.07.54.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 07:54:09 -0800 (PST) From: Yangtao Li To: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH v3 4/4] arm64: dts: allwinner: h6: Add CPU Operating Performance Points table Date: Fri, 15 Feb 2019 10:53:38 -0500 Message-Id: <20190215155338.10564-5-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190215155338.10564-1-tiny.windzz@gmail.com> References: <20190215155338.10564-1-tiny.windzz@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190215_075411_700807_639C0892 X-CRM114-Status: GOOD ( 13.52 ) 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 */ }; };