Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp171264ybl; Wed, 21 Aug 2019 17:01:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCnDSgP/MWlYjwIWSCq1D8L1aL7gCMTNsRiKt2J4/OR/O+dWr4Gxv93QT40FsmYf7WKiHJ X-Received: by 2002:a65:5183:: with SMTP id h3mr31547416pgq.250.1566432073217; Wed, 21 Aug 2019 17:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566432073; cv=none; d=google.com; s=arc-20160816; b=u10fEPYTfUCelNHcJRw8ahGNOtlc+Cql+1iGyFcsVFJEQ073GWYIA0GVMLAnA9EtwM nGmJBkqsyV7TF4lC2qZFAnIinGz568n/cZ2S57PiwUb7c6vsXSnGfKy2cghH9eYwSjlC rTGKqT1dPhfLYJy6B6y7yr2FFJhrirm2I4TFJ8NX46+DADRA0OGe+LIAJvmxhb6l88c2 GUUnfxsOs9+D0OGD6rdGdpIf/nT/xIjHDWTJs/BeSANiuIR1GdqjQ6qpp6sXJa+QjVTo icAMnVsELeTNQvdsBh76Bb1lChNQUopLoUq0/U44mfBXRZjChY103GgKpdADGWTZcJnY 95rQ== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=SZfK4Hg91c5el5MGv7c8euoA+RwD5KE0S9Rh7Yj1wX0=; b=H4TV3rpm6ICQMTi7UqCUuHxXfrqO8rGvUxKyTgDiH15gvergptsl9HoeW4BP7GfRyZ R/v5IGUJkEL4CZBbACir4sleLrud7RzpDw3sUa+iJChOg36uLGU49kAJYrtQq9guv2+W q+/e8civdyArfIOPF9rxVamz9+QjWlkE6nmJpCFlDgYmESh1cTQMioNnV0SuF3bEwRiv MaAFtUVIxzolKBiCmDVQi2D9fg8Hpi1BFrZL0awzY+GV3ExZznHys2OxFVanX/kuOd7u R0yvU1UpjrKphE+SnWHzsrwtoqUklKt/IfP+MqmaeJwn1s7PKr0TLIVnm1CjakaZe5yx tl5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=JIROksQB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si17047420pfl.244.2019.08.21.17.00.58; Wed, 21 Aug 2019 17:01:13 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=JIROksQB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731204AbfHUWYi (ORCPT + 99 others); Wed, 21 Aug 2019 18:24:38 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40343 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731158AbfHUWYc (ORCPT ); Wed, 21 Aug 2019 18:24:32 -0400 Received: by mail-wm1-f68.google.com with SMTP id c5so3505197wmb.5 for ; Wed, 21 Aug 2019 15:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SZfK4Hg91c5el5MGv7c8euoA+RwD5KE0S9Rh7Yj1wX0=; b=JIROksQBn/wUgB6FfkE6PFnGUae4NRfjwm9rLA/bGdOTN4cOWEAV9H/tDUTkkgfXc1 UpywIfXpUBBOvOm832InIZl9nO+GI37O1mhhEQ8uLOFHxrUNYrOwHTwKWRH+SJv9g7VS fad6UaQKVoNBYp9l1E+8dPJJ3YMCEZxaYniuAhvj2EBzEZAgihX4xSbTCkBye5NrtSIe lG7mFSnqTcmPGcmne+/qNo5CV5+OiGLEptTnn/v3ZzLBWpV1in83BdZlMAcPjwOCYGVg ak0WFEfRiE6eMm24s/lFnc2aZv1zlMXyc+rUWoFpWHVevd5tcqsuMMjc79K5Gro/gLYF Q+Wg== 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=SZfK4Hg91c5el5MGv7c8euoA+RwD5KE0S9Rh7Yj1wX0=; b=ez7NVggxZeXzCYGOIKbdQBGbkCpO9O330A6rXOU0noMpfXx2tC8FBJpcPN52Pw2N8g JCeL+tP5URU9a0tu3Y/tKUZE4p/x6gNfzDh1Un9DoHQTx5R/UxW8ruckV13aEtLJxhDH do54+gCSlw/7uMwGiaMwAGJYZr5hR+11T686xdnRzG/Svtmn7UdzWWGyAeXMuqk202Ov cQNBqWFj0N6dRAuk56RDOHxynPNSgzNalLBp8uEpjmauIVJvsVI/Kc2bfHQnCTzdlsHX IkQStEoUhQhTqi7Ql1pFQKadwozN9ppGWRB4uBbL92BkvGAX9EdPhh4MHttT7StuhbAc s4Eg== X-Gm-Message-State: APjAAAU45U8Ok+3mv0tfniXHoxfV1iB3Oc0CJTQVaoNr1QMQdKsfmDXv gAnp0EnKfS5MKf15XMwpC5hHrcUBPO0= X-Received: by 2002:a1c:61d4:: with SMTP id v203mr2444338wmb.164.1566426269301; Wed, 21 Aug 2019 15:24:29 -0700 (PDT) Received: from localhost.localdomain ([2a01:cb1d:6e7:d500:82a9:347a:43f3:d2ca]) by smtp.gmail.com with ESMTPSA id f197sm3548549wme.22.2019.08.21.15.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 15:24:28 -0700 (PDT) From: Guillaume La Roque To: rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH v4 5/6] arm64: dts: amlogic: odroid-n2: add minimal thermal zone Date: Thu, 22 Aug 2019 00:24:20 +0200 Message-Id: <20190821222421.30242-6-glaroque@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190821222421.30242-1-glaroque@baylibre.com> References: <20190821222421.30242-1-glaroque@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) Signed-off-by: Guillaume La Roque Acked-by: Martin Blumenstingl --- .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts index 777bfb938854..8d7c73bad4aa 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts @@ -10,6 +10,7 @@ #include #include #include +#include / { compatible = "hardkernel,odroid-n2", "amlogic,g12b"; @@ -20,6 +21,71 @@ ethernet0 = ðmac; }; + thermal-zones { + cpu-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&cpu_temp>; + + trips { + cpu_hot: cpu-hot { + temperature = <85000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "hot"; + }; + + cpu_critical: cpu-critical { + temperature = <110000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_hot>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + + map1 { + trip = <&cpu_critical>; + cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + ddr-thermal { + polling-delay = <1000>; + polling-delay-passive = <100>; + thermal-sensors = <&ddr_temp>; + + trips { + ddr_critical: ddr-critical { + temperature = <110000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + cooling-maps { + map { + trip = <&ddr_critical>; + cooling-device = <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -289,6 +355,7 @@ operating-points-v2 = <&cpu_opp_table_0>; clocks = <&clkc CLKID_CPU_CLK>; clock-latency = <50000>; + #cooling-cells = <2>; }; &cpu1 { @@ -296,6 +363,7 @@ operating-points-v2 = <&cpu_opp_table_0>; clocks = <&clkc CLKID_CPU_CLK>; clock-latency = <50000>; + #cooling-cells = <2>; }; &cpu100 { @@ -303,6 +371,7 @@ operating-points-v2 = <&cpub_opp_table_1>; clocks = <&clkc CLKID_CPUB_CLK>; clock-latency = <50000>; + #cooling-cells = <2>; }; &cpu101 { @@ -310,6 +379,7 @@ operating-points-v2 = <&cpub_opp_table_1>; clocks = <&clkc CLKID_CPUB_CLK>; clock-latency = <50000>; + #cooling-cells = <2>; }; &cpu102 { @@ -317,6 +387,7 @@ operating-points-v2 = <&cpub_opp_table_1>; clocks = <&clkc CLKID_CPUB_CLK>; clock-latency = <50000>; + #cooling-cells = <2>; }; &cpu103 { @@ -324,6 +395,7 @@ operating-points-v2 = <&cpub_opp_table_1>; clocks = <&clkc CLKID_CPUB_CLK>; clock-latency = <50000>; + #cooling-cells = <2>; }; &ext_mdio { @@ -378,6 +450,10 @@ }; }; +&mali { + #cooling-cells = <2>; +}; + &hdmi_tx { status = "okay"; pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; -- 2.17.1