devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Two apcs-kpss-global.yaml fixes
@ 2022-07-17 21:36 Bryan O'Donoghue
  2022-07-17 21:36 ` [PATCH v3 1/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for relevant entries Bryan O'Donoghue
  2022-07-17 21:36 ` [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names Bryan O'Donoghue
  0 siblings, 2 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2022-07-17 21:36 UTC (permalink / raw)
  To: agross, bjorn.andersson, konrad.dybcio, jassisinghbrar, robh+dt,
	krzysztof.kozlowski+dt
  Cc: linux-arm-msm, devicetree, shawn.guo, bryan.odonoghue

V3:
- Include Rob and Krz Reviewed-by for patch #1
- Defines maxItems 1 for the clock-output-name
  I missed this error in the dtb check for V2.

V2:
- Fixes example which threw an error in v1 - Rob's bot
- Updates the patch prefix - Krzysztof
- Fixes broken non-DT schema syntax clock-output-name - Krzysztof

V1:
Adding in msm8939.dtsi and running the binding checks is throwing up two
errors for me.

In the first instance we use syscon on the 8939 and should declare it in
the compat list. Doing a quick grep it looks like that fix should be
applied to a number of existing declarations too.

In the second instance we just need to document clock-output-names for the
a53 mux PLL.

Bryan O'Donoghue (2):
  dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for
    relevant entries
  dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names

 .../mailbox/qcom,apcs-kpss-global.yaml        | 53 +++++++++++--------
 1 file changed, 32 insertions(+), 21 deletions(-)

-- 
2.36.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 1/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for relevant entries
  2022-07-17 21:36 [PATCH v3 0/2] Two apcs-kpss-global.yaml fixes Bryan O'Donoghue
@ 2022-07-17 21:36 ` Bryan O'Donoghue
  2022-07-17 21:36 ` [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names Bryan O'Donoghue
  1 sibling, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2022-07-17 21:36 UTC (permalink / raw)
  To: agross, bjorn.andersson, konrad.dybcio, jassisinghbrar, robh+dt,
	krzysztof.kozlowski+dt
  Cc: linux-arm-msm, devicetree, shawn.guo, bryan.odonoghue,
	Rob Herring, Krzysztof Kozlowski

msm8916, msm8939, msm8953, msm8994 and qcs404 already declare or should
declare syscon as they have drivers that use syscon inside of the apcs-kpss
block.

grep apcs arch/arm64/boot/dts/qcom/* | grep syscon

Add in the additional syscon in the documentation for the above mentioned
parts.

Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../mailbox/qcom,apcs-kpss-global.yaml        | 46 ++++++++++---------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
index 3b5ba7ecc19d9..f504652fc0ea2 100644
--- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
+++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
@@ -15,26 +15,30 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - qcom,ipq6018-apcs-apps-global
-      - qcom,ipq8074-apcs-apps-global
-      - qcom,msm8916-apcs-kpss-global
-      - qcom,msm8939-apcs-kpss-global
-      - qcom,msm8953-apcs-kpss-global
-      - qcom,msm8976-apcs-kpss-global
-      - qcom,msm8994-apcs-kpss-global
-      - qcom,msm8996-apcs-hmss-global
-      - qcom,msm8998-apcs-hmss-global
-      - qcom,qcm2290-apcs-hmss-global
-      - qcom,qcs404-apcs-apps-global
-      - qcom,sc7180-apss-shared
-      - qcom,sc8180x-apss-shared
-      - qcom,sdm660-apcs-hmss-global
-      - qcom,sdm845-apss-shared
-      - qcom,sm6125-apcs-hmss-global
-      - qcom,sm6115-apcs-hmss-global
-      - qcom,sm8150-apss-shared
-
+    oneOf:
+      - items:
+          - enum:
+              - qcom,ipq6018-apcs-apps-global
+              - qcom,ipq8074-apcs-apps-global
+              - qcom,msm8976-apcs-kpss-global
+              - qcom,msm8996-apcs-hmss-global
+              - qcom,msm8998-apcs-hmss-global
+              - qcom,qcm2290-apcs-hmss-global
+              - qcom,sc7180-apss-shared
+              - qcom,sc8180x-apss-shared
+              - qcom,sdm660-apcs-hmss-global
+              - qcom,sdm845-apss-shared
+              - qcom,sm6125-apcs-hmss-global
+              - qcom,sm6115-apcs-hmss-global
+              - qcom,sm8150-apss-shared
+      - items:
+          - enum:
+              - qcom,msm8916-apcs-kpss-global
+              - qcom,msm8939-apcs-kpss-global
+              - qcom,msm8953-apcs-kpss-global
+              - qcom,msm8994-apcs-kpss-global
+              - qcom,qcs404-apcs-apps-global
+          - const: syscon
   reg:
     maxItems: 1
 
@@ -121,7 +125,7 @@ examples:
     #define GCC_APSS_AHB_CLK_SRC  1
     #define GCC_GPLL0_AO_OUT_MAIN 123
     apcs: mailbox@b011000 {
-        compatible = "qcom,qcs404-apcs-apps-global";
+        compatible = "qcom,qcs404-apcs-apps-global", "syscon";
         reg = <0x0b011000 0x1000>;
         #mbox-cells = <1>;
         clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names
  2022-07-17 21:36 [PATCH v3 0/2] Two apcs-kpss-global.yaml fixes Bryan O'Donoghue
  2022-07-17 21:36 ` [PATCH v3 1/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for relevant entries Bryan O'Donoghue
@ 2022-07-17 21:36 ` Bryan O'Donoghue
  2022-07-18  1:43   ` Rob Herring
  2022-07-18 10:33   ` Dmitry Baryshkov
  1 sibling, 2 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2022-07-17 21:36 UTC (permalink / raw)
  To: agross, bjorn.andersson, konrad.dybcio, jassisinghbrar, robh+dt,
	krzysztof.kozlowski+dt
  Cc: linux-arm-msm, devicetree, shawn.guo, bryan.odonoghue

Add clock-output-names as optional so that SoCs such as the msm8939 which
have multiple a53 PLLs can latch the appropriate output name in
drivers/clk/qcom/apcs-msm8916.c.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
index f504652fc0ea2..7497e4c930ae7 100644
--- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
+++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
@@ -63,6 +63,13 @@ properties:
       - const: aux
       - const: ref
 
+  clock-output-names:
+    maxItems: 1
+    items:
+      - const: a53mux_c0
+      - const: a53mux_c1
+      - const: a53mux_cci
+
 required:
   - compatible
   - reg
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names
  2022-07-17 21:36 ` [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names Bryan O'Donoghue
@ 2022-07-18  1:43   ` Rob Herring
  2022-07-18 10:33   ` Dmitry Baryshkov
  1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2022-07-18  1:43 UTC (permalink / raw)
  To: Bryan O'Donoghue
  Cc: robh+dt, krzysztof.kozlowski+dt, konrad.dybcio, linux-arm-msm,
	shawn.guo, jassisinghbrar, bjorn.andersson, agross, devicetree

On Sun, 17 Jul 2022 22:36:45 +0100, Bryan O'Donoghue wrote:
> Add clock-output-names as optional so that SoCs such as the msm8939 which
> have multiple a53 PLLs can latch the appropriate output name in
> drivers/clk/qcom/apcs-msm8916.c.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml: properties:clock-output-names: {'maxItems': 1, 'items': [{'const': 'a53mux_c0'}, {'const': 'a53mux_c1'}, {'const': 'a53mux_cci'}]} should not be valid under {'required': ['maxItems']}
	hint: "maxItems" is not needed with an "items" list
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml: ignoring, error in schema: properties: clock-output-names

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names
  2022-07-17 21:36 ` [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names Bryan O'Donoghue
  2022-07-18  1:43   ` Rob Herring
@ 2022-07-18 10:33   ` Dmitry Baryshkov
  2022-07-18 11:04     ` Bryan O'Donoghue
  1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-07-18 10:33 UTC (permalink / raw)
  To: Bryan O'Donoghue
  Cc: agross, bjorn.andersson, konrad.dybcio, jassisinghbrar, robh+dt,
	krzysztof.kozlowski+dt, linux-arm-msm, devicetree, shawn.guo

On Mon, 18 Jul 2022 at 00:37, Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
>
> Add clock-output-names as optional so that SoCs such as the msm8939 which
> have multiple a53 PLLs can latch the appropriate output name in
> drivers/clk/qcom/apcs-msm8916.c.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> index f504652fc0ea2..7497e4c930ae7 100644
> --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
> @@ -63,6 +63,13 @@ properties:
>        - const: aux
>        - const: ref
>
> +  clock-output-names:
> +    maxItems: 1
> +    items:
> +      - const: a53mux_c0
> +      - const: a53mux_c1
> +      - const: a53mux_cci

You have probably meant to use enum here. However, is there any reason
why you would like to use fixed output names here? You are going to
use clocks DT properties (with clock-names or using indices) anyway,
so there is no dependency on system clock name.
Compare this with apcs-msm8916.c, which uses a53mux@unit_address.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names
  2022-07-18 10:33   ` Dmitry Baryshkov
@ 2022-07-18 11:04     ` Bryan O'Donoghue
  0 siblings, 0 replies; 6+ messages in thread
From: Bryan O'Donoghue @ 2022-07-18 11:04 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: agross, bjorn.andersson, konrad.dybcio, jassisinghbrar, robh+dt,
	krzysztof.kozlowski+dt, linux-arm-msm, devicetree, shawn.guo

On 18/07/2022 11:33, Dmitry Baryshkov wrote:
> On Mon, 18 Jul 2022 at 00:37, Bryan O'Donoghue
> <bryan.odonoghue@linaro.org> wrote:
>>
>> Add clock-output-names as optional so that SoCs such as the msm8939 which
>> have multiple a53 PLLs can latch the appropriate output name in
>> drivers/clk/qcom/apcs-msm8916.c.
>>
>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>> ---
>>   .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
>> index f504652fc0ea2..7497e4c930ae7 100644
>> --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
>> +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml
>> @@ -63,6 +63,13 @@ properties:
>>         - const: aux
>>         - const: ref
>>
>> +  clock-output-names:
>> +    maxItems: 1
>> +    items:
>> +      - const: a53mux_c0
>> +      - const: a53mux_c1
>> +      - const: a53mux_cci
> 
> You have probably meant to use enum here.

I do mean enum ...

  However, is there any reason
> why you would like to use fixed output names here? You are going to
> use clocks DT properties (with clock-names or using indices) anyway,
> so there is no dependency on system clock name.
> Compare this with apcs-msm8916.c, which uses a53mux@unit_address.
> 

The answer is because I have this in the dtsi forwarded ported from 4.19 
and like an idiot I didn't check the clock names

a53pll@b016000
a53pll@b116000
a53pll@b1d0000

a53mux@b1d1000
a53mux@b011000
a53mux@b111000

you're right this is old/dead code I don't need it.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-18 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-17 21:36 [PATCH v3 0/2] Two apcs-kpss-global.yaml fixes Bryan O'Donoghue
2022-07-17 21:36 ` [PATCH v3 1/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add syscon const for relevant entries Bryan O'Donoghue
2022-07-17 21:36 ` [PATCH v3 2/2] dt-bindings: mailbox: qcom,apcs-kpss-global: Add clock-output-names Bryan O'Donoghue
2022-07-18  1:43   ` Rob Herring
2022-07-18 10:33   ` Dmitry Baryshkov
2022-07-18 11:04     ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).