All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH 1/2] dt-bindings: arm,scmi: Do not use clocks for SCMI performance domains
Date: Tue, 20 Oct 2020 21:37:09 +0100	[thread overview]
Message-ID: <20201020203710.10100-1-sudeep.holla@arm.com> (raw)

Commit dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return
-EPROBE_DEFER") handles -EPROBE_DEFER for the clock/interconnects within
_allocate_opp_table() which is called from dev_pm_opp_add and it
now propagates the error back to the caller.

SCMI performance domain re-used clock bindings to keep it simple. However
with the above mentioned change, if clock property is present in a device
node, opps can't be added until clk_get succeeds. So in order to fix the
issue, we can register dummy clocks which is completely ugly.

Since there are no upstream users for the SCMI performance domain clock
bindings, let us introduce separate performance domain bindings for the
same.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 .../devicetree/bindings/arm/arm,scmi.txt      | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

Hi Rob/Viresh,

This is actually a fix for the regression I reported here[1].
I am not adding fixes tag as I am targeting in the same release and
also because it is not directly related.

Regards,
Sudeep

[1] https://lore.kernel.org/r/20201015180555.gacdzkofpibkdn2e@bogus

P.S.:/me records that this binding needs to be moved to yaml in v5.11

diff --git a/Documentation/devicetree/bindings/arm/arm,scmi.txt b/Documentation/devicetree/bindings/arm/arm,scmi.txt
index 55deb68230eb..0a6c1b495403 100644
--- a/Documentation/devicetree/bindings/arm/arm,scmi.txt
+++ b/Documentation/devicetree/bindings/arm/arm,scmi.txt
@@ -44,7 +44,7 @@ as described in the following sections. If the platform supports dedicated
 mboxes, mbox-names and shmem shall be present in the sub-node corresponding
 to that protocol.

-Clock/Performance bindings for the clocks/OPPs based on SCMI Message Protocol
+Clock bindings for the clocks based on SCMI Message Protocol
 ------------------------------------------------------------

 This binding uses the common clock binding[1].
@@ -52,6 +52,19 @@ This binding uses the common clock binding[1].
 Required properties:
 - #clock-cells : Should be 1. Contains the Clock ID value used by SCMI commands.

+Performance bindings for the OPPs based on SCMI Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- #perf-domain-cells: Should be 1. Contains the performance domain ID value
+		      used by SCMI commands.
+
+* Property arm,scmi-perf-domain
+
+Devices supporting SCMI performance domain must set their "arm,scmi-perf-domain"
+property with phandle to a SCMI performance domain controller followed by the
+performance domain.
+
 Power domain bindings for the power domains based on SCMI Message Protocol
 ------------------------------------------------------------

@@ -152,7 +165,7 @@ firmware {

 		scmi_dvfs: protocol@13 {
 			reg = <0x13>;
-			#clock-cells = <1>;
+			#perf-domain-cells = <1>;
 		};

 		scmi_clk: protocol@14 {
@@ -175,7 +188,7 @@ firmware {
 cpu@0 {
 	...
 	reg = <0 0>;
-	clocks = <&scmi_dvfs 0>;
+	arm,scmi-perf-domain = <&scmi_dvfs 0>;
 };

 hdlcd@7ff60000 {
--
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Sudeep Holla <sudeep.holla@arm.com>
Subject: [PATCH 1/2] dt-bindings: arm, scmi: Do not use clocks for SCMI performance domains
Date: Tue, 20 Oct 2020 21:37:09 +0100	[thread overview]
Message-ID: <20201020203710.10100-1-sudeep.holla@arm.com> (raw)

Commit dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return
-EPROBE_DEFER") handles -EPROBE_DEFER for the clock/interconnects within
_allocate_opp_table() which is called from dev_pm_opp_add and it
now propagates the error back to the caller.

SCMI performance domain re-used clock bindings to keep it simple. However
with the above mentioned change, if clock property is present in a device
node, opps can't be added until clk_get succeeds. So in order to fix the
issue, we can register dummy clocks which is completely ugly.

Since there are no upstream users for the SCMI performance domain clock
bindings, let us introduce separate performance domain bindings for the
same.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 .../devicetree/bindings/arm/arm,scmi.txt      | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

Hi Rob/Viresh,

This is actually a fix for the regression I reported here[1].
I am not adding fixes tag as I am targeting in the same release and
also because it is not directly related.

Regards,
Sudeep

[1] https://lore.kernel.org/r/20201015180555.gacdzkofpibkdn2e@bogus

P.S.:/me records that this binding needs to be moved to yaml in v5.11

diff --git a/Documentation/devicetree/bindings/arm/arm,scmi.txt b/Documentation/devicetree/bindings/arm/arm,scmi.txt
index 55deb68230eb..0a6c1b495403 100644
--- a/Documentation/devicetree/bindings/arm/arm,scmi.txt
+++ b/Documentation/devicetree/bindings/arm/arm,scmi.txt
@@ -44,7 +44,7 @@ as described in the following sections. If the platform supports dedicated
 mboxes, mbox-names and shmem shall be present in the sub-node corresponding
 to that protocol.

-Clock/Performance bindings for the clocks/OPPs based on SCMI Message Protocol
+Clock bindings for the clocks based on SCMI Message Protocol
 ------------------------------------------------------------

 This binding uses the common clock binding[1].
@@ -52,6 +52,19 @@ This binding uses the common clock binding[1].
 Required properties:
 - #clock-cells : Should be 1. Contains the Clock ID value used by SCMI commands.

+Performance bindings for the OPPs based on SCMI Message Protocol
+------------------------------------------------------------
+
+Required properties:
+- #perf-domain-cells: Should be 1. Contains the performance domain ID value
+		      used by SCMI commands.
+
+* Property arm,scmi-perf-domain
+
+Devices supporting SCMI performance domain must set their "arm,scmi-perf-domain"
+property with phandle to a SCMI performance domain controller followed by the
+performance domain.
+
 Power domain bindings for the power domains based on SCMI Message Protocol
 ------------------------------------------------------------

@@ -152,7 +165,7 @@ firmware {

 		scmi_dvfs: protocol@13 {
 			reg = <0x13>;
-			#clock-cells = <1>;
+			#perf-domain-cells = <1>;
 		};

 		scmi_clk: protocol@14 {
@@ -175,7 +188,7 @@ firmware {
 cpu@0 {
 	...
 	reg = <0 0>;
-	clocks = <&scmi_dvfs 0>;
+	arm,scmi-perf-domain = <&scmi_dvfs 0>;
 };

 hdlcd@7ff60000 {
--
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-10-20 20:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20 20:37 Sudeep Holla [this message]
2020-10-20 20:37 ` [PATCH 1/2] dt-bindings: arm, scmi: Do not use clocks for SCMI performance domains Sudeep Holla
2020-10-20 20:37 ` [PATCH 2/2] firmware: arm_scmi: Move away from clock devicetree bindings Sudeep Holla
2020-10-20 20:37   ` Sudeep Holla
2020-10-21 16:20 ` [PATCH 1/2] dt-bindings: arm,scmi: Do not use clocks for SCMI performance domains Rob Herring
2020-10-21 16:20   ` Rob Herring
2020-10-21 16:30   ` Sudeep Holla
2020-10-21 16:30     ` Sudeep Holla
2020-10-23 13:21     ` Rob Herring
2020-10-23 13:21       ` Rob Herring
2020-10-23 13:55       ` Sudeep Holla
2020-10-23 13:55         ` Sudeep Holla
2020-10-23 14:58       ` Sudeep Holla
2020-10-23 14:58         ` Sudeep Holla
2020-10-21 18:19   ` Sudeep Holla
2020-10-21 18:19     ` Sudeep Holla
2020-10-23 13:34     ` Rob Herring
2020-10-23 13:34       ` Rob Herring
2020-10-23 14:27       ` Sudeep Holla
2020-10-23 14:27         ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201020203710.10100-1-sudeep.holla@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.