kernel: enable inside secure driver for MediaTek platforms
authorDaniel Golle <daniel@makrotopia.org>
Thu, 11 Aug 2022 15:03:43 +0000 (17:03 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 28 Aug 2022 19:33:15 +0000 (20:33 +0100)
Older MT7623 ARMv7 SoC as well as new Filogic platforms come with
inside-secure,safexcel-eip97 units. Enable them in DTS and select the
driver kernel module by default on those platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
package/kernel/linux/modules/crypto.mk
target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
target/linux/mediatek/filogic/target.mk
target/linux/mediatek/mt7623/target.mk
target/linux/mediatek/patches-5.15/150-dts-mt7623-eip97-inside-secure-support.patch

index 72ed6ca2fdf665d787aa1a2e13a87849fbc5b4f3..a5b018aa1e82b91a318d8cb819fa92139f91dd63 100644 (file)
@@ -407,8 +407,9 @@ $(eval $(call KernelPackage,crypto-hw-padlock))
 
 define KernelPackage/crypto-hw-safexcel
   TITLE:= MVEBU SafeXcel Crypto Engine module
-  DEPENDS:=@(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72) +eip197-mini-firmware \
-       +kmod-crypto-authenc +kmod-crypto-md5 +kmod-crypto-hmac +kmod-crypto-sha256 +kmod-crypto-sha512
+  DEPENDS:=@(TARGET_mvebu_cortexa53||TARGET_mvebu_cortexa72||TARGET_mediatek_filogic||TARGET_mediatek_mt7623) \
+       +eip197-mini-firmware +kmod-crypto-authenc +kmod-crypto-des +kmod-crypto-md5 +kmod-crypto-hmac \
+       +kmod-crypto-sha1 +kmod-crypto-sha256 +kmod-crypto-sha512
   KCONFIG:= \
        CONFIG_CRYPTO_HW=y \
        CONFIG_CRYPTO_DEV_SAFEXCEL
index ae90c1092ffaab2da9c6a94b76511bc1d79d2795..17adda15544ff1975a02b3650738de32ed338456 100644 (file)
                        clock-names = "infra_eip97_ck";
                        assigned-clocks = <&topckgen CLK_TOP_EIP_B_SEL>;
                        assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>;
-                       status = "disabled";
+                       status = "okay";
                };
 
                uart0: serial@11002000 {
index 97fc71c57e97aece2258c365bd7e5fc34db27516..0c5bf4844e6e6da4dd53eb00d0773a2560e646bb 100644 (file)
@@ -2,7 +2,7 @@ ARCH:=aarch64
 SUBTARGET:=filogic
 BOARDNAME:=Filogic 830 (MT7986)
 CPU_TYPE:=cortex-a53
-DEFAULT_PACKAGES += kmod-mt7915e kmod-mt7986-firmware wpad-basic-wolfssl uboot-envtools
+DEFAULT_PACKAGES += kmod-crypto-hw-safexcel kmod-mt7915e kmod-mt7986-firmware wpad-basic-wolfssl uboot-envtools
 KERNELNAME:=Image dtbs
 
 define Target/Description
index cc5ff3f27d1c54e8b2c9525517b7420e98b4fa94..1338b091e376f7e7e9844f1e6ac3fc469782cd67 100644 (file)
@@ -9,7 +9,7 @@ CPU_TYPE:=cortex-a7
 CPU_SUBTYPE:=neon-vfpv4
 KERNELNAME:=Image dtbs zImage
 FEATURES+=display usbgadget
-DEFAULT_PACKAGES+=uboot-envtools
+DEFAULT_PACKAGES+=kmod-crypto-hw-safexcel uboot-envtools
 
 define Target/Description
        Build firmware images for MediaTek mt7623 ARM based boards.
index a443404fff26be21a5020c3d598304e5cae582a9..5b63bf4226b0a68b890fa8afb5a4e53584e8a7c6 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/arm/boot/dts/mt7623.dtsi
 +++ b/arch/arm/boot/dts/mt7623.dtsi
-@@ -951,17 +951,14 @@
+@@ -951,17 +951,15 @@
        };
  
        crypto: crypto@1b240000 {
@@ -18,6 +18,7 @@
 -              clock-names = "cryp";
 -              power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
 -              status = "disabled";
++              status = "okay";
        };
  
        bdpsys: syscon@1c000000 {