diff --git a/package/lean/mtk-eip93/Makefile b/package/lean/mtk-eip93/Makefile new file mode 100644 index 0000000000..53a836c2b4 --- /dev/null +++ b/package/lean/mtk-eip93/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2006-2019 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=mtk-eip93 +PKG_RELEASE:=1.2 + +PKG_SOURCE_URL:=https://github.com/vschagen/mtk-eip93.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=ae6492aba2388de54afa52700fcc21c3a6e6f1ad + +MAKE_PATH:=src + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/crypto-hw-eip93 + SECTION:=kernel + CATEGORY:=Kernel modules + SUBMENU:=Cryptographic API modules + DEPENDS:= \ + @TARGET_ramips_mt7621 \ + +kmod-crypto-authenc \ + +kmod-crypto-des \ + +kmod-crypto-md5 \ + +kmod-crypto-sha1 \ + +kmod-crypto-sha256 \ + @LINUX_5_4 + KCONFIG:= + TITLE:=MTK EIP93 crypto module. + FILES:=$(PKG_BUILD_DIR)/src/crypto-hw-eip93.ko + AUTOLOAD:=$(call AutoProbe,crypto-hw-eip93) +endef + +define KernelPackage/crypto-hw-eip93/description +Kernel module to enable EIP-93 Crypto engine as found +in the Mediatek MT7621 SoC. +It enables DES/3DES/AES ECB/CBC/CTR and +IPSEC offload with authenc(hmac(sha1/sha256), aes/cbc/rfc3686) +endef + +MAKE_OPTS:= \ + $(KERNEL_MAKE_FLAGS) \ + M="$(PKG_BUILD_DIR)/src" + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + $(MAKE_OPTS) \ + modules +endef + +$(eval $(call KernelPackage,crypto-hw-eip93)) diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index f7984c1bb6..52b0f79c0a 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -442,6 +442,14 @@ clock-names = "nfi_clk"; }; + crypto@1e004000 { + compatible = "mediatek,mtk-eip93"; + reg = <0x1e004000 0x1000>; + + interrupt-parent = <&gic>; + interrupts = ; + }; + ethsys: syscon@1e000000 { compatible = "mediatek,mt7621-ethsys", "syscon";