From patchwork Mon Dec 18 10:21:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 122203 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp2554864edb; Mon, 18 Dec 2017 02:21:45 -0800 (PST) X-Google-Smtp-Source: ACJfBovg8rEL3wCQuZGKS4u2C75Hxp0L+N4BDVXPoEZRdGbZgRb/x64CFEed+oEE4ptu7AuRqir5 X-Received: by 10.98.17.72 with SMTP id z69mr21434756pfi.86.1513592505253; Mon, 18 Dec 2017 02:21:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513592505; cv=none; d=google.com; s=arc-20160816; b=S2xKchUMEZDzssQFaCaiaOQSTwpyhU1TYTnq+LFFXXJ+ejraWPwTmtDyqGoAueITy9 5QqniuwPgq86JlJ3GibdIrZLrjN/vw073hpy6nt0X7cgt15K4bOlPWWMUsrERT4QbKWa rILj5kKQ/r6l930F7WT7GYazP0A9XDhMY7BoWffM4pmsmW3C0+TXvGd0qWBS02wk6ult OpKKJpdrEtDPzYDP72mtoMHuBIagbxtARPg2G2qMVCE7Icrke+6emr6l3KX1m4Qep7oM UYYo6sK6XXXQIhn+mG+p9eVRLW0pRMDy9Gowt8/tcUAY7mDa9xN5X8r94G0fjVgV9bvJ YAIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=29BFueaUqnPAvIVGidV3zrJwSsTZ8eHf7P6+XKZVmuE=; b=LkQ4ryUuemzRFnA7+aI7hKsBPtqXIMggwGprYaxmaM5b/7uXZx1p2l4gfvGOENfEfH H9tQUW8NE30jGZEE/EKSQP4+HLwXsnx0DDgvmrOEVzHJjnqXFt4xbj9N1YKcQMPM1HWJ /L3fY4Q6faxl0of4/l/DAxRhnrB9a/ILNbRekMoEMGeandrDHyd5N+uzonrTUzJVh2tU XyvTApm4/3nBofo6rk/3w6M4M4n0V7epUXFaeCyCawwy+qx7N/CNb4e4v2NyyNKngdxd DFpjT8+VdrcAep7Gppda5r7j9aoGxqa2DjchExZThA5m6Lr/FUwQGoTSPXX7IRIP7I0a 69cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O8gaDOy8; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 g1si8315088pgq.22.2017.12.18.02.21.44; Mon, 18 Dec 2017 02:21:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=O8gaDOy8; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S932693AbdLRKVm (ORCPT + 11 others); Mon, 18 Dec 2017 05:21:42 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:33500 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932610AbdLRKVj (ORCPT ); Mon, 18 Dec 2017 05:21:39 -0500 Received: by mail-pl0-f68.google.com with SMTP id 1so3083999plv.0 for ; Mon, 18 Dec 2017 02:21:38 -0800 (PST) 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 :in-reply-to:references; bh=29BFueaUqnPAvIVGidV3zrJwSsTZ8eHf7P6+XKZVmuE=; b=O8gaDOy8GuYgIS2/o2fKNmx6HAU1Px04vX+aZZQEUHWcB1Y8WacYAfk7YlV4tyoFqM G8f1euPIQEHXtVfqa7tXqzIEjcn+TDU7Wk9ZLHlOzhI2iKyaRUyQmlq8LEoONjSPwvp2 DIH4WVDHA/tjjXj/iFHfG9KvPe8N44qeaH2AA= 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:in-reply-to:references; bh=29BFueaUqnPAvIVGidV3zrJwSsTZ8eHf7P6+XKZVmuE=; b=o8LdUY89NrnAIHC5Sq9P66CRI+N4oGKGNlTv1utWi+FwGqii6JMygdxPKgeqz9vQjq 0ABmI/peMecUdine+urDppDeP0tTR0JOqhR83lJObvEc9f529Or1yEa0hfyehN3yOoE5 6hw8XACzxxHSRWi/1gYOCoy5gBkKXsERNAYtO4N3/C8837o66qVVYrNMshqHaS+k6BiE k16YSSdTN9P5OMcOJT7smphLEVA9TMQjzPFiY5XGxXBIgV9iDRP8Q//sCZ4oofi/YeWc BXk3k8mH237yZQO1ayFakeyAn7eaM33QGWgv0wHwmUeOrpCZP4F8h2adyW99bb1orwlO WKsQ== X-Gm-Message-State: AKGB3mJSYEU0hFPzPNX/3Hdf3nkx8R2RdOpIx35nRH1L0kxMH2sA+qSl AHivu65wEqkz11v0oZXE0RfeHw== X-Received: by 10.84.129.37 with SMTP id 34mr6074849plb.86.1513592498566; Mon, 18 Dec 2017 02:21:38 -0800 (PST) Received: from localhost ([122.172.99.7]) by smtp.gmail.com with ESMTPSA id 69sm25489795pft.11.2017.12.18.02.21.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 02:21:38 -0800 (PST) From: Viresh Kumar To: ulf.hansson@linaro.org, Kevin Hilman , robh+dt@kernel.org, Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , rnayak@codeaurora.org, sudeep.holla@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V8 1/3] OPP: Allow OPP table to be used for power-domains Date: Mon, 18 Dec 2017 15:51:28 +0530 Message-Id: <9cd1e90c782a8569d098adb63bee7dd1387528c4.1513591822.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Power-domains can also have their active states and this patch enhances the OPP binding to define those. The power domains can use the OPP bindings as is, with one additional change to Allow "operating-points-v2" property to contain multiple phandles for power domain providers providing multiple domains. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar --- Documentation/devicetree/bindings/opp/opp.txt | 5 +++++ Documentation/devicetree/bindings/power/power_domain.txt | 6 ++++++ 2 files changed, 11 insertions(+) -- 2.15.0.194.g9af6a3dea062 diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index 9d733af26be7..a3953a1bb1a1 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -45,6 +45,11 @@ Devices supporting OPPs must set their "operating-points-v2" property with phandle to a OPP table in their DT node. The OPP core will use this phandle to find the operating points for the device. +This can contain more than one phandle for power domain providers that provide +multiple power domains. That is, one phandle for each power domain. If only one +phandle is available, then the same OPP table will be used for all power domains +provided by the power domain provider. + If required, this can be extended for SoC vendor specific bindings. Such bindings should be documented as Documentation/devicetree/bindings/power/-opp.txt and should have a compatible description like: "operating-points-v2-". diff --git a/Documentation/devicetree/bindings/power/power_domain.txt b/Documentation/devicetree/bindings/power/power_domain.txt index 14bd9e945ff6..61549840ab3b 100644 --- a/Documentation/devicetree/bindings/power/power_domain.txt +++ b/Documentation/devicetree/bindings/power/power_domain.txt @@ -40,6 +40,12 @@ phandle arguments (so called PM domain specifiers) of length specified by the domain's idle states. In the absence of this property, the domain would be considered as capable of being powered-on or powered-off. +- operating-points-v2 : Phandles to the OPP tables of power domains provided by + a power domain provider. If the provider provides a single power domain only + or all the power domains provided by the provider have identical OPP tables, + then this shall contain a single phandle. Refer to ../opp/opp.txt for more + information. + Example: power: power-controller@12340000 { From patchwork Mon Dec 18 10:21:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 122204 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp2554985edb; Mon, 18 Dec 2017 02:21:51 -0800 (PST) X-Google-Smtp-Source: ACJfBouAk25wMie5KXwJNTDrP+ovITYaFyxWST++qfbphdInE5A6CkSKKWgj78g46ud946VO+GI5 X-Received: by 10.159.233.131 with SMTP id bh3mr21394585plb.97.1513592511388; Mon, 18 Dec 2017 02:21:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513592511; cv=none; d=google.com; s=arc-20160816; b=Y+HWZz0Skx0UNyiYwFOP8pCzL5KjV+GTWYieJkAcr+oQc31j6FfMsKSE79udTpemM3 /Mqikda2EIHEzvO5hCam9IKgdvdzLAuXJulSF1T3HBk/bCcsNoLm5UZJ1bTGptABkUl2 ui198UrYjhvtbMfKMv6iEDscGmJih27QAOFKr6pMTyXI+HUWH10YAEeQGT0QTybzuO4k mkgmbQ6GgpHeNLBT2SapX/etN8pIkv4X08gn2zEw6jYTYFjjL3qa++ZCEToTiSy5fkDO gXG7eNOQORDHIt0v7XX6fu/N/Jzqz/MuSFbi8uWZnAhSSg1ABbGPW7TPUMFLm/2Zc22n +CIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=paCoXi0bL/OuGQ6EkcUEdsajFGzPSAVf/un9mkkv9+M=; b=zYJnxRsinKm6V6MqMS0MFk4WfGEK7kIrwaIfbNllHj3oUB4mqVza1Yt+oQt+OoxYRV xLyCxWsXoznv1yt9su2+l35r6xsOkbM3q+N16S02rAoz4lMftfQXXGD4xwQlVKjMCDln JORhegt5CmG+FlFxVFEIzFxplpgxxQT42JRgh3w21w4tBQXT2zW4b7KQ9cSA8AmktzhO 6syAwNF8zwGahQD9p3Xy0HREGnyRWMXyHWIYJjWo5hie1srmvoVv4aLtZa3YluBr5dkK kbHKwRF0FtRHc3IY/BiEryD3LxaF9FABZFQvcp9miYEJ5Q97Yq1qhqSCLmXIM0QNLcZQ OBOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZUibmyb8; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 z11si9013217plo.291.2017.12.18.02.21.51; Mon, 18 Dec 2017 02:21:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=ZUibmyb8; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S932738AbdLRKVr (ORCPT + 11 others); Mon, 18 Dec 2017 05:21:47 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:43342 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932672AbdLRKVo (ORCPT ); Mon, 18 Dec 2017 05:21:44 -0500 Received: by mail-pf0-f195.google.com with SMTP id e3so9479737pfi.10 for ; Mon, 18 Dec 2017 02:21:44 -0800 (PST) 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 :in-reply-to:references; bh=paCoXi0bL/OuGQ6EkcUEdsajFGzPSAVf/un9mkkv9+M=; b=ZUibmyb85QrYLEikEFP9P5h3viVXJObX2DKpKOFFIGJdBZglxcoTUpq7TUPQ8wCCAP i+WJNUt0aaFrZ1ox/AUVriTEsZCD4I8cFSqnb4EanbwSRyI4/rzbKUyvxXAFfRzu+8AY OjxlWKTC8waDeTUu3SdOftfqQNgR0GrHvKciE= 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:in-reply-to:references; bh=paCoXi0bL/OuGQ6EkcUEdsajFGzPSAVf/un9mkkv9+M=; b=U+USPnSijzTdGXuDQRFoKyqmnz4RLFA1c/rfPrXqAOQaKlqQ1aYzs9yDFkPzvMqAR/ ZDGhIf6OltTjT3vgef6dUIAVMO7ozo3Kw3CprI0Qot4Kpn0igVr9IHF6eO2u1VfIpTcr 6YnveZKm1Y8zE6Y7cylX6mnK1t2fqnUy7Ca39Uf7Rk9adnRnd2VIi9IB4FJmnjAjmTns DlOdxZIpVZs61orv1e9RA6MFCwxTbXEnseXR4dgpnb9IpJXxdqMvoHrYmh9IYJnyvO2F HK/F+Np8Ai1AvP3uyb9RPxUQAr8ouvW7R1mEO4ud0hLQZDPayzX+nqd/L8K1X5z2y4bD OqKQ== X-Gm-Message-State: AKGB3mLVG1g0fsrgnK42gnqezUJp5YJ4CLWhEOKZEmkev2jkumVq0Dod kYGQOvUSLUXzZVbcR+N1eTL2Mg== X-Received: by 10.101.82.139 with SMTP id y11mr19706877pgp.109.1513592504368; Mon, 18 Dec 2017 02:21:44 -0800 (PST) Received: from localhost ([122.172.99.7]) by smtp.gmail.com with ESMTPSA id 75sm25672093pfo.103.2017.12.18.02.21.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 02:21:43 -0800 (PST) From: Viresh Kumar To: ulf.hansson@linaro.org, Kevin Hilman , robh+dt@kernel.org, Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , Rafael Wysocki , linux-pm@vger.kernel.org, Vincent Guittot , rnayak@codeaurora.org, sudeep.holla@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V8 3/3] OPP: Allow "opp-hz" and "opp-microvolt" to contain magic values Date: Mon, 18 Dec 2017 15:51:30 +0530 Message-Id: <476d7ae69184d787ccc6d99f8df6069007fd0a91.1513591822.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On some platforms the exact frequency or voltage may be hidden from the OS by the firmware. Allow such configurations to pass magic values in the "opp-hz" or the "opp-microvolt" properties, which should be interpreted in a platform dependent way. Reviewed-by: Ulf Hansson Signed-off-by: Viresh Kumar --- Documentation/devicetree/bindings/opp/opp.txt | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.15.0.194.g9af6a3dea062 diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index 4e4f30288c8b..00a3bdbd0f1f 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -167,6 +167,12 @@ properties. functioning of the current device at the current OPP (where this property is present). + +On some platforms the exact frequency or voltage may be hidden from the OS by +the firmware and the "opp-hz" or the "opp-microvolt" properties may contain +magic values that represent the frequency or voltage in a firmware dependent +way, for example an index of an array in the firmware. + Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. / {