Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3311465imm; Fri, 25 May 2018 03:35:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZptayIrLSBbUhYi4Phkd8Ca6nbhgn6ieYbTvEdQqKwRDjtlEmM8iz7wwVBPMAZj6NIcRKAO X-Received: by 2002:a63:9541:: with SMTP id t1-v6mr1504864pgn.77.1527244546881; Fri, 25 May 2018 03:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527244546; cv=none; d=google.com; s=arc-20160816; b=Glc3pPB/fHuUfpdEa9HeP+zbjCBlpHYPzvRXGZuiyeFodRpv0u8WC5MFrV4Qyn5pQZ iFfnM7A/QJIJGlTE6fCwbZrwJGqaBtRSVTmSvFaZA/NJl6UYJjFlQxFC6uqHV7z0yird V2pi0nWkg5VOOYR3IBzAi7qS6DiRf/Aw8PU8QmA0qil8YxIeEgi86PY8OXubnu191BNr O+YD/esGayyvVQYV4LZG6fAW94KWuEESa7qLIqWKleIWMzdhGRYHJfUiBmXpASb5CJdW S83FgIINrhP7+mQ4apPwz51SRb0CaXI87Z1fac/nDeSRODIf/9zj03yPsWEkMc7FqJqW 7dXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=XE6OgpSTNlTBCGjLGkhYWb3esagTBf6X4g5axr00Eqk=; b=ix1mA5Y6G03WZFtxdoAL0bqZkIpJx0+F3Xn9mvN/9hDcPfIHUw6b8fSyKOO2gowF3k 8UVse9DFPk2hzJHURBT7cpDvBhQyBSImQ/uAfGKQsbllSzKfaPpRG286kWCDFUIqCkQA tbT01IM/TTcAvn6Ij+UilwkTaZc+ztdQ8VXOeBQEhPo9JsyzEIlTioYm4QppmN0rQkAY 8Kb3ivgREfbGIltJyXlmOIH9DOQyrXuDVE1Xds7OEfKqHbT7D8i5usLkPPXNPhtWBX8l qTAOqOG71TQ1Hf8GeRaSH3mRbWEAVC8eymLTE7hr5Vjw5Gfu2DcupRGv3NqYQebVl5Uj 9cpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZHVKV597; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4-v6si5300745pgf.47.2018.05.25.03.35.32; Fri, 25 May 2018 03:35:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZHVKV597; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966243AbeEYKcl (ORCPT + 99 others); Fri, 25 May 2018 06:32:41 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34386 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966165AbeEYKcg (ORCPT ); Fri, 25 May 2018 06:32:36 -0400 Received: by mail-pf0-f195.google.com with SMTP id a14-v6so2400559pfi.1 for ; Fri, 25 May 2018 03:32:36 -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 :in-reply-to:references; bh=XE6OgpSTNlTBCGjLGkhYWb3esagTBf6X4g5axr00Eqk=; b=ZHVKV597OW/4IhWJQB3len6m2aeCNxnbesy2DEwZ+KtLJ/88iqPk8EaNL/E8146ecg MnneXZx7hCi1CBal6ash+0Aj/1hB1TPpIp/BiTrfR0MvUcSk+poytaknzqk28I8qVa9i GUzDxWc9kDrKQGJtsJtTjTdFRE1S4aMnS3MME= 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:in-reply-to:references; bh=XE6OgpSTNlTBCGjLGkhYWb3esagTBf6X4g5axr00Eqk=; b=LAfT7b60svZdhMjLgzPIeRPAd76luKoFenibnx2dY/YZaHK2cchHoAaQHlm5Gg/ZFi JvcogARnTL26O1p7Zr0gEy1WwT/2V2cdAQ/xXBrzDe9EcYANzbbDoGob4PJXL+NaxEqq s/aWvi4U3jxkVYtaQEQp0Ja6sDOVT67cm2KaS6FimSp/qknirBX+08mFXtmG2iNUeRA8 2aFI53d1zXSvQhsHataYTLota0rrDKqH0JW55F1yHwl0SZxenx68QrkE9YhqemMKHe8Y fbbrcWiEsgG5dFvazwGFd45KdRH4p+PcuGL5pfLRb9cX527OzyOsUgv5Hbe2TOW3d4Tg hbSw== X-Gm-Message-State: ALKqPwe1ylZLj6R8VJOMQwqLuwyqnA+dtMNXc/+lnnIvemmUj90ZYv13 apIKv7BZ7+HgEy3/dRenUsvDqQ== X-Received: by 2002:a65:61a5:: with SMTP id i5-v6mr1464334pgv.405.1527244356343; Fri, 25 May 2018 03:32:36 -0700 (PDT) Received: from localhost ([122.172.112.176]) by smtp.gmail.com with ESMTPSA id c3-v6sm43882352pfn.62.2018.05.25.03.32.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 May 2018 03:32:35 -0700 (PDT) From: Viresh Kumar To: arm@kernel.org, Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Cc: Viresh Kumar , Vincent Guittot , ionela.voinescu@arm.com, Daniel Lezcano , chris.redpath@arm.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/15] arm: dts: sun: Add missing cooling device properties for CPUs Date: Fri, 25 May 2018 16:01:52 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm/boot/dts/sun6i-a31.dtsi | 30 ++++++++++++++++++++++++++++++ arch/arm/boot/dts/sun7i-a20.dtsi | 13 +++++++++++++ arch/arm/boot/dts/sun8i-a33.dtsi | 9 +++++++++ arch/arm/boot/dts/sun8i-h3.dtsi | 9 +++++++++ 4 files changed, 61 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>; }; }; diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi index 41d57c76f290..9dff6887923c 100644 --- a/arch/arm/boot/dts/sun8i-h3.dtsi +++ b/arch/arm/boot/dts/sun8i-h3.dtsi @@ -84,21 +84,30 @@ compatible = "arm,cortex-a7"; device_type = "cpu"; reg = <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>; }; }; -- 2.15.0.194.g9af6a3dea062