[openwrt/openwrt] kernel: enable inside secure driver for MediaTek platforms

LEDE Commits lede-commits at lists.infradead.org
Sun Aug 28 12:42:15 PDT 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/06c4fc6d5e1eea00e6a3ea208102407408590af8

commit 06c4fc6d5e1eea00e6a3ea208102407408590af8
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu Aug 11 17:03:43 2022 +0200

    kernel: enable inside secure driver for MediaTek platforms
    
    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 at makrotopia.org>
---
 package/kernel/linux/modules/crypto.mk                               | 5 +++--
 .../mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi    | 2 +-
 target/linux/mediatek/filogic/target.mk                              | 2 +-
 target/linux/mediatek/mt7623/target.mk                               | 2 +-
 .../patches-5.15/150-dts-mt7623-eip97-inside-secure-support.patch    | 3 ++-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 72ed6ca2fd..a5b018aa1e 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -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
diff --git a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
index ae90c1092f..17adda1554 100644
--- a/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/target/linux/mediatek/files-5.15/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -196,7 +196,7 @@
 			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 at 11002000 {
diff --git a/target/linux/mediatek/filogic/target.mk b/target/linux/mediatek/filogic/target.mk
index 97fc71c57e..0c5bf4844e 100644
--- a/target/linux/mediatek/filogic/target.mk
+++ b/target/linux/mediatek/filogic/target.mk
@@ -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
diff --git a/target/linux/mediatek/mt7623/target.mk b/target/linux/mediatek/mt7623/target.mk
index cc5ff3f27d..1338b091e3 100644
--- a/target/linux/mediatek/mt7623/target.mk
+++ b/target/linux/mediatek/mt7623/target.mk
@@ -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.
diff --git a/target/linux/mediatek/patches-5.15/150-dts-mt7623-eip97-inside-secure-support.patch b/target/linux/mediatek/patches-5.15/150-dts-mt7623-eip97-inside-secure-support.patch
index a443404fff..5b63bf4226 100644
--- a/target/linux/mediatek/patches-5.15/150-dts-mt7623-eip97-inside-secure-support.patch
+++ b/target/linux/mediatek/patches-5.15/150-dts-mt7623-eip97-inside-secure-support.patch
@@ -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 at 1b240000 {
@@ -18,6 +18,7 @@
 -		clock-names = "cryp";
 -		power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
 -		status = "disabled";
++		status = "okay";
  	};
  
  	bdpsys: syscon at 1c000000 {




More information about the lede-commits mailing list