Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3942700ybz; Mon, 4 May 2020 12:36:42 -0700 (PDT) X-Google-Smtp-Source: APiQypKbqr4jVTgsh+PBYTCgfz08A1CH4bvQh0pKT7pBWvKqB29jNAKZld3khVO26B6kqoYcuJaV X-Received: by 2002:a05:6402:8ca:: with SMTP id d10mr16511327edz.167.1588621002334; Mon, 04 May 2020 12:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588621002; cv=none; d=google.com; s=arc-20160816; b=PTSUYBzOXxu+PDrhJB5QnBFyNHeN3PX7usf+IU1CF4JYWz2WgfhHwVUfTk2DDu3oAT jI58R0yt1Y2lXT9kMdsHzT0LzLRQusvpeiuJB4iBbHtgLjQExj+PHXLR2KidQZ+poald g7s89swBUEtGVVbWCqyaNy/U7C3Z/Z0juC5qao1x/JjQcl14s2yykvVhb+KPT4Qbn5vI 3BIx6O1w/teOQBXFpAEat1esCLohiv/YedKVEDZjMQzt/dPZK4qJDjTcRTKVTTmoPpvP YXH0kKJMm70p+a/62fWqNcvVsgEMasdMifZRKZWlFqwU5T8xBaQjZpYkpnSxGgipi3HC 61gg== 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=VLedveHRjOWzxQFafIfJM9vIF9bwIvP2E6cViDidxC0=; b=oMJyi4rpHcbN1O4hpcm07wfFVGKx5zJtMc3e20fHhtzooUs0xHYcv5lqtB9/ODLHtM 1elcfQlV88I5AsZOp2/fOHjAUsAPAtRohyj3HzM+8TzZyIRRNUokP6LPIoFvSRAgCOHJ Iwwsx5HXU5fax/SEEYvfmvMYMUdEp8/UzZ6wPQo9Jjr9HXJJfZl5MY6v2c0uLPa4uM2Q /RpbTrqUKNWtNsdfvs/Qu6ElzMTb6w+BvPyjcJEd1vSnt3MmRmZNO4i5y4lFf3o1jrps ro0LzB/d1AM6unX9x1xyoLSE4V4hOmcd1HLtXjKyppsDQJqjV8CpAkOECJ/LizDzA26T 8Ouw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vaJNJgNc; 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 gl22si8144885ejb.402.2020.05.04.12.36.18; Mon, 04 May 2020 12:36:42 -0700 (PDT) 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=vaJNJgNc; 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 S1726773AbgEDTeb (ORCPT + 99 others); Mon, 4 May 2020 15:34:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725956AbgEDTea (ORCPT ); Mon, 4 May 2020 15:34:30 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35E12C061A0E; Mon, 4 May 2020 12:34:30 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id j8so9393326iog.13; Mon, 04 May 2020 12:34:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=VLedveHRjOWzxQFafIfJM9vIF9bwIvP2E6cViDidxC0=; b=vaJNJgNcxrb1V5Ckol5RMcTftci6iMEwDqjBnwg7I9WEAjRh9OiwFGM1XEAF9FFeFB TwTgyft86VFfbUnMYpmPxCfITWODOtjcvxiVdLsdtn/V7Mgb7iHrEOYEHNWkBobsIRJM cJpt09Z/GjDpK/iBDC14QsKMe8Y+bOfQmMKDsDe8XofsTdqihOsSRFZwhocx7VgajxY9 ZAB+ToZsSEVpJzV3lGVsUNRfmktcvgncHQEbmz0Swp3YKoMOByPG8I205KNBzv1Eors6 PHCPbMmVEUQ0gRcaClkxLC9inREdEBwepLrV9LmsSAHZAZ3O7OW/A8Kt1/bz1TB0Di9c JXCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=VLedveHRjOWzxQFafIfJM9vIF9bwIvP2E6cViDidxC0=; b=qIrMv+SxgBsjfSjmB/AfXyRgeB/c8vvzjuBzBq0yaQuot5NHMleiPKPUxGzfb6LyXz GxM5aogsca2Dsq+XpvbZ5souMbiUIssTfcDDLPmMM4I0638nHH24g9lHr5s57Y7QY7Cp iiTURBxOKql3mIRtEB8ZOxSSSLXaeRbgFeWeOmXWfSe2Cy5IBq7wU/Vq5YPvnEPOgZfX /2+/NDPfSRykMAAMLJDvX4GHi/WW4tgNP2Vzvrf2atl7+bl87Eb3Nf0NN4a4CDps7+x0 0MmhZq/BfsH2SbjQoYL4t9N6MMtihuJTnXTsv8QToHy/JBVdU9rtoTrq40TgdwpehNkE 3Evg== X-Gm-Message-State: AGi0PuaFZQ3zLV5V5QAXzKJEYgzNBj/Z8oqGWEMCN3fLssz/GwGKwe9A 57lD74GcnpY6HwFv95BoFqbsr/YTOTaS/QQkXiLGDdHn X-Received: by 2002:a02:a004:: with SMTP id a4mr34524jah.18.1588620869486; Mon, 04 May 2020 12:34:29 -0700 (PDT) MIME-Version: 1.0 References: <20200428142629.8950-1-peron.clem@gmail.com> <20200504122742.er2jd67bvrn2rfgp@core.my.home> In-Reply-To: <20200504122742.er2jd67bvrn2rfgp@core.my.home> From: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Date: Mon, 4 May 2020 21:34:17 +0200 Message-ID: Subject: Re: [linux-sunxi] [PATCH v2] arm64: dts: allwinner: h6: Use dummy regulator for Tanix TX6 To: =?UTF-8?Q?Ond=C5=99ej_Jirman?= , =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Maxime Ripard , Chen-Yu Tsai , Rob Herring , linux-arm-kernel , devicetree , linux-kernel , linux-sunxi , Piotr Oniszczuk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ondrej, On Mon, 4 May 2020 at 14:27, Ond=C5=99ej Jirman wrote: > > Hi Cl=C3=A9ment, > > > So I guess ignoring the voltage and not disabling this OPP may or may not= work > based on SoC bin. > > On Orange Pi One, there's a regulator that supports two voltages (that ca= n't > support all the listed OPPs for H3), and cpufreq-dt can deal with that > automagically, if you specify OPP voltages via a tripplet of [prefered mi= n max]. > Kernell will log this in dmesg on boot: > > [ 0.672440] core: _opp_supported_by_regulators: OPP minuV: 1320000 max= uV: 1320000, not supported by regulator > [ 0.672454] cpu cpu0: _opp_add: OPP not supported by regulators (11040= 00000) > [ 0.672523] core: _opp_supported_by_regulators: OPP minuV: 1320000 max= uV: 1320000, not supported by regulator > [ 0.672530] cpu cpu0: _opp_add: OPP not supported by regulators (12000= 00000) > [ 0.672621] core: _opp_supported_by_regulators: OPP minuV: 1340000 max= uV: 1340000, not supported by regulator > [ 0.672628] cpu cpu0: _opp_add: OPP not supported by regulators (12960= 00000) > [ 0.672712] core: _opp_supported_by_regulators: OPP minuV: 1400000 max= uV: 1400000, not supported by regulator > [ 0.672719] cpu cpu0: _opp_add: OPP not supported by regulators (13680= 00000) > > And the list of available OPPs will be reduced at runtime to a supportabl= e > set by the CPU regulator. > > If you look at: > > https://megous.com/git/linux/commit/?h=3Dths-5.7&id=3Dd231770195913cf54= 3c0cf9539deee2ecec06680 > > you'll see a bunch of OPPs for H3 that are specified as a range. So > for example if you want 480MHz, and your regulator can't produce > 1.04V exactly, cpufreq will set the voltage to something supportable > in the range. > > I think the proper fix is to fix the OPP table for H6, so that it uses > voltage ranges for each OPP and not a single fixed voltage, to support > boards that don't have the standard PMIC that goes with H6. Thanks for the suggestion and I agree with you, this is a good way to keep the same OPP table for all the H6 devices and handle both board with PMIC and with fixed regulator. I will propose a patch. Thanks clement > > regards, > o.