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: 10975789 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 6DFF214C0 for ; Tue, 4 Jun 2019 16:58:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5779328662 for ; Tue, 4 Jun 2019 16:58:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 481792872F; Tue, 4 Jun 2019 16:58:25 +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 EA18A28662 for ; Tue, 4 Jun 2019 16:58:24 +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=UrMNi8m4qH1EhrxRjRBeqKnBgfqIwZb+gp/tU9M+pjk=; b=Roe WWy+ahWXsaIGvGhqydDOVqX1Y1dVqZljQ8wvwCyIMfMzE/bsS31qQjgaTcpTVSGgwz/wh8Eq/TZd6 iSjMQOWydq1XSkGKdldqnGRQdI3B4AT6TqaHdhjjIjoi8rcouVGu8UtE4TLNGbgHzjfMHAf9gbkgJ qRWGn3scggnS2ofEJ3AihmWTf/J8KdTsVmaEuZu6tWAlWvtBZ/Awt15mQudNc/lCSTENwPCceaqsk /W9LKZM9ZR2YIsBwJRIsqG/1msHxqwfm7lnbPZEvk7C78p5uBYUo1zUBC1NyzC4J1pk4w3YAcYwWq Lx0FWgHOH2Tk7PO7IR8gCu52XkAEfXw==; 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 1hYClP-0005Af-Jp; Tue, 04 Jun 2019 16:58:19 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYClM-0005A2-Mx for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 16:58:17 +0000 Received: by mail-wr1-x442.google.com with SMTP id c2so16616007wrm.8 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=on+KMeZdfdXOiuPnVBOPRiofcYw4Bg1XbywcxqAXMJfTpO/BVInbX+7i7VLYvewhcT bwhxJ+5Dh11yTh3aqWS3fyVl3AMKpNkhUB/GkKHZUa5VYH5aqzuFqnkGH+DcZObdBoiL xF73x6lUkm7YpIKK+gYSevQdc6+n9EIHLvvxLRFoQSfuZwYI+X1RoqJSF7rxNdYG6sF0 JtljNM7477Rh9Np8GdoX/6ahpk0NIvTLFz2i63NFsh0p6ncdaMDbX8xe5ZVG9tmZh4DL tnAANo6Kny/cZZ77krsOvFVOs7eEJKZMygsDIQ6dsgtAqAQYv/tf/d5yx+wbXeMYtTh+ OH9Q== X-Gm-Message-State: APjAAAWZEtwnLmqAlZeuDM4fZagyUTc0sDaiXf9+yZGefgB27Dtw1rSf VH14sMJwjO2brVY6hCDl2idzjg== 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_751405_B55DF412 X-CRM114-Status: GOOD ( 12.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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: 10975795 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 24A2214E5 for ; Tue, 4 Jun 2019 16:58:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11D6328662 for ; Tue, 4 Jun 2019 16:58:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 060312872F; Tue, 4 Jun 2019 16:58:39 +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=unavailable 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 A06D928662 for ; Tue, 4 Jun 2019 16:58:38 +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=rPjynCy1oBfYKVdE0OoOpsEEnT5EGqjg21ItZw9XNZ0=; b=jsiFJkgkJ+qkqt toQ+awHsdtz1rlqhkMiadQRl1E5kN/1tBT9puDO7jzvUhiCt0auNyazLfD4HOK3YLH4FGw4UvSyDT BESwnYg/JaSme8CW6VRiwIlsrQXq7bnWnWUHqMEu076lyrjNEYZVUN0mhGQwKuKJQKnD+XXlyAjW7 O35G2/94vZ0HRiEVEaZzJ75JaQnw6+wiKTwwRA96wYmX4f41YAhJnPUHObtyUAVrNaGV7crNYOHk2 lbW/2ULy3JKjcMGK3/qOOYAkDKx+8o50mdQWkl7/I7uRztUVAEOJaDQ1lpSN3YZdqJmxFSZR/33uP 2bi4wIbaYXFRaRKlTfzA==; 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 1hYClb-0005Pv-Bt; Tue, 04 Jun 2019 16:58:31 +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-0005I7-SC for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 16:58:27 +0000 Received: by mail-wm1-x343.google.com with SMTP id v19so2713523wmh.0 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=s8945EB95dD8HqzB+RPvlQmpbZtHmR857gYjJVTdvLcWHtcMLhEkvdUtBdMgg9E2wL jIhtkp32hCpgPRg4lR4PXyXgBKckzoD5Mgx+PzQYC7GUcCAOBjkLEX6RtNs330/d7cgt SwF1wnC0SQUWZX4YIYj4Ddx6mf4Q8xgtz2IT3uugUoODUf68S0EIu4kLjGwSmwrdoRwV FJi5r09qM2T7VmOtFdFPX+3noyrIg4CUlRShjXUjFNo9BUzdBrp30liuVcCn5+jeAkma Tzp0b9FstC9DS/unpk/HWjO0Gwu1SXPpnEMrJca9mT35PFvqWBAPH1+VHZlB6PFUIPqj ASJA== X-Gm-Message-State: APjAAAXpVJFwOkn6llgMQSb0BE0J5Y3OQg1F+YRxiv64v1s+XIQcbfyx OinV69Vs5iwIc7C8bLBfrJEnOwhRJ2w= 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_060405_CAF310EC X-CRM114-Status: GOOD ( 12.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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"; };