Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp54199imd; Fri, 26 Oct 2018 05:05:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5fyPj9+2LMsIsdF38vusFivc6HX20cf4oWAp24Wj/2EkRs+03vi2p+nzbGu32CwJ+HBi9le X-Received: by 2002:a62:1497:: with SMTP id 145-v6mr3558910pfu.100.1540555558473; Fri, 26 Oct 2018 05:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540555558; cv=none; d=google.com; s=arc-20160816; b=z/gfZQGCxmRnt1lRjlDhZvvrlz2Fbv0MzGl7sqaQbWYRxmPxjuQyTj0PwVkdk7X+kZ N4Pdla6KBhKTKnTsAClD0wBL0h8IHWsjZ3sX2uj0HkkgrLZPX5mgtMO1QdO21X4yeW7H h/W4CzP6uqoq4dAfpWdvE6vP1lHjwBGhSEWacCZFWqb3i22XX1VVPmyqmWL0+MpfSoJ3 W5adBor2mYsi29/w766lfxaEUDamlIUhekoU8wXKQDqo6YGPbAdh85IwDAtz+kx5UlmQ FkGtaeePXCo///Vr9zJPNSVRLMhayajIhL+iQHzgxLZwl8f9wqjuah6as7JYaYv4Muie DWlQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ANRKLCsHHwR7eib38zAD/OCx5I7PXx4q/aI1rdMoOFs=; b=tIXsybfI+lZTYh1dJsFDZN1WqR1BUe/0zMbp/8l4KIRFkSOi1vK5xSrnLdwFDm0cu9 HOwfohlmx59K0jP/5Wc8h++xAQzkX0r6QPwQ/dodl75p6ORi34Z3wkPZ1Tvx7JkDUN8G XlaqyRM+5vCX9ALaN7s1TDAL2X2pvxvfIuFhILtgYguKbGRTlDGAgD9Oh6xyZjEmfpSc oxHBpBW4yPxYWh4F0rvgOb1dV+d3EBw3UDx6BRB09HYbzS1gVMCDmgt3fHDUEUrsfMdv bWyMecpCBo4KHrFaIFAoXgKrxcYCdP82RVyshi6OYqO6SEA7iLsRE56dL2MFI/XVIEFE 850g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=InF0fbNg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p74-v6si11407664pfa.44.2018.10.26.05.05.39; Fri, 26 Oct 2018 05:05:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=InF0fbNg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727637AbeJZUkm (ORCPT + 99 others); Fri, 26 Oct 2018 16:40:42 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36013 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727507AbeJZUkm (ORCPT ); Fri, 26 Oct 2018 16:40:42 -0400 Received: by mail-pl1-f195.google.com with SMTP id y11-v6so417935plt.3; Fri, 26 Oct 2018 05:03:52 -0700 (PDT) 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=ANRKLCsHHwR7eib38zAD/OCx5I7PXx4q/aI1rdMoOFs=; b=InF0fbNgYwT4zUtsDMuhDrRArT0lH9qwrfOEIoUWYlEP+bQwI4ArnAeQQFi3yZwzCd PHoHBpU+7Xz3prrSQzUcCuSDFJ3Myp9UULCByylI3pPMvw8FAXboSiikzl9/ihSTDl2j TIbT1/TLRaaE68R3xuC9XZyd53UtJVNcdbZRve5jrV222zgewlI9dITdG0Ub9sY7mRcM t6rCBywaAeg2V1BYZvRK8pA9jnSkxQqeZ1sEIlLyhZxaRWzPBOUpDCrc9Ks6tSRVr/9W fIToXObJWg/IBE/+f+/6bY0V0BSxTNbMy06cKCYUyEQtwP7EU8jYevH0DtkSDxY2oSk0 t3bQ== 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=ANRKLCsHHwR7eib38zAD/OCx5I7PXx4q/aI1rdMoOFs=; b=FcKsS+jD63CbP41v6Ke90mmZqjmtwfxJze0CA7AUT6TFs7LbMlYYKVChwwjt7YsGVp 8z3oRqmrwiIfGgPe4INEAqPyWcBWfti8ADHBQoLcZLUrsgK3KBxPHK2uLjQEJh+tv/e3 I5TNM8Wnpo+n2gyHtn9Biyk1gbqUS/ptVNPnnoJsqrOmVZe2yEIq2QPmAPbYOSJW07HP dMxQnmYolzCqzMEek1DeLbvPGBDlkRdJiFog9i/bBuQ7xQ7KeSxIBxw+RjwXO7ucO8ZF IsUTpK321f2OA+ikwImoLHFIJKb2LuuEtxE8cxZEtZIg7LmTDWIdOtHHesHU/GzwqoQ2 sv/w== X-Gm-Message-State: AGRZ1gLi+19wWUL+6BOpittbVJ1aZbkCHx4inCNt0NmmsV7cCa+mJt7k HgPNJh8clOsjLMQTIjaRoxizhgaJ X-Received: by 2002:a17:902:b690:: with SMTP id c16-v6mr3218926pls.284.1540555431155; Fri, 26 Oct 2018 05:03:51 -0700 (PDT) Received: from [192.168.2.145] ([109.252.91.118]) by smtp.googlemail.com with ESMTPSA id h123-v6sm29231469pfg.138.2018.10.26.05.03.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 05:03:50 -0700 (PDT) Subject: Re: [RFC PATCH v2 01/17] OPP: Allow to request stub voltage regulators To: Viresh Kumar Cc: "Rafael J. Wysocki" , Rob Herring , Thierry Reding , Jonathan Hunter , Nishanth Menon , Stephen Boyd , Marcel Ziswiler , linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20181021205501.23943-1-digetx@gmail.com> <20181021205501.23943-2-digetx@gmail.com> <20181022053636.ag62j3rj3vovbz53@vireshk-i7> <20181022113224.b5fiebgy2aap66nd@vireshk-i7> <29f893be-feed-c4c5-8468-51f7228dd468@gmail.com> <20181024064123.lbpbeervghp35fe7@vireshk-i7> From: Dmitry Osipenko Message-ID: Date: Fri, 26 Oct 2018 15:03:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181024064123.lbpbeervghp35fe7@vireshk-i7> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/18 9:41 AM, Viresh Kumar wrote: > On 22-10-18, 15:12, Dmitry Osipenko wrote: >> Because there is one Tegra20 board (tegra20-trimslice) that doesn't declare >> necessary regulators, but we want to have CPU frequency scaling. I couldn't >> find board schematics and so don't know if CPU / CORE voltages are fixed on >> Trim-Slice or it is just preferable not to have DVFS for that board, it is an >> outlet-powered device [0]. Hence tegra20-cpufreq driver will request a dummy >> regulators when appropriate. > > We have been using the regulator_get_optional() variant until now in the OPP > core to make sure that we don't do DVFS for the CPU without the mandatory > regulators being present, as that may make things unstable and cause harm to the > SoC if we try to take CPU to frequency range over the currently programmed > regulator can support. > > Now coming back to tegra-20 SoC, which actually requires a regulator normally by > design. On one of the boards (which is outlet powered), you aren't sure if there > is a programmable regulator or not, or if DVFS should really be done or not. > Isn't it worth checking the same from Tegra maintainers, or whomsoever has > information on that board ? I'll try to find out more detailed information for the next revision of the patchset. What would happen if there actually was a regulator > and its default settings aren't good enough for high end frequencies ? Usually this causes kernel/applications crashes and/or machine hang. > On the other hand, the tegra20 cpufreq driver is common across a lot of boards. > What will happen if the DT for some of the boards isn't correct and missed the > necessary regulator node ? AFAIK, there is assumption that bootloader should setup regulators in a way that kernel could work properly at max clock rates. Otherwise things won't work. And because you are moving to regulator_get() API for > the entire SoC (i.e. its cpufreq driver), people will never find the missing > regulator. Regulators core prints info message when dummy regulator is being used. > If we can do it safely for all tegra20 boards, why not migrate to using > regulator_get() instead of regulator_get_optional() in the OPP core API itself > for everyone ? > This should be a platform-specific decision. For Tegra we know that regulators should be in a good state at kernel boot time, I don't think that this applies to other platforms.