From patchwork Tue Jun 5 04:47:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10447587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA14F6024A for ; Tue, 5 Jun 2018 04:57:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A898028DE5 for ; Tue, 5 Jun 2018 04:57:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AD7A28E26; Tue, 5 Jun 2018 04:57:51 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable 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 EEC7528DE5 for ; Tue, 5 Jun 2018 04:57:50 +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=rerPr5WLZylQHJzX5mueYA9bdcD7pTW0lcvlnAYQ2qY=; b=qc/dsdSx+a/bJV0jCtk+JWZr6i Ka1XZD1S4IN3dH5z+O8HSL+MEP2W/HJ8/BchZVRVup50tQquGF0YtFxFzN/YQ9PNsFyj5UQUsPPN+ xKilq2jR+M6BupzIoqFD7ov2BXoY2l4D5IIU7Uq2m4GXTu//qD+lKs8FQj9yCy3cMSPMcpxqgADGC YvSdSY9s70wOGN5uic6usgTJASkXFPpvosdqHCV+PIGjztDkrrHg0flSkn8+u1vVFbHDIz/N0VEwR i2PHgXgzgz2chaM1I/4v2JwOfdcgWdnBX7ajB6ajuz3E8wg06PXZOyW0ylnfwQwZkA1M5SeYw+E9E rrSRrRSg==; 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 1fQ42M-0000cm-NT; Tue, 05 Jun 2018 04:57:38 +0000 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fQ41q-0000Ju-3c for linux-arm-kernel@lists.infradead.org; Tue, 05 Jun 2018 04:57:10 +0000 Received: by mail-pl0-x243.google.com with SMTP id t12-v6so739881plo.7 for ; Mon, 04 Jun 2018 21:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EK5+HMcPGyH+d85nITsGfzrFtzmVetc0ClcpmeTtERY=; b=C8fDGBcph1nnli3l5E4ss8NZpEnZ+Fmqrg2X1aVGJRSoRrI5ecw9K7IpSWSL+M4kn1 WFGRJ9Dfw2lDSyDvVzS2rzxlQcZTRNhAb621CW+f9kXK93JQn4YBO8MitMn1VRAgJPNu x7fgohdi2ryV8gy6KIwBu1qmzaLgiXTcX+E60= 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=EK5+HMcPGyH+d85nITsGfzrFtzmVetc0ClcpmeTtERY=; b=r111x+DLeR8amgfvM6OLiLtdhMGWIsYebco93DyfTTa5gmqdrmMDnh/ctBjp2Lf781 9AoSNc6q7gVHcJn5MsiDBF8DvmWrgNzn/OougyLwnIwwEaVU+YHk/beyjEAswwdBxBdS EaCEFHZAe2e5mv+FyOP8R4inyzKYpMzqnsU67pSMirbLDA5v2FYUjbQ5DYj8qn0AZSbq 3CoOy+6PJ6OF/G6qPnxqMCKGMVkTvNQOPIXPhF0rJ5My3u8FqyelEixKDz1kkTcO75BP 5ra657WwTsRn9lR6/B1YY4dK4c8VeDv56eBB7rI/zUhzMC4pr43i2fUPTSudn7QzGrEp /lVQ== X-Gm-Message-State: ALKqPwefqsMuiid3rQiE4T24EnykbWO+MZ9o8Jog9g0JyOqAxLxfb+5d aOopTLlDO0yc6zEiV8Pz3i6jZA== X-Google-Smtp-Source: ADUXVKI4VJHEbJ2nHlYnZW1Qu5DN8wsxdq/F1SPpOja4y2/4U2s7teP+nzVUM12o5f0GNxH/wxyDow== X-Received: by 2002:a17:902:b217:: with SMTP id t23-v6mr15893505plr.312.1528174615158; Mon, 04 Jun 2018 21:56:55 -0700 (PDT) Received: from localhost ([122.172.63.23]) by smtp.gmail.com with ESMTPSA id y20-v6sm36317804pge.46.2018.06.04.21.56.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 21:56:54 -0700 (PDT) From: Viresh Kumar To: arm@kernel.org, Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Subject: [PATCH V2 2/2] arm: dts: sunxi: Add missing cooling device properties for CPUs Date: Tue, 5 Jun 2018 10:17:49 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: <20180601151701.sshwfdbflic6mybv@flea> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180604_215706_182609_D9424EA4 X-CRM114-Status: GOOD ( 14.51 ) 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, Vincent Guittot , Viresh Kumar , Daniel Lezcano , linux-kernel@vger.kernel.org, chris.redpath@arm.com, ionela.voinescu@arm.com, 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 cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then things will start falling apart as soon as the CPUs are brought online in a different order. For example, this will happen because the operating system looks for such properties in the CPU node it is trying to bring up, so that it can register a cooling device. Add such missing properties. Fix other missing properties (clocks, OPP, clock latency) as well to make it all work. Signed-off-by: Viresh Kumar --- V2: - Separated patch for h3 - Fixed subject s/sun/sunxi/ arch/arm/boot/dts/sun6i-a31.dtsi | 30 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 13 +++++++++++++ arch/arm/boot/dts/sun8i-a33.dtsi | 9 +++++++++ 3 files changed, 52 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi index c72992556a86..debc0bf22ea3 100644 --- a/arch/arm/boot/dts/sun6i-a31.dtsi +++ b/arch/arm/boot/dts/sun6i-a31.dtsi @@ -119,18 +119,48 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; cpu@2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; cpu@3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 1008000 1200000 + 864000 1200000 + 720000 1100000 + 480000 1000000 + >; + #cooling-cells = <2>; }; }; diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index e529e4ff2174..35372a0cfc8d 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -122,6 +122,19 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <1>; + clocks = <&ccu CLK_CPU>; + clock-latency = <244144>; /* 8 32k periods */ + operating-points = < + /* kHz uV */ + 960000 1400000 + 912000 1400000 + 864000 1300000 + 720000 1200000 + 528000 1100000 + 312000 1000000 + 144000 1000000 + >; + #cooling-cells = <2>; }; }; diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi index 8d278ee001e9..4e92741b24a7 100644 --- a/arch/arm/boot/dts/sun8i-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a33.dtsi @@ -132,21 +132,30 @@ }; cpu@1 { + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu@2 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <2>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; cpu@3 { compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <3>; + clocks = <&ccu CLK_CPUX>; + clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; + #cooling-cells = <2>; }; };