Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp6918270ybp; Wed, 16 Oct 2019 00:37:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+tQJXkERiWqYj51lv/HEgPYCpjcFZX1qV7xCGknHJ5J5UmjsMZ7cpjTFRsjUTg7nknCzK X-Received: by 2002:a17:906:5007:: with SMTP id s7mr38934660ejj.181.1571211451254; Wed, 16 Oct 2019 00:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571211451; cv=none; d=google.com; s=arc-20160816; b=DB296MvKHcyoOXc5DNztTW0MN7veu1nVxsYX+iVfY2m0SJWvyxi4Np53MggMzrKXJL YHQzlp+wVotc7/yQ21Q+pmP9SQRpYBP+3rIZuC2JfaNnqlE0b2H23lI1MW2P/Oo5pqf0 gRY8IjEhmXjf8wIme/D/5IPGE9JLI/RhVVQAjV5t528Q89XHzMgDzFcDQP+bK0CvbD7L 9xXs2zYxSJ3C4+oLKGlafu5bj2Kt5+xfKZKgEVOt7P3S6ylW/QujpRl1FEB3+wE1WnhH 6wUm7FQhmlF1nl2Tm3lUVte+JVEESHw09Taxw8K8cfCJd9gpB4MDYQgLYhvT5r++Ga8B jLXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7Luzeu61JUpCQk5lttonbL70KSFby5OvdNNxzg/MFQ8=; b=vEW6FuHjlE7kDxEOkevNr+9Yv4SJhb8zf5+OWmFckomGmbXOLN18SGTKVGKIZtW4AA zL7x/NJ9mfk5WFNVb2gEAjY6whUb8rF7xFIHk4ubOlX3+s5aQlE/Qm3JaZ0AOP14R8US 1L2NGZv1B+rKi6w4wVxCkCdTDCWsY7ai9PtraE5PX7QiHCKRmG4FqRXMxsMwcy1sCJf9 W8bElT8prpYTwKhhNwaLj55za1567qEH+Lq2TVEVp464ELX1FWi8MyXi5hJx0VGcowvs i2mLayZGE25txnlyFCIaSOCum7h4FKEPR1strPEETR2CyGvD9ec4toF/RsUwdGUYB/KC EZPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eDOzDhVM; 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 e4si14814699ejd.32.2019.10.16.00.37.07; Wed, 16 Oct 2019 00:37:31 -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=eDOzDhVM; 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 S2390212AbfJOXUp (ORCPT + 99 others); Tue, 15 Oct 2019 19:20:45 -0400 Received: from mail-vs1-f68.google.com ([209.85.217.68]:33562 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbfJOXUp (ORCPT ); Tue, 15 Oct 2019 19:20:45 -0400 Received: by mail-vs1-f68.google.com with SMTP id p13so14372728vso.0 for ; Tue, 15 Oct 2019 16:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Luzeu61JUpCQk5lttonbL70KSFby5OvdNNxzg/MFQ8=; b=eDOzDhVMybk0i/+feqo0X+49gsS5JqJW8Ry8hE/JpXVc3WdVLD8WqJn9dDxRuwCehy QvBk66yW4mH2kDlYuzMBwPUkP7IEFj9ZOCyD/4jTGGzyqm14Z6beV+SiRvogqh3bul4S iB5C2XFuK7HRXnTP1fLCtCvORAdxwIVNNPgEfK7/yPQBrFJLj5U8IlVLAnGbma2My+bA WBSOGcGHMJNm8DROoKh3HDAVOdcniv422vxJwA1eHO+j7o/CCl3KJUcbsWYelqWlID+T ADHbasV+eQpUbByIGOW8dLaZ/+35eAnKAiGRw80ERMmbEtCmUY0OfB7tcC1PPQ9bI1JZ KYPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Luzeu61JUpCQk5lttonbL70KSFby5OvdNNxzg/MFQ8=; b=t7Sh6JY/50jSrVXgpykYV3OxjNryN45tKBZRw7jFv7BciD3G7s7EJKGpUPCdxs3TLg Ywzu9t9p0s1zth4gzgvloVENhLODR97IHWnFoOI5TrDeCQZm4kBlsXbY7kPwWlt8ZThp vR/OMgHs1ETFNvC669Wc3k5B+gy5V+YmDXWj03UVYMYI4yNy8WXuvgMyg9afsWD1uPq+ e+tUUPcQrqPaM0ZYXll+Hw3+rP/1lR0KZWoTe9IGrQ/MyrVMP3qAbY3N2QGH2ipJ0Iq6 I0d2uHh8iwCR4vbFxHbc+o3Uf9kGE5Cfwcs04SomwcRkjaJ8TujMsquEokfKI8s6Ond6 gAAA== X-Gm-Message-State: APjAAAXEDKdnPoCU1eABYcntsDvQowHytls6eEeoWDuDyXgb4hNPfJ23 qq9ea5DLF6nhDW/nZUeoxOdsb7W07+1/SE8NXxndiw== X-Received: by 2002:a67:dc16:: with SMTP id x22mr1767729vsj.159.1571181642542; Tue, 15 Oct 2019 16:20:42 -0700 (PDT) MIME-Version: 1.0 References: <20191004090114.30694-1-glaroque@baylibre.com> <20191004090114.30694-5-glaroque@baylibre.com> In-Reply-To: <20191004090114.30694-5-glaroque@baylibre.com> From: Amit Kucheria Date: Wed, 16 Oct 2019 04:50:31 +0530 Message-ID: Subject: Re: [PATCH v7 4/7] arm64: dts: meson: g12: Add minimal thermal zone To: Guillaume La Roque Cc: Zhang Rui , Eduardo Valentin , Daniel Lezcano , Linux PM list , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , lakml , linux-amlogic@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 4, 2019 at 2:31 PM Guillaume La Roque wrote: > > Add minimal thermal zone for two temperature sensor > One is located close to the DDR and the other one is > located close to the PLLs (between the CPU and GPU) > > Acked-by: Martin Blumenstingl > Reviewed-by: Neil Armstrong > Tested-by: Christian Hewitt > Tested-by: Kevin Hilman > Signed-off-by: Guillaume La Roque > --- > .../boot/dts/amlogic/meson-g12-common.dtsi | 57 +++++++++++++++++++ > 1 file changed, 57 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi > index 0660d9ef6a86..a98c16e163c2 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > > / { > interrupt-parent = <&gic>; > @@ -94,6 +95,61 @@ > #size-cells = <2>; > ranges; > > + thermal-zones { > + cpu_thermal: cpu-thermal { > + polling-delay = <1000>; > + polling-delay-passive = <100>; Ordinarily, you would need to set these delays to 0 in interrupt mode to prevent polling overhead. I've just submitted a patch to of-thermal that should fix this requirement. Could you check if it works for you? > + thermal-sensors = <&cpu_temp>; > + > + trips { > + cpu_passive: cpu-passive { > + temperature = <85000>; /* millicelsius */ > + hysteresis = <2000>; /* millicelsius */ > + type = "passive"; > + }; > + > + cpu_hot: cpu-hot { > + temperature = <95000>; /* millicelsius */ > + hysteresis = <2000>; /* millicelsius */ > + type = "hot"; > + }; > + > + cpu_critical: cpu-critical { > + temperature = <110000>; /* millicelsius */ > + hysteresis = <2000>; /* millicelsius */ > + type = "critical"; > + }; > + }; > + }; > + > + ddr_thermal: ddr-thermal { > + polling-delay = <1000>; > + polling-delay-passive = <100>; > + thermal-sensors = <&ddr_temp>; > + > + trips { > + ddr_passive: ddr-passive { > + temperature = <85000>; /* millicelsius */ > + hysteresis = <2000>; /* millicelsius */ > + type = "passive"; > + }; > + > + ddr_critical: ddr-critical { > + temperature = <110000>; /* millicelsius */ > + hysteresis = <2000>; /* millicelsius */ > + type = "critical"; > + }; > + }; > + > + cooling-maps { > + map { > + trip = <&ddr_passive>; > + cooling-device = <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + }; > + }; > + }; > + }; > + > ethmac: ethernet@ff3f0000 { > compatible = "amlogic,meson-axg-dwmac", > "snps,dwmac-3.70a", > @@ -2412,6 +2468,7 @@ > assigned-clock-rates = <0>, /* Do Nothing */ > <800000000>, > <0>; /* Do Nothing */ > + #cooling-cells = <2>; > }; > }; > > -- > 2.17.1 >