Subject: [PATCH v2 1/6] dt-bindings: crypto: fsl-sec4: add snvs clock to pwrkey

From: André Draszik <[email-masked]>
Date: Tue, 25 Feb 2020 16:11:56 +0000

On i.MX7 and i.MX8M, the SNVS requires a clock. This is similar to the
clock bound to the SNVS RTC node, but if the SNVS RTC driver isn't
enabled, then SNVS doesn't work, and as such the pwrkey driver doesn't
work (i.e. hangs the kernel, as the clock isn't enabled).

Also see commit ec2a844ef7c1
("ARM: dts: imx7s: add snvs rtc clock")
for a similar fix.

Signed-off-by: André Draszik <[email-masked]>
Acked-by: Rob Herring <[email-masked]>
Cc: "Horia Geantă" <[email-masked]>
Cc: Aymen Sghaier <[email-masked]>
Cc: Herbert Xu <[email-masked]>
Cc: "David S. Miller" <[email-masked]>
Cc: Rob Herring <[email-masked]>
Cc: Mark Rutland <[email-masked]>
Cc: Shawn Guo <[email-masked]>
Cc: Sascha Hauer <[email-masked]>
Cc: Pengutronix Kernel Team <[email-masked]>
Cc: Fabio Estevam <[email-masked]>
Cc: NXP Linux Team <[email-masked]>
Cc: Dmitry Torokhov <[email-masked]>
Cc: Anson Huang <[email-masked]>
Cc: Robin Gong <[email-masked]>
Cc: [email-masked]
Cc: [email-masked]
Cc: [email-masked]
Cc: [email-masked]

---
v2:
* split documentation and i.MX7 dts update into two patches
* remove stray RTC references from documentation (copy/paste error)
---
 .../devicetree/bindings/crypto/fsl-sec4.txt     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
index 2fe245ca816a..a73722c58fab 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
@@ -449,6 +449,19 @@ System ON/OFF key driver
       Value type: <phandle>
       Definition: this is phandle to the register map node.
 
+   - clocks
+      Usage: optional, required if SNVS LP requires explicit
+          enablement of clocks
+      Value type: <prop_encoded-array>
+      Definition:  a clock specifier describing the clock required for
+          enabling and disabling SNVS LP.
+
+   - clock-names
+      Usage: optional, required if SNVS LP requires explicit
+          enablement of clocks
+      Value type: <string>
+      Definition: clock name string should be "snvs-pwrkey".
+
 EXAMPLE:
 	snvs-pwrkey@020cc000 {
 		compatible = "fsl,sec-v4.0-pwrkey";
@@ -456,6 +469,8 @@ EXAMPLE:
 		interrupts = <0 4 0x4>
 	        linux,keycode = <116>; /* KEY_POWER */
 		wakeup-source;
+		clocks = <&clks IMX7D_SNVS_CLK>;
+		clock-names = "snvs-pwrkey";
 	};
 
 =====================================================================
@@ -547,6 +562,8 @@ FULL EXAMPLE
 			interrupts = <0 4 0x4>;
 			linux,keycode = <116>; /* KEY_POWER */
 			wakeup-source;
+			clocks = <&clks IMX7D_SNVS_CLK>;
+			clock-names = "snvs-pwrkey";
 		};
 	};
 
-- 
2.23.0.rc1

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel