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: 10975793 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7729114C0 for ; Tue, 4 Jun 2019 16:58:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6366528662 for ; Tue, 4 Jun 2019 16:58:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55CB72872F; Tue, 4 Jun 2019 16:58:33 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 F044C28662 for ; Tue, 4 Jun 2019 16:58:32 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=614lkTIiCd9tZOQNJZcNtSk5lS2iRB84WEVfZC4qDiA=; b=rj0zV6Ukrb7DP4 QrRNQx3CY40TtzBPwS8/O34UMLhxV8zsxV/6jw6HyYjwYy5efS+KY29IcDLitNtJoFmAHGvm2KZPX VsiFFI/GNdGICc+SuTBEh1dAiyM7YghKZ4p34FT1YAYTQ3kUU5dxG/NWcqnT5cIK+EN/RD4xEgQ4Q WHxrw3TB8iJYuGmYw8lLC+wyvd6BsS/8XGCDrGv9NKDhLaukQf5pjQSGAaYDq2YLPtPJCLAg1Vbau 5ZptrXd97wcpbO5fJx0wL2SR7tS3vwl59rC4A8S6ynfW5y2GlAfIKeoF1wZvPHxVu+AnvctOt4BzD 4vUkDtwwjjalbShGDXng==; 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 1hYClZ-0005Op-O6; Tue, 04 Jun 2019 16:58:29 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYClV-0005I6-Sf for linux-rockchip@lists.infradead.org; Tue, 04 Jun 2019 16:58:27 +0000 Received: by mail-wm1-x343.google.com with SMTP id w9so2709685wmd.1 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=POE7aa8vYWxfO/LxAVvzdiCZ6LrplIjlcT8vDVywomMTVz2awHdlRrkC89XntlDQ55 Zt2pkTeQzBLuKiyFYnJVuaWbWtq3kLI34AhgBG3OLxJtmvO+KEcXmmbTGJQupoAvC5jS F6C3Kd8767dP+psYIecD19ahQZcCeFWPqsPiedmKmnbHZGEqLb2O9+bj6U7EXvucPxyV ppyEVeXILQhHOjxgkcbHK2aWwavY5HNlUujs9aoAdWEEcwlU7IB9v2RmDloNU6Fv46NI 9EjvOKIQqka3kntjNTVBhtgeqHwTE9jluXg+Jltel6jU/shibkNvG+I7cqkMgvKZeAO0 z0AQ== X-Gm-Message-State: APjAAAXCpia3SRHxZHcsEkIW/KhdezrxGLnBJON2DhWMCa+YntPEpZxl jTPY0Bvg+Kkek/tuOnX+Cg+zOw== X-Google-Smtp-Source: APXvYqyTSxvUapZ02X/hXKoASJXPNOtj9HjRjSK5iLdyKziVYT0pPX38I5nv+gb7+mLfsXpPzGyVLg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_095826_127365_150FFA0B X-CRM114-Status: GOOD ( 11.49 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linus Walleij , linux-kernel@vger.kernel.org, edubezval@gmail.com, "open list:ARM/Rockchip SoC support" , Rob Herring , manivannan.sadhasivam@linaro.org, "moderated list:ARM/Rockchip SoC support" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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"; };