From patchwork Tue Jun 4 16:57:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 165798 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp6110648ili; Tue, 4 Jun 2019 09:58:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzitSW9XCRaHkpAUjMN3yw8000/C18WTfVsAJp61d9EfrKJmc2DEG7OJizBIYj9oMEkt1Pb X-Received: by 2002:a17:90a:9201:: with SMTP id m1mr38620125pjo.38.1559667507074; Tue, 04 Jun 2019 09:58:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559667507; cv=none; d=google.com; s=arc-20160816; b=0CzyAUpFRh3xL6Qk1IeQhIjQihEn9hp40aG3TAEGdW0BrY3g7q5RezcTCeMBAfNQea A6rTN/knggqgSbOCa/3AoU04g2TZpTHl6F1FxUeFtoL3RDqBeSDKARDyoFSW8HEe0SYE dORWERsMf8xj9/9p5uFx97mNjjykdZqrhFBb4l5c0aiqeQ/XFr3lEgxd9NzMO/BJROEz 0S0bGRnljBVRL00MuU4P7enP3xyZhZwhbbVJM8LKRKgxM3Ogz3Lo+dO/uy/TRh6ktLK9 S0sPR5no9HZkjSQNVvitg1Z9FtWC+amaHLVtk9WfnCYh7E7GUWnORf7wz7/68tIJ6qmz PviA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WVCO5NdhCO4ClvnqUv2FsN5kOQCRCbVjJWhoMXw1NDQ=; b=JCVT9Xh7U2Bu2E1g5sFGZ9fYfJRmy0MpeNkD1KlDoN4N0kA+mWXESlbd72ymaDc2yx e6B8cKebKLmZEoBwFI/A4yOCIvRfGNWbHlk/fr3Pzbzbq3xMnAErmve8LkfHdFQcIQRL HGXG+k6Kvysz5xZLjSbnEba3EKh9cpCw9vnzINPPuPjTvqvgtF8U9yVY/7EevbAwOimQ +C7lK6j/mpu2g+hHuJc5AQE4FPoQ7SMbjUAzvyMSt/OKRh9TAECvV7nYEyhlYIemaNYx HGvfzskGoJNmxZ5RCE3tLnL9mq1NF5j1EQCWWIPo/8r6ccfqH079W0PEefIAR1/i6Cdv qaLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U8iHJaeN; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 go17si22794232plb.357.2019.06.04.09.58.26; Tue, 04 Jun 2019 09:58:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=U8iHJaeN; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S1727839AbfFDQ60 (ORCPT + 8 others); Tue, 4 Jun 2019 12:58:26 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55058 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727709AbfFDQ60 (ORCPT ); Tue, 4 Jun 2019 12:58:26 -0400 Received: by mail-wm1-f66.google.com with SMTP id g135so810093wme.4 for ; Tue, 04 Jun 2019 09:58:25 -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 :mime-version:content-transfer-encoding; bh=WVCO5NdhCO4ClvnqUv2FsN5kOQCRCbVjJWhoMXw1NDQ=; b=U8iHJaeNQwgfZyonZpmCY+8eHEAJFzgZQHl4ZBgMB7Ehc1h2CJidpz9etKcpnvU01a fdT0yfOUja+9mp77Qt7n0A8kIpZCp5BOm+jY1QG8/1SSyaF/lYSYJkKv5lhQvqfxApcs aRvUtwN/SQiwf9Gb3ICSTbT7qQxfw8EzQ4t37U4ioJKeyYm9ZKp68qrJaS5TiPi8HNuL Ad2tzh8fiCQgixXuooOSB0jyT4RrTmlzXAAWj6F5suSxrHSkAaLOwXQA6Q8jKbVGsBxv l0AZtugD8sTl+zF6170ZkYKO1l5PD79mwoFVwLwixQlwxPFdlkYXrZ5P9WHE/ixvl8vP LFDQ== 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:mime-version:content-transfer-encoding; bh=WVCO5NdhCO4ClvnqUv2FsN5kOQCRCbVjJWhoMXw1NDQ=; b=Ovj7AGEOCgyA+WHFmJFI6+FGupv8/WG52kR5zGVBBXguebfO4xNADl9GnDq3sHeYkf lsbOGwjIY3Cm/XoyX+YI5cDGK93DFNQQCUOHh+A/pk5IQ88t37UYPy/vdyGf8HjpM4ka r+87EA7w3j50NLPP2UrIQK5n5kSwhh8QxtOA6yDY06XJMEeez68Rd7Pv2TA3yuathmbr J5c/pznAFqaGV5Mpr3QZ92jDAnv3uTVxAd5YcI+Fit6QyIx6rJDjVRUpKZWLh78MZKYy PpbAh8Idx6XFfM2eJ0IJYxpT7PKDmOCUc01GsGpfjQOQAwqncR8l+RsGa3taq1lh2JDs H7+A== X-Gm-Message-State: APjAAAWftvwuoIA8gnNf8WvPD51Md9lpxBMkJRu/v/27/lu6F0FPgqjs jHh7KnCZ1qSC/yNkOg1Jy29bUg== X-Received: by 2002:a1c:b6d4:: with SMTP id g203mr9346231wmf.19.1559667504165; Tue, 04 Jun 2019 09:58:24 -0700 (PDT) Received: from clegane.local (20.119.129.77.rev.sfr.net. [77.129.119.20]) by smtp.gmail.com with ESMTPSA id t13sm25524979wra.81.2019.06.04.09.58.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 09:58:23 -0700 (PDT) From: Daniel Lezcano To: heiko@sntech.de Cc: linux-kernel@vger.kernel.org, edubezval@gmail.com, manivannan.sadhasivam@linaro.org, Rob Herring , Mark Rutland , Linus Walleij , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC support) Subject: [PATCH 2/2] arm64: dts: rockchip: Define values for the IPA governor for rock960 Date: Tue, 4 Jun 2019 18:57:58 +0200 Message-Id: <20190604165802.7338-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604165802.7338-1-daniel.lezcano@linaro.org> References: <20190604165802.7338-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Currently the default thermal values for the rk3399-rock960 board is inherited from the generic definition in rk3399.dtsi. In order to ensure the rock960 has more room for througput before being capped by the thermal framework and is correctly supported by the IPA governor, let's define the power values and the right trip points for better performances: - sustainable power is tested to be 1550mW - increase the first mitigation point to 75°C in order to get better performances - the first trip point is 65°C in order to let the IPA to collect enough data for the PID regulation when it reaches 75°C - restrict the cooling device to the big CPUs as the little CPUs contribution to the heating effect can be considered negligible The intelligent power allocator PID coefficient to be set in sysfs are: k_d: 0 k_po: 79 k_i: 10 k_pu: 50 Signed-off-by: Daniel Lezcano --- .../boot/dts/rockchip/rk3399-rock960.dts | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) -- 2.17.1 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts index 12285c51cceb..701d5b5fad46 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dts @@ -114,6 +114,45 @@ }; }; +&thermal_zones { + cpu_thermal: cpu { + polling-delay-passive = <100>; + polling-delay = <1000>; + thermal-sensors = <&tsadc 0>; + sustainable-power = <1550>; + + trips { + cpu_alert0: cpu_alert0 { + temperature = <65000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_alert1: cpu_alert1 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit: cpu_crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + + trip = <&cpu_alert1>; + cooling-device = + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; +}; + &usbdrd_dwc3_0 { dr_mode = "otg"; };