Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp250314pxb; Thu, 12 Nov 2020 02:55:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1VwRlpDuly96HX5wqvNIIOMEQ//w8AuiMRKJ+Sm/gb+KZ4oHw0VLTEk+gP/rEtYkh3hVK X-Received: by 2002:aa7:ce82:: with SMTP id y2mr4546296edv.6.1605178503122; Thu, 12 Nov 2020 02:55:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605178503; cv=none; d=google.com; s=arc-20160816; b=PpWM6CFSZDsR7Knvfs5ZdsHONVTOkjhOgfr4iVrlEkMY7jhzTj/cYKm/yN32muQps+ rhZGeKmjX33XjrMgWoqDkboDFoXc5hgqFNKBFX9F3QBq/idf8sB+uFuNZq0J7qAo621Y kPSKqfl1A+1viFUl1yH418DH4yyKtbxwXqEFCwD0LzrswfzEvXGeNNJ/z0SdX7T1PK24 AgIcz6HtFVzHHcVGSogCWD9avbkJMJ8uaMrBbcI0NLFfObRLUf4HPoEIKZZrHVdurUCs HeVzk0Ic2WUkxqiYHk4qbLuwEMyGPcgKCovNNNbWGmsDZnuLQNmk1pCfLOdzutXJSo6u uv9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ko0Hen9xgaMvsVz22vy0N1Bw1MmjjCfm//RLZdh5Ix8=; b=pNNf1DWFO0wtPMhU9th7klTNVhtjNfv1cLEyTZ1aLW9MV3Fo2fbywFJgXW7XfSj07M /0I3M8ftvnQVce27qaEjC7V6Ur43Q7Hdun8VDesIVIKqZuKy0H/MpX6GbfP+JR/fzXkM XiWQLh2Xsy9d3Uqx5imfvqEUF52r2OZM3hvA6hHOvQ7UlTkxZOrEAsxq/aBmQwQ1JwMi pP231moDZXVscAvD5ZOdZl4DpVA3inF0+VsVcaH5/S7UgN7U5INGX62N1KLLWyXzBhsB PgpzdLLLYLOh+csiiA3QGetd54oFdXT6Vzo1rkmEUi4yVy4cuFedft5vraVl2BZTn2BK x+lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LPh4+MZN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si3467789eds.397.2020.11.12.02.54.40; Thu, 12 Nov 2020 02:55:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LPh4+MZN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727822AbgKLKv0 (ORCPT + 99 others); Thu, 12 Nov 2020 05:51:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbgKLKvZ (ORCPT ); Thu, 12 Nov 2020 05:51:25 -0500 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F3A1C0613D1; Thu, 12 Nov 2020 02:51:25 -0800 (PST) Received: by mail-lj1-x243.google.com with SMTP id l10so5557701lji.4; Thu, 12 Nov 2020 02:51:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ko0Hen9xgaMvsVz22vy0N1Bw1MmjjCfm//RLZdh5Ix8=; b=LPh4+MZNokEWonIni3ZCTu6odNHux9zEsd4ClN9OceJOADqpT2H0Xz7Rp+iD7yOivi 3MKl/vtsXpB9dqAR8HFyp11eNrmPkJ6CNfjRC4ftuMgL/czjicmgi0SGguihWckbiO09 1SOkAYTFUbWiajY2p1UjfWC3vg0VvvSQuYvERAdh9DqFR96PU9L+yElqLUJPTm/GVjDW I6V9XIQYZHORg9datYkQ8BNKweLUxWH3gjbLmBVYDIXjCEzXD09TwKXIqumrWbvkd98W z4yvE4J5SHGxs9sBaG+GfK5fcQDxSzBsqvUlrt9AypnTC0GECcfPHQrf2EjldFc56VZw abMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ko0Hen9xgaMvsVz22vy0N1Bw1MmjjCfm//RLZdh5Ix8=; b=rnTWHeGy6/kyjW324nMLvPuV7bm4nlfDuciroDuKcaO4Ie3kkXUNTxbOCaYTRfI+GQ 3lc+hDxIOMcrnUK19Vi0PvltLi7/dEpQFsfJuW3o9HaukvYmkYVEreq5fm0ShKxb6ZL0 UHRN1FH4XnOuYokCwerRNJLbuAbE5bjRDipWDZ3ffIpy5pXl74GNwNKDCdUZOeGFh9RU oWFxMpj726R6nKihQFh0wxKeUtRakV5lYOap8ovnnFw4YDP9j43vsaIdKPH6C/3YKAIF /0jseCMr+96yjO5CCaHGRCOVtNMQlBgcXR3ZmalQbdMp6y4ta6oSo4M19GkKqFmsZ8sP z3Nw== X-Gm-Message-State: AOAM533g/cfrTnQ2QFezF2lTUJgg1aj5jqZfxC5psfoLH0BUEQ15Vujp lMKjUhuHQJoMGC9TFMIaCzQqH4p9Ji8= X-Received: by 2002:a2e:7a18:: with SMTP id v24mr6174698ljc.224.1605178283664; Thu, 12 Nov 2020 02:51:23 -0800 (PST) Received: from [192.168.2.145] (109-252-193-159.dynamic.spd-mgts.ru. [109.252.193.159]) by smtp.googlemail.com with ESMTPSA id b13sm504831ljf.107.2020.11.12.02.51.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Nov 2020 02:51:22 -0800 (PST) Subject: Re: [PATCH] ARM: tegra: Populate OPP table for Tegra20 Ventana To: Jon Hunter , Rob Herring , Thierry Reding Cc: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20201111103847.152721-1-jonathanh@nvidia.com> <7e40cd3e-7c34-c9a9-bf00-ba7d507a2d6b@gmail.com> <5409bbb4-d3f9-ccc9-ac3e-6344975bd58e@nvidia.com> From: Dmitry Osipenko Message-ID: Date: Thu, 12 Nov 2020 13:51:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.2 MIME-Version: 1.0 In-Reply-To: <5409bbb4-d3f9-ccc9-ac3e-6344975bd58e@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 11.11.2020 23:31, Jon Hunter пишет: > > On 11/11/2020 13:47, Dmitry Osipenko wrote: >> 11.11.2020 13:38, Jon Hunter пишет: >>> Commit 9ce274630495 ("cpufreq: tegra20: Use generic cpufreq-dt driver >>> (Tegra30 supported now)") update the Tegra20 CPUFREQ driver to use the >>> generic CPUFREQ device-tree driver. Since this change CPUFREQ support >>> on the Tegra20 Ventana platform has been broken because the necessary >>> device-tree nodes with the operating point information are not populated >>> for this platform. Fix this by updating device-tree for Venata to >>> include the operating point informration for Tegra20. >>> >>> Fixes: 9ce274630495 ("cpufreq: tegra20: Use generic cpufreq-dt driver (Tegra30 supported now)") >>> Cc: stable@vger.kernel.org >>> >>> Signed-off-by: Jon Hunter >>> --- >>> arch/arm/boot/dts/tegra20-ventana.dts | 11 +++++++++++ >>> 1 file changed, 11 insertions(+) >>> >>> diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts >>> index b158771ac0b7..055334ae3d28 100644 >>> --- a/arch/arm/boot/dts/tegra20-ventana.dts >>> +++ b/arch/arm/boot/dts/tegra20-ventana.dts >>> @@ -3,6 +3,7 @@ >>> >>> #include >>> #include "tegra20.dtsi" >>> +#include "tegra20-cpu-opp.dtsi" >>> >>> / { >>> model = "NVIDIA Tegra20 Ventana evaluation board"; >>> @@ -592,6 +593,16 @@ clk32k_in: clock@0 { >>> #clock-cells = <0>; >>> }; >>> >>> + cpus { >>> + cpu0: cpu@0 { >>> + operating-points-v2 = <&cpu0_opp_table>; >>> + }; >>> + >>> + cpu@1 { >>> + operating-points-v2 = <&cpu0_opp_table>; >>> + }; >>> + }; >>> + >>> gpio-keys { >>> compatible = "gpio-keys"; >>> >>> >> >> This could be wrong to do because CPU voltage is fixed to 1000mV in >> Ventana's DT, are you sure that higher clock rates don't require higher >> voltages? What is the CPU process ID and SoC speedo ID on Ventana? > > I see this in the bootlog ... > > [ 2.797684] tegra20-cpufreq tegra20-cpufreq: hardware version 0x2 0x2 > >> You could easily hook up CPU voltage scaling, please see acer-500 DT and >> patch [1] for examples of how to set up regulators in DT. But then it >> shouldn't be a stable patch. > > According to the Ventana design guide the CPU voltage range is 0.8-1.0V > and so it appears to be set to the max. The CPUFREQ test is reporting > the following ... > > cpu: cpufreq: - CPU#0: > cpu: cpufreq: - supported governors: > cpu: cpufreq: - ondemand * > cpu: cpufreq: - performance > cpu: cpufreq: - schedutil > cpu: cpufreq: - supported rates: > cpu: cpufreq: - 216000 > cpu: cpufreq: - 312000 > cpu: cpufreq: - 456000 > cpu: cpufreq: - 608000 > cpu: cpufreq: - 760000 > cpu: cpufreq: - 816000 > cpu: cpufreq: - 912000 > cpu: cpufreq: - 1000000 * > cpu: cpufreq: - CPU#1: > cpu: cpufreq: - supported governors: > cpu: cpufreq: - ondemand * > cpu: cpufreq: - performance > cpu: cpufreq: - schedutil > cpu: cpufreq: - supported rates: > cpu: cpufreq: - 216000 > cpu: cpufreq: - 312000 > cpu: cpufreq: - 456000 > cpu: cpufreq: - 608000 > cpu: cpufreq: - 760000 > cpu: cpufreq: - 816000 > cpu: cpufreq: - 912000 > cpu: cpufreq: - 1000000 * If you don't see a message in KMSG saying "bringing vdd_cpu to 1000000uV", then should be good.