diff mbox series

[OpenWrt-Devel] WDR4900v1 remove dt node for absent hw crypto.

Message ID 20180704130518.20896-2-tim@seoss.co.uk
State Accepted
Delegated to: Hauke Mehrtens
Headers show
Series [OpenWrt-Devel] WDR4900v1 remove dt node for absent hw crypto. | expand

Commit Message

Tim Small July 4, 2018, 1:05 p.m. UTC
The WDR4900v1 uses the P1040 SoC, so the device tree pulls in the
definition for the related P1010 SoC.  However, the P1040 lacks the
CAAM/SEC4 hardware crypto accelerator which the P1010 device tree
defines.  If left defined, this causes the CAAM drivers (if present) to
attempt to use the non-existent device, making various crypto-related
operations (e.g. macsec and ipsec) fail.

This commit overrides the incorrect dt node definition in the included
file.

See also:
 - https://bugs.openwrt.org/index.php?do=details&task_id=1262
 - https://community.nxp.com/thread/338432#comment-474107

Signed-off-by: Tim Small <tim@seoss.co.uk>
---
 .../files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Tim Small July 8, 2018, 2:22 p.m. UTC | #1
On 04/07/18 14:05, Tim Small wrote:
> The WDR4900v1 uses the P1040 SoC, so the device tree pulls in the
> definition for the related P1010 SoC.  However, the P1040 lacks the
> CAAM/SEC4 hardware crypto accelerator which the P1010 device tree
> defines.  If left defined, this causes the CAAM drivers (if present) to
> attempt to use the non-existent device, making various crypto-related
> operations (e.g. macsec and ipsec) fail.

 > + * The SVR value is reported by uboot on the serial console.
 > + */
 > +
 > +/ {
 > +	soc: soc@ffe00000 {
 > +		/delete-node/ crypto@30000; /* Pulled in by p1010si-post */
 > +	};
 > +};


FWIW, here is the equivalent code in the uboot tree:

http://git.denx.de/?p=u-boot.git;a=blob;f=arch/powerpc/cpu/mpc85xx/fdt.c;h=20ecca605ff0fb31bdb6d6f444a3536bffef4a2d;hb=HEAD#l597


Regards,

Tim.
diff mbox series

Patch

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index c2444936b7..bde5eb9575 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -236,3 +236,27 @@ 
 };
 
 /include/ "fsl/p1010si-post.dtsi"
+
+/*
+ * The TL-WDR4900 v1 uses the NXP (Freescale) P1014 SoC which is closely
+ * related to the P1010.
+ *
+ * NXP QP1010FS.pdf "QorIQ P1010 and P1014 Communications Processors"
+ * datasheet states that the P1014 does not include the accelerated crypto
+ * module (CAAM/SEC4) which is present in the P1010.
+ *
+ * NXP Appliation Note AN4938 Rev. 2 implies that some P1014 may contain the
+ * SEC4 module, but states that SoCs with System Version Register values
+ * 0x80F10110 or 0x80F10120 do not have the security feature.
+ *
+ * All v1.3 TL-WDR4900 tested have SVR == 0x80F10110 which AN4938 describes
+ * as: core rev 1.0, "P1014 (without security)".
+ *
+ * The SVR value is reported by uboot on the serial console.
+ */
+
+/ {
+	soc: soc@ffe00000 {
+		/delete-node/ crypto@30000; /* Pulled in by p1010si-post */
+	};
+};