2023-06-27 08:55:33

by Luca Weiss

[permalink] [raw]
Subject: [PATCH v5 0/5] Fix some issues in QCOM UFS bindings

This series aims to solve the dtbs_check errors from the qcom ufs
bindings. It has changed in scope a bit since v1, so it may be a bit all
over the place.

Please note, that I have not tested the sm8450.dtsi patch since I don't
have any hardware there. Testing would be appreciated.

Dt validation will fail without patch 1/5 from [0] so this depends on
that patch at least for the check.

[0] https://lore.kernel.org/linux-arm-msm/[email protected]/

Signed-off-by: Luca Weiss <[email protected]>
---
Changes in v5:
- Convert sm8450.dtsi to use qcom,ice property, so stop modifying schema
for sm8450 and only add qcom,ice property.
- Move reg-names names to top-level with only minItems/maxItems in the
'if'
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Pick up tags
- Rebase on linux-next (again)
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Drop applied patch
- Pick up sm6115 patch from v5 https://lore.kernel.org/all/[email protected]/
- Rebase on linux-next
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Add new patch adding reg-names to sm6115 & rebase series on top of sm6115
addition
- Fix binding example after sm8450 move, split this patch from original patch
since it became too big
- Move reg-names definition to top-level
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Iskren Chernev (1):
dt-bindings: ufs: qcom: Add sm6115 binding

Luca Weiss (4):
dt-bindings: ufs: qcom: Add reg-names property for ICE
dt-bindings: ufs: qcom: Add ICE to sm8450 example
dt-bindings: crypto: ice: Document sm8450 inline crypto engine
arm64: dts: qcom: sm8450: Use standalone ICE node for UFS

.../bindings/crypto/qcom,inline-crypto-engine.yaml | 1 +
.../devicetree/bindings/ufs/qcom,ufs.yaml | 44 ++++++++++++++++++++++
arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++-----
3 files changed, 58 insertions(+), 9 deletions(-)
---
base-commit: 13fb735ae68e5ac065b9867e2fd1d775c337ea15
change-id: 20221209-dt-binding-ufs-2d7f64797ff2

Best regards,
--
Luca Weiss <[email protected]>



2023-06-27 08:58:12

by Luca Weiss

[permalink] [raw]
Subject: [PATCH v5 2/5] dt-bindings: ufs: qcom: Add sm6115 binding

From: Iskren Chernev <[email protected]>

Add SM6115 UFS to DT schema.

Signed-off-by: Iskren Chernev <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Bhupesh Sharma <[email protected]>
Reviewed-by: Eric Biggers <[email protected]>
Reviewed-by: Iskren Chernev <[email protected]>
Signed-off-by: Luca Weiss <[email protected]>
---
.../devicetree/bindings/ufs/qcom,ufs.yaml | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index 4cc3f8f03b33..2b0831622cf0 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -29,6 +29,7 @@ properties:
- qcom,sa8775p-ufshc
- qcom,sc8280xp-ufshc
- qcom,sdm845-ufshc
+ - qcom,sm6115-ufshc
- qcom,sm6350-ufshc
- qcom,sm8150-ufshc
- qcom,sm8250-ufshc
@@ -204,6 +205,35 @@ allOf:
reg-names:
maxItems: 1

+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,sm6115-ufshc
+ then:
+ properties:
+ clocks:
+ minItems: 8
+ maxItems: 8
+ clock-names:
+ items:
+ - const: core_clk
+ - const: bus_aggr_clk
+ - const: iface_clk
+ - const: core_clk_unipro
+ - const: ref_clk
+ - const: tx_lane0_sync_clk
+ - const: rx_lane0_sync_clk
+ - const: ice_core_clk
+ reg:
+ minItems: 2
+ maxItems: 2
+ reg-names:
+ minItems: 2
+ required:
+ - reg-names
+
# TODO: define clock bindings for qcom,msm8994-ufshc

- if:

--
2.41.0


2023-06-27 08:58:18

by Luca Weiss

[permalink] [raw]
Subject: [PATCH v5 3/5] dt-bindings: ufs: qcom: Add ICE to sm8450 example

SM8450 actually supports ICE (Inline Crypto Engine) so adjust the
example to match.

Signed-off-by: Luca Weiss <[email protected]>
---
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index 2b0831622cf0..462ead5a1cec 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -317,5 +317,6 @@ examples:
<0 0>,
<0 0>,
<0 0>;
+ qcom,ice = <&ice>;
};
};

--
2.41.0


2023-06-27 09:01:16

by Luca Weiss

[permalink] [raw]
Subject: [PATCH v5 1/5] dt-bindings: ufs: qcom: Add reg-names property for ICE

The code in ufs-qcom-ice.c needs the ICE reg to be named "ice". Add this
in the bindings so the existing dts can validate successfully.

Signed-off-by: Luca Weiss <[email protected]>
---
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index bdfa86a0cc98..4cc3f8f03b33 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -79,6 +79,11 @@ properties:
minItems: 1
maxItems: 2

+ reg-names:
+ items:
+ - const: std
+ - const: ice
+
required-opps:
maxItems: 1

@@ -134,6 +139,8 @@ allOf:
reg:
minItems: 1
maxItems: 1
+ reg-names:
+ maxItems: 1

- if:
properties:
@@ -162,6 +169,10 @@ allOf:
reg:
minItems: 2
maxItems: 2
+ reg-names:
+ minItems: 2
+ required:
+ - reg-names

- if:
properties:
@@ -190,6 +201,8 @@ allOf:
reg:
minItems: 1
maxItems: 1
+ reg-names:
+ maxItems: 1

# TODO: define clock bindings for qcom,msm8994-ufshc


--
2.41.0


2023-06-27 10:18:19

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 3/5] dt-bindings: ufs: qcom: Add ICE to sm8450 example


On Tue, 27 Jun 2023 10:28:03 +0200, Luca Weiss wrote:
> SM8450 actually supports ICE (Inline Crypto Engine) so adjust the
> example to match.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 1 +
> 1 file changed, 1 insertion(+)
>

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/dt-review-ci/linux/Documentation/devicetree/bindings/ufs/qcom,ufs.example.dtb: ufs@1d84000: Unevaluated properties are not allowed ('qcom,ice' was unexpected)
from schema $id: http://devicetree.org/schemas/ufs/qcom,ufs.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


2023-06-27 11:12:08

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH v5 3/5] dt-bindings: ufs: qcom: Add ICE to sm8450 example

On Tue Jun 27, 2023 at 11:55 AM CEST, Rob Herring wrote:
>
> On Tue, 27 Jun 2023 10:28:03 +0200, Luca Weiss wrote:
> > SM8450 actually supports ICE (Inline Crypto Engine) so adjust the
> > example to match.
> >
> > Signed-off-by: Luca Weiss <[email protected]>
> > ---
> > Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 1 +
> > 1 file changed, 1 insertion(+)
> >
>
> 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/dt-review-ci/linux/Documentation/devicetree/bindings/ufs/qcom,ufs.example.dtb: ufs@1d84000: Unevaluated properties are not allowed ('qcom,ice' was unexpected)
> from schema $id: http://devicetree.org/schemas/ufs/qcom,ufs.yaml#

qcom,ice should land with v5.4

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=29a6d1215b7cd5fdff9c3c31ea26076a694ee0a3

And as mentioned in the cover letter, validation will still fail with
without the extra patch linked there (which is not in -next yet).

Regards
Luca

>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> 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 after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.


2023-06-27 12:10:16

by Luca Weiss

[permalink] [raw]
Subject: Re: [PATCH v5 3/5] dt-bindings: ufs: qcom: Add ICE to sm8450 example

On Tue Jun 27, 2023 at 12:07 PM CEST, Luca Weiss wrote:
> On Tue Jun 27, 2023 at 11:55 AM CEST, Rob Herring wrote:
> >
> > On Tue, 27 Jun 2023 10:28:03 +0200, Luca Weiss wrote:
> > > SM8450 actually supports ICE (Inline Crypto Engine) so adjust the
> > > example to match.
> > >
> > > Signed-off-by: Luca Weiss <[email protected]>
> > > ---
> > > Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> >
> > 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/dt-review-ci/linux/Documentation/devicetree/bindings/ufs/qcom,ufs.example.dtb: ufs@1d84000: Unevaluated properties are not allowed ('qcom,ice' was unexpected)
> > from schema $id: http://devicetree.org/schemas/ufs/qcom,ufs.yaml#
>
> qcom,ice should land with v5.4

Sorry, obviously wrong version: I meant v6.5

>
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=29a6d1215b7cd5fdff9c3c31ea26076a694ee0a3
>
> And as mentioned in the cover letter, validation will still fail with
> without the extra patch linked there (which is not in -next yet).
>
> Regards
> Luca
>
> >
> > doc reference errors (make refcheckdocs):
> >
> > See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
> >
> > The base for the series is generally the latest rc1. A different dependency
> > should be noted in *this* patch.
> >
> > 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 after running the above command yourself. Note
> > that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> > your schema. However, it must be unset to test all examples with your schema.


2023-06-27 13:52:52

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v5 1/5] dt-bindings: ufs: qcom: Add reg-names property for ICE

On 27/06/2023 10:28, Luca Weiss wrote:
> The code in ufs-qcom-ice.c needs the ICE reg to be named "ice". Add this
> in the bindings so the existing dts can validate successfully.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-06-27 14:29:23

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v5 3/5] dt-bindings: ufs: qcom: Add ICE to sm8450 example


On Tue, 27 Jun 2023 10:28:03 +0200, Luca Weiss wrote:
> SM8450 actually supports ICE (Inline Crypto Engine) so adjust the
> example to match.
>
> Signed-off-by: Luca Weiss <[email protected]>
> ---
> Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 1 +
> 1 file changed, 1 insertion(+)
>

Acked-by: Rob Herring <[email protected]>


2023-07-10 05:36:08

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH v5 0/5] Fix some issues in QCOM UFS bindings


On Tue, 27 Jun 2023 10:28:00 +0200, Luca Weiss wrote:
> This series aims to solve the dtbs_check errors from the qcom ufs
> bindings. It has changed in scope a bit since v1, so it may be a bit all
> over the place.
>
> Please note, that I have not tested the sm8450.dtsi patch since I don't
> have any hardware there. Testing would be appreciated.
>
> [...]

Applied, thanks!

[5/5] arm64: dts: qcom: sm8450: Use standalone ICE node for UFS
commit: 86b0aef435851dec9e5202d22dfbfff56da4440c

Best regards,
--
Bjorn Andersson <[email protected]>