Linux-ARM-Kernel Archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Remove power-domains property for devices with compatible ti,am62-sa3ul
@ 2023-06-19 13:28 Kamlesh Gurudasani
  2023-06-19 13:28 ` [PATCH v3 1/2] dt-bindings: crypto: ti,sa2ul: make power-domains conditional Kamlesh Gurudasani
  2023-06-19 13:28 ` [PATCH v3 2/2] arm64: dts: ti: k3-am62-main: Remove power-domains from crypto node Kamlesh Gurudasani
  0 siblings, 2 replies; 4+ messages in thread
From: Kamlesh Gurudasani @ 2023-06-19 13:28 UTC (permalink / raw
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jayesh Choudhary
  Cc: linux-arm-kernel, devicetree, linux-kernel, Kamlesh Gurudasani

SYSFW don't allow access to power of devices with compatible ti,am62-sa3ul
from main domain.

Power-domains property, if present will try to access the power of the
device, which will result into failure in probing of driver for that
device.

Make power-domains property as false for devices with compatible
ti,am62-sa3ul.

Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
---

Changes in v2:
-make commit message clearer

Changes in v3:
- Add patch dt-bindings: crypto: ti,sa2ul: make power-domains conditional
- Link to v2: https://lore.kernel.org/r/20230614-sa3ul-v2-1-3a832b82339c@ti.com

---
Kamlesh Gurudasani (2):
      dt-bindings: crypto: ti,sa2ul: make power-domains conditional
      arm64: dts: ti: k3-am62-main: Remove power-domains from crypto node

 Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml | 14 +++++++++++++-
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi               |  1 -
 2 files changed, 13 insertions(+), 2 deletions(-)
---
base-commit: 53ab6975c12d1ad86c599a8927e8c698b144d669
change-id: 20230614-sa3ul-cb4bd1bb4d08

Best regards,
-- 
Kamlesh Gurudasani <kamlesh@ti.com>


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

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

* [PATCH v3 1/2] dt-bindings: crypto: ti,sa2ul: make power-domains conditional
  2023-06-19 13:28 [PATCH v3 0/2] Remove power-domains property for devices with compatible ti,am62-sa3ul Kamlesh Gurudasani
@ 2023-06-19 13:28 ` Kamlesh Gurudasani
  2023-06-19 20:27   ` Conor Dooley
  2023-06-19 13:28 ` [PATCH v3 2/2] arm64: dts: ti: k3-am62-main: Remove power-domains from crypto node Kamlesh Gurudasani
  1 sibling, 1 reply; 4+ messages in thread
From: Kamlesh Gurudasani @ 2023-06-19 13:28 UTC (permalink / raw
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jayesh Choudhary
  Cc: linux-arm-kernel, devicetree, linux-kernel, Kamlesh Gurudasani

Devices specific to compatible ti,am62-sa3ul don't have control over
power of SA3UL from main domain.

"power-domains" property in crypto node tries to access
the SA3UL power, for which it gets NACK and hence, driver doesn't
probe properly for those particular devices.

Make "power-domains" property as false for devices with
compatible ti,am62-sa3ul.

Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
---
 Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
index 77ec8bc70bf7..88c8ee8821d4 100644
--- a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
+++ b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
@@ -66,10 +66,22 @@ patternProperties:
 required:
   - compatible
   - reg
-  - power-domains
   - dmas
   - dma-names
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          items:
+            const: ti,am62-sa3ul
+    then:
+      properties:
+        power-domains: false
+    else:
+      required:
+        - power-domains
+
 additionalProperties: false
 
 examples:

-- 
2.34.1


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

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

* [PATCH v3 2/2] arm64: dts: ti: k3-am62-main: Remove power-domains from crypto node
  2023-06-19 13:28 [PATCH v3 0/2] Remove power-domains property for devices with compatible ti,am62-sa3ul Kamlesh Gurudasani
  2023-06-19 13:28 ` [PATCH v3 1/2] dt-bindings: crypto: ti,sa2ul: make power-domains conditional Kamlesh Gurudasani
@ 2023-06-19 13:28 ` Kamlesh Gurudasani
  1 sibling, 0 replies; 4+ messages in thread
From: Kamlesh Gurudasani @ 2023-06-19 13:28 UTC (permalink / raw
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jayesh Choudhary
  Cc: linux-arm-kernel, devicetree, linux-kernel, Kamlesh Gurudasani

Only SYSFW has control of SA3UL power.
From SYSFW 08.04.00.002, for security reasons, device ID for power
management of SA3UL has been removed.

"power-domains" property in crypto node tries to access
the SA3UL, for which it gets NACK and hence, SA3UL driver doesn't
probe properly.

Fixes: 8af893654c02 ("arm64: dts: ti: k3-am62-main: Enable crypto accelerator")

Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
---
 arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index b3e4857bbbe4..18a6e9ffaf58 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -174,7 +174,6 @@ k3_reset: reset-controller {
 	crypto: crypto@40900000 {
 		compatible = "ti,am62-sa3ul";
 		reg = <0x00 0x40900000 0x00 0x1200>;
-		power-domains = <&k3_pds 70 TI_SCI_PD_SHARED>;
 		#address-cells = <2>;
 		#size-cells = <2>;
 		ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>;

-- 
2.34.1


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

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

* Re: [PATCH v3 1/2] dt-bindings: crypto: ti,sa2ul: make power-domains conditional
  2023-06-19 13:28 ` [PATCH v3 1/2] dt-bindings: crypto: ti,sa2ul: make power-domains conditional Kamlesh Gurudasani
@ 2023-06-19 20:27   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-06-19 20:27 UTC (permalink / raw
  To: Kamlesh Gurudasani
  Cc: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jayesh Choudhary,
	linux-arm-kernel, devicetree, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1568 bytes --]

On Mon, Jun 19, 2023 at 06:58:47PM +0530, Kamlesh Gurudasani wrote:
> Devices specific to compatible ti,am62-sa3ul don't have control over
> power of SA3UL from main domain.
> 
> "power-domains" property in crypto node tries to access
> the SA3UL power, for which it gets NACK and hence, driver doesn't
> probe properly for those particular devices.
> 
> Make "power-domains" property as false for devices with
> compatible ti,am62-sa3ul.
> 
> Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
> ---
>  Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> index 77ec8bc70bf7..88c8ee8821d4 100644
> --- a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> +++ b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml
> @@ -66,10 +66,22 @@ patternProperties:
>  required:
>    - compatible
>    - reg
> -  - power-domains
>    - dmas
>    - dma-names
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          items:

The usual pattern here is s/items/contains/. With that,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> +            const: ti,am62-sa3ul
> +    then:
> +      properties:
> +        power-domains: false
> +    else:
> +      required:
> +        - power-domains
> +
>  additionalProperties: false
>  
>  examples:
> 
> -- 
> 2.34.1
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

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

end of thread, other threads:[~2023-06-19 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19 13:28 [PATCH v3 0/2] Remove power-domains property for devices with compatible ti,am62-sa3ul Kamlesh Gurudasani
2023-06-19 13:28 ` [PATCH v3 1/2] dt-bindings: crypto: ti,sa2ul: make power-domains conditional Kamlesh Gurudasani
2023-06-19 20:27   ` Conor Dooley
2023-06-19 13:28 ` [PATCH v3 2/2] arm64: dts: ti: k3-am62-main: Remove power-domains from crypto node Kamlesh Gurudasani

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 read-only IMAP folder(s) and NNTP newsgroup(s).