Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3481186ybl; Mon, 19 Aug 2019 20:02:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHvNaI4W/48DZgfL5KfgnqDyd4jnC2Mo+1QuMToYpZifKrvsgtcVtKb4jcIn04Cjvh/DA/ X-Received: by 2002:a17:90a:7783:: with SMTP id v3mr4242430pjk.109.1566270141534; Mon, 19 Aug 2019 20:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566270141; cv=none; d=google.com; s=arc-20160816; b=hK/M95AkGH13b/156WGwMJkEEf9UtdvE26A0EiBb9Ot5KCUb+M3nZNhK+GxxvxEz33 kV6j+WmgLDl7zntj9xqMxW9dIvZaLJLx0dYKuLdXvqgo4zdNjFFfqsZkLgMnAgGF0heP MOFS8I27hipLvdgb+us6tRgBoUizPXMw6hOAnKWvF4FMBHky4jcN/ghZ93tYHR+9IYHh ZIyIyAGCZXSMKuF1e/y2mSeYDm0PynVFhRP75JpFzVzpuaCRQZcmznFrfGrzPsmebya6 /2ajMrapbKDJXTXzj/68oujzpvsNMA4ylfiA62V17OGTI0qrwRi3D2IpddCxrcmVrMSR eG6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HcHMT4PO4aRPYDjhgvvcGFKWPsyZ2i/AKZp147gpb5c=; b=moEsra9r9UkL9fEF39MgSBOPlztxxWdsbF5Ik8SlbNzIWvj1iyEiw8lPVh4glyLYoo 7UiOCv6BBeaBAHWsqnPSQBX/YJXz55dLPb1nO2YAdLCuxmuiOtPAbw/Uf5qD7209TP2q uMozxCZrEpIaExyaU+05Fzh5n0KRBzogq0tN96VPVchOUsjWa/X/8OfriKlAQ6YMmd5J XsMieLzoGoZsIVPNO/k0lDSDEhBDnq/8+fJDzKg4X0GmRyu1E0DSxyqDcGQeOsH5k9Op Y0rLqZNPQBIlE1Im8sYP/9ol3VW7OQ20DehfMZmlqsYx/laqY6mjv3//6yxmbRohuroG HjEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=viL6Xfoe; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ck4si11432462plb.235.2019.08.19.20.02.06; Mon, 19 Aug 2019 20:02:21 -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=@linaro.org header.s=google header.b=viL6Xfoe; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729000AbfHTDBU (ORCPT + 99 others); Mon, 19 Aug 2019 23:01:20 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42028 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728896AbfHTDBU (ORCPT ); Mon, 19 Aug 2019 23:01:20 -0400 Received: by mail-pl1-f196.google.com with SMTP id y1so1946897plp.9 for ; Mon, 19 Aug 2019 20:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HcHMT4PO4aRPYDjhgvvcGFKWPsyZ2i/AKZp147gpb5c=; b=viL6XfoedAqOcc/HJQnJMBOYsdVq2vOZFFWALl/6A16nYkuuAVsJHbhTaeECSJc5Zz hzWGJA4gfwyZsEad9v+PIB1172n7T7M2E400hAOkUFPq7Aj0uLS9A2YAxUNLe+T4PG1P ABkkGE50E/dJxcxRzf+07PFLDwK6NkNCEYKsqdIgZ5vS36/b+subF11lyZJMf65sycaw u3kl8jnMdCK9+9ljUmJMs3whQ1VMAS9LC5FYZ6M88g/URRNO9ehEkCjJ8gb+Tb+aCwUz uKKtx390D8iHg3JeksxQPB1bBKqsL/UtWOkxjT6NZSJBiGilrKbGyRK5uYO6GABTo56l VZqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HcHMT4PO4aRPYDjhgvvcGFKWPsyZ2i/AKZp147gpb5c=; b=EysQIicR2EQx6jLBsJKYyjBSX8ofN9RkC75VI1kFbkPtpGh2ccABE3DHYBiHRzybRm GgH10C4j7I9QiWdLlMV3u/oG+7HD93AIjxS275Y0eSAJfobKSVuskxaRuC6Nk4HK0JVo hUIcans03qNARu0wVn+3A02/QiZfX4X7qULKfOGERqAUeyTlHc9KUdVJrsqTte39qAdN /VNS+LcfgYnfoLoP7NWa2A2Do5QxqZefmC4Qvd+rc/bMPMjdtfG0PY9tlXWIYQ/Bc7eG RGmVpXKdNffBzC4qshDul5cswVjThqi/6t7aklczNqXXEiNg1M3VnC/vynqXYPSRO7QN Wv7Q== X-Gm-Message-State: APjAAAV+MOMK4xi9bHFO7iTmoaE8L7YqBRqrmT5KAaPEwxp2KY3YvNPk ++UQkSfyuwO7vTW/wU6uxYr7Jg== X-Received: by 2002:a17:902:54d:: with SMTP id 71mr25255114plf.140.1566270079363; Mon, 19 Aug 2019 20:01:19 -0700 (PDT) Received: from localhost ([122.172.76.219]) by smtp.gmail.com with ESMTPSA id n7sm17609938pff.59.2019.08.19.20.01.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Aug 2019 20:01:18 -0700 (PDT) Date: Tue, 20 Aug 2019 08:31:14 +0530 From: Viresh Kumar To: Sylwester Nawrocki Cc: Marek Szyprowski , krzk@kernel.org, robh+dt@kernel.org, vireshk@kernel.org, devicetree@vger.kernel.org, kgene@kernel.org, pankaj.dubey@samsung.com, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, b.zolnierkie@samsung.com Subject: Re: [PATCH v2 0/9] Exynos Adaptive Supply Voltage support Message-ID: <20190820030114.6flnn2omeys3lih3@vireshk-i7> References: <20190718143044.25066-1-s.nawrocki@samsung.com> <20190723020450.z2pqwetkn2tfhacq@vireshk-i7> <5ef302a4-5bbf-483d-dfdf-cf76f6f69cee@samsung.com> <20190725022343.p7lqalrh5svxvtu2@vireshk-i7> <562dd2e7-2b24-8492-d1c1-2dc4973f07be@samsung.com> <20190819090928.pke6cov52n4exlbp@vireshk-i7> <20190819112533.bvfyinw7fsebkufr@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-08-19, 15:39, Sylwester Nawrocki wrote: > Unfortunately not, the patch set as I see it is another way of updating > an OPP after it was parsed from DT. OPP remove/add could work equally > well in our use case. Adding OPPs dynamically has limitations, you can't set many values which are otherwise possible with DT. And removing/adding is not the right thing to do technically. > The problem is that we have the information on how to translate the > common OPP voltage to a voltage specific to given silicon encoded jointly > in the ASV tables and the CHIPID registers (efuse/OTP memory). > Additionally, algorithm of selecting ASV data (OPP voltage) based on > the "key" data from registers is not generic, it is usually different > per each SoC type. > > I tried to identify some patterns in those tables in order to simplify > possible DT binding, but that was not really successful. I ended up just > keeping whole tables. Sorry but I am unable to understand the difficulty you are facing now. So what I suggest is something like this. - Use DT to get a frequency and voltage for each frequency. - At runtime, based on SoC, registers, efuses, etc, update the voltage of the OPPs. - This algo can be different for each SoC, no one is stopping you from doing that. Am I missing something ? -- viresh