From patchwork Tue Jun 4 16:57:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 10975791 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 E0DB914C0 for ; Tue, 4 Jun 2019 16:58:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA74A28662 for ; Tue, 4 Jun 2019 16:58:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC9F42872F; Tue, 4 Jun 2019 16:58:27 +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 6F49B28662 for ; Tue, 4 Jun 2019 16:58:27 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=N6r4vxjW5VP9CXIfIINH4rrY+lQ4JGYbHMSepev8xyM=; b=r36 PQJiPOf4J8ugEBlnqmMBgOVp7NJ15husEwQ+gooT7Y+cNpdQ6qZEFbHPXMN8AIV9vGLYrYESqbzMj Cu6FjoIlSRKxfCuPSQtw17sBQ9Wq75v/AhpZxULFmDfaFupMaGQdgAAKWVHxPTAi3jB3gjQrEHQ/J unRjwS8jJjXcfWHeArFm6pPjW9u4ZG9RkrIpVOob0BsJktaSaoJJ71fQopt4isK68MAe/auBNJxao HkbWXjTPrJW6QN9T9zGVVXqvjezBQfctNnWFLc7S47acV0tKQWOiEoZqpKVflmPKe2l+1GXk6qNtY ahtaDRN+z1VYv/mESNWlL0fKWM9b6NA==; 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 1hYClU-0005Gk-3S; Tue, 04 Jun 2019 16:58:24 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYClM-0005A3-Nh for linux-rockchip@lists.infradead.org; Tue, 04 Jun 2019 16:58:18 +0000 Received: by mail-wr1-x443.google.com with SMTP id r18so7604802wrm.10 for ; Tue, 04 Jun 2019 09:58:16 -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; bh=nf3jJrNk6C76DJ8y1UTRXRubP+zTDL/JpeAicSCnsJM=; b=kqj8P8lxcUc0L8j5tOPPGZ4yyb6M3wmSSOxouSv0loFpvmYHZzWhuVjN2R8JtNK3J6 jL/vgM1d2yIWkuOyvL8G8D1rzqKASY0EQZOuTRCuQX5ZTda1jH4wqHL7ifC7Wf9r9Gm8 QLrLFFkDAXx2ymTAn9h5lFpY95u7vQMZBvBwmvo8MOkRNAN44sihGto76GpHK5fdQSyB ctKzuQ66jaoP+z4Vx4fzDYUPtMN6A7A+cDQgXSuaNIp6FvxZZKOUGvu56BiLrZo36Q09 5tYIgdqHNhZCaZitnRU1D/JdWtz1PL0eCmXI/JOgF1dcYXcbd6sjNCRh14ozlcZ9vOAY NaAw== 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; bh=nf3jJrNk6C76DJ8y1UTRXRubP+zTDL/JpeAicSCnsJM=; b=V35XsTZNyeLhGue9V7UQDuYs4yB1gppj429wv2yom91p2R35UZsN9Y3j+mZCgjDoU/ EeqG1JPAlZ3/tER5OL9mhWe8UCUalmcfKVKB+z/a+IeNgndGez11D5Yez8YCrPsufr60 1xYHnNb/NKFhEVEaWFUFcg0s2CsSa9z9PifutatYDDBpFXFed6rzzL2+GDFNF8QaNveW qMB+r4boVPaCX17SkbiHYKv5x3m2Sms8QujpUMuhg+Wm2yYG/sHi/jvRF4BAv129+oFv rlI++ZED1YHfaByhKh00LvfdQHf0zVo2uHzHsulJTzn2bQNSxwPXNB4u9v4vD8mqUhSS PeGw== X-Gm-Message-State: APjAAAUtPZjDtyUS0fbdVFM5Nx+AMaqkBXyjCD3fS6xl1c5T8ckCo96r DStt81WI/8RPQlsKgEigQRvubA== X-Google-Smtp-Source: APXvYqxZD1Us/ThhsKGk1nm85wHyP2HqX/Fn7dakkR4+Pd7zhA4BqXTk6Tkmc8vjuYmZTcfBiptgjA== X-Received: by 2002:adf:e2cb:: with SMTP id d11mr11255906wrj.66.1559667494840; Tue, 04 Jun 2019 09:58:14 -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.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 09:58:14 -0700 (PDT) From: Daniel Lezcano To: heiko@sntech.de Subject: [PATCH 1/2] arm64: dts: rockchip: Fix multiple thermal zones conflict in rk3399.dtsi Date: Tue, 4 Jun 2019 18:57:57 +0200 Message-Id: <20190604165802.7338-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_095816_766907_BC6978AE X-CRM114-Status: GOOD ( 10.90 ) 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" , Emil Renner Berthing , "open list:ARM/Rockchip SoC support" , Tony Xie , Viresh Kumar , Randy Li , linux-kernel@vger.kernel.org, Vicente Bergas , edubezval@gmail.com, Enric Balletbo i Serra , Rob Herring , Klaus Goger , manivannan.sadhasivam@linaro.org, Matthias Brugger , Philipp Tomsich , "moderated list:ARM/Rockchip SoC support" , Christoph Muellner MIME-Version: 1.0 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 common thermal zones definitions for the rk3399 assumes multiple thermal zones are supported by the governors. This is not the case and each thermal zone has its own governor instance acting individually without collaboration with other governors. As the cooling device for the CPU and the GPU thermal zones is the same, each governors take different decisions for the same cooling device leading to conflicting instructions and an erratic behavior. As the cooling-maps is about to become an optional property, let's remove the cpu cooling device map from the GPU thermal zone. Signed-off-by: Daniel Lezcano --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 196ac9b78076..e1357e0f60f7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -821,15 +821,6 @@ type = "critical"; }; }; - - cooling-maps { - map0 { - trip = <&gpu_alert0>; - cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&cpu_b1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; - }; - }; }; }; 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"; };