diff mbox series

[4/6] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8974

Message ID 20220712124421.3129206-5-stephan.gerhold@kernkonzept.com (mailing list archive)
State Superseded
Headers show
Series remoteproc: qcom_q6v5_mss: Add MSM8909 | expand

Commit Message

Stephan Gerhold July 12, 2022, 12:44 p.m. UTC
The "qcom,msm8974-mss-pil" binding is still similar enough to MSM8916
to be covered by the same DT schema. The only difference is the
additional "mss-supply", which can be easily handled using a single
if statement.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
---
Note: I generated this patch on top of Sibi's series [1] to avoid
conflicts later (I expect it will be picked up first).

[1]: https://lore.kernel.org/linux-arm-msm/1657020721-24939-1-git-send-email-quic_sibis@quicinc.com/
---
 .../remoteproc/qcom,msm8916-mss-pil.yaml         | 16 ++++++++++++++++
 .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)

Comments

Krzysztof Kozlowski July 14, 2022, 9:56 a.m. UTC | #1
On 12/07/2022 14:44, Stephan Gerhold wrote:
> The "qcom,msm8974-mss-pil" binding is still similar enough to MSM8916
> to be covered by the same DT schema. The only difference is the
> additional "mss-supply", which can be easily handled using a single
> if statement.
> 
> Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
> ---
> Note: I generated this patch on top of Sibi's series [1] to avoid
> conflicts later (I expect it will be picked up first).
> 
> [1]: https://lore.kernel.org/linux-arm-msm/1657020721-24939-1-git-send-email-quic_sibis@quicinc.com/
> ---
>  .../remoteproc/qcom,msm8916-mss-pil.yaml         | 16 ++++++++++++++++
>  .../devicetree/bindings/remoteproc/qcom,q6v5.txt | 16 ----------------
>  2 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
> index 3968348dc982..ca7146551ba9 100644
> --- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
> @@ -18,6 +18,7 @@ properties:
>      oneOf:
>        - enum:
>            - qcom,msm8916-mss-pil
> +          - qcom,msm8974-mss-pil
>  
>        - const: qcom,q6v5-pil
>          description: Deprecated, prefer using qcom,msm8916-mss-pil
> @@ -76,6 +77,9 @@ properties:
>    pll-supply:
>      description: PLL proxy supply (control handed over after startup)
>  
> +  mss-supply:
> +    description: MSS power domain supply (only valid for qcom,msm8974-mss-pil)
> +
>    resets:
>      items:
>        - description: MSS restart control
> @@ -177,6 +181,18 @@ required:
>    - qcom,smem-state-names
>    - smd-edge
>  
> +# mss-supply is only valid (and required) for MSM8974
> +if:

Put it under allOf. This makes it prepared for growing.

> +  properties:
> +    compatible:
> +      const: qcom,msm8974-mss-pil
> +then:
> +  required:
> +    - mss-supply
> +else:
> +  properties:
> +    mss-supply: false
> +

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
index 3968348dc982..ca7146551ba9 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,msm8916-mss-pil.yaml
@@ -18,6 +18,7 @@  properties:
     oneOf:
       - enum:
           - qcom,msm8916-mss-pil
+          - qcom,msm8974-mss-pil
 
       - const: qcom,q6v5-pil
         description: Deprecated, prefer using qcom,msm8916-mss-pil
@@ -76,6 +77,9 @@  properties:
   pll-supply:
     description: PLL proxy supply (control handed over after startup)
 
+  mss-supply:
+    description: MSS power domain supply (only valid for qcom,msm8974-mss-pil)
+
   resets:
     items:
       - description: MSS restart control
@@ -177,6 +181,18 @@  required:
   - qcom,smem-state-names
   - smd-edge
 
+# mss-supply is only valid (and required) for MSM8974
+if:
+  properties:
+    compatible:
+      const: qcom,msm8974-mss-pil
+then:
+  required:
+    - mss-supply
+else:
+  properties:
+    mss-supply: false
+
 # Fallbacks for deprecated properties
 allOf:
   - oneOf:
diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
index 3beb01da134b..9366ef087209 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,q6v5.txt
@@ -9,7 +9,6 @@  on the Qualcomm Hexagon core.
 	Definition: must be one of:
 		    "qcom,ipq8074-wcss-pil"
 		    "qcom,qcs404-wcss-pil"
-		    "qcom,msm8974-mss-pil"
 		    "qcom,msm8996-mss-pil"
 		    "qcom,msm8998-mss-pil"
 		    "qcom,sdm845-mss-pil"
@@ -37,7 +36,6 @@  on the Qualcomm Hexagon core.
 		    string:
 	qcom,ipq8074-wcss-pil:
 	qcom,qcs404-wcss-pil:
-	qcom,msm8974-mss-pil:
 		    must be "wdog", "fatal", "ready", "handover", "stop-ack"
 	qcom,msm8996-mss-pil:
 	qcom,msm8998-mss-pil:
@@ -68,8 +66,6 @@  on the Qualcomm Hexagon core.
 		    "gcc_axim_cbcr", "lcc_ahbfabric_cbc", "tcsr_lcc_cbc",
 		    "lcc_abhs_cbc", "lcc_tcm_slave_cbc", "lcc_abhm_cbc",
 		    "lcc_axim_cbc", "lcc_bcr_sleep"
-	qcom,msm8974-mss-pil:
-		    must be "iface", "bus", "mem", "xo"
 	qcom,msm8996-mss-pil:
 		    must be "iface", "bus", "mem", "xo", "gpll0_mss",
 		    "snoc_axi", "mnoc_axi", "pnoc", "qdss"
@@ -106,17 +102,6 @@  should be referenced as follows:
 	Definition: reference to the reserved-memory for the mba region followed
 		    by the mpss region
 
-For the compatible string below the following supplies are required:
-  "qcom,msm8974-mss-pil"
-- cx-supply: (deprecated, use power domain instead)
-- mss-supply:
-- mx-supply: (deprecated, use power domain instead)
-- pll-supply:
-	Usage: required
-	Value type: <phandle>
-	Definition: reference to the regulators to be held on behalf of the
-		    booting of the Hexagon core
-
 For the compatible string below the following supplies are required:
   "qcom,qcs404-wcss-pil"
 - cx-supply:
@@ -144,7 +129,6 @@  For the compatible string below the following supplies are required:
 	Definition: The power-domains needed depend on the compatible string:
 	qcom,ipq8074-wcss-pil:
 		    no power-domain names required
-	qcom,msm8974-mss-pil:
 	qcom,msm8996-mss-pil:
 	qcom,msm8998-mss-pil:
 		    must be "cx", "mx"