Re: [PATCH v2 3/3] tpm: Add a driver for Loongson TPM device

2025-02-13 Thread Qunqin Zhao
在 2025/2/14 上午6:10, Jarkko Sakkinen 写道: for it. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- MAINTAINERS | 1 + drivers/char/tpm/Kconfig| 9 drivers/char/tpm/Makefile | 1 + drivers/char/tpm/tpm_lsse.c

Re: [PATCH v2 3/3] tpm: Add a driver for Loongson TPM device

2025-02-12 Thread Qunqin Zhao
在 2025/2/13 上午5:28, Jarkko Sakkinen 写道: On Wed, Feb 12, 2025 at 11:31:13AM +0800, Qunqin Zhao wrote: TPM2.0 is implemented in Loongson security engine. This is the driver TPM 2.0 or just TPM2 (either is fine with me). Quick reminder what Loongson security engine (I could not know that and it

[PATCH v2 3/3] tpm: Add a driver for Loongson TPM device

2025-02-11 Thread Qunqin Zhao
TPM2.0 is implemented in Loongson security engine. This is the driver for it. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- MAINTAINERS | 1 + drivers/char/tpm/Kconfig| 9 drivers/char/tpm/Makefile | 1 + drivers/char

[PATCH v2 1/3] mfd: Add support for Loongson Security Module

2025-02-11 Thread Qunqin Zhao
This driver supports Loongson Security Module, which provides the control for it's hardware encryption acceleration child devices. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v2: Removed "ls6000se-sdf" device, added "ls6000se-tpm

[PATCH v2 0/3] Drivers for Loongson security engine

2025-02-11 Thread Qunqin Zhao
Loongson security engine supports random number generation, hash, symmetric encryption and asymmetric encryption. Based on these encryption functions, TPM2.0 have been implemented in it. mfd is the baser driver, crypto and tpm are users. v2: Removed misc driver. Added tpm driver. Qunqin Zhao (3

[PATCH v2 2/3] crypto: loongson - add Loongson RNG driver support

2025-02-11 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson 6000SE. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v2: None MAINTAINERS| 6 + drivers/crypto/Kconfig | 1 + drivers/crypto/Mak

[PATCH v6 1/6] mfd: Add support for Loongson Security Module

2025-03-26 Thread Qunqin Zhao
This driver supports Loongson Security Module, which provides the control for it's hardware encryption acceleration child devices. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v6: Replace all "ls6000se" with "loongson" v5:

[PATCH v6 4/6] MAINTAINERS: Add entry for Loongson RNG driver

2025-03-26 Thread Qunqin Zhao
This patch adds an entry for Loongson RNG driver in the list of maintainers. Signed-off-by: Qunqin Zhao --- v5-v6: None v4: Changed tile to "Add entry for ...". Lowcased "Maintainers" in commit message. MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff -

[PATCH v6 5/6] tpm: Add a driver for Loongson TPM device

2025-03-26 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v6: Replace all "ls6000se" with "loongson" Prefix all with tpm_loongson instead of tpm_lsse. Removed Jarkko's tag cause there ar

[PATCH v6 3/6] crypto: loongson - add Loongson RNG driver support

2025-03-26 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson security engine. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v6: Replace all "ls6000se" with "loongson" v2-v5: None drivers/crypto/Kconfig | 1 +

[PATCH v6 2/6] MAINTAINERS: Add entry for Loongson Security Module driver

2025-03-26 Thread Qunqin Zhao
This patch adds an entry for Loongson Security Module driver in the list of maintainers. Signed-off-by: Qunqin Zhao --- v6: "ls6000se.c" --> "loongson_se.c" "ls6000se.h" --> "loongson_se.h" v5: None v4: Changed tile to "Add entry for

[PATCH v6 6/6] MAINTAINERS: Add tpm_loongson.c to LOONGSON CRYPTO DRIVER entry

2025-03-26 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao --- v6: "tpm_lsse.c" -> "tpm_loongson" v4-v5: None MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS ind

[PATCH v5 3/6] crypto: loongson - add Loongson RNG driver support

2025-03-15 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson 6000SE. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v2-v5: None drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile| 1 + drivers/crypto/loo

Re: [PATCH v7 1/6] mfd: Add support for Loongson Security Module

2025-04-07 Thread Qunqin Zhao
Hi, Lee 在 2025/4/5 上午12:06, Lee Jones 写道: On Thu, 03 Apr 2025, Qunqin Zhao wrote: This driver supports Loongson Security Module, which provides the control for it's hardware encryption acceleration child devices. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-o

[PATCH v8 2/5] crypto: loongson - add Loongson RNG driver support

2025-04-18 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson Security Engine chip. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v8: Added reseed callbak. "lsrng" --> "loongson_rng". v7: Change the ls

[PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-18 Thread Qunqin Zhao
_LOONGSON_RNG, ls6000se-rng.c ->loongson-rng.c tpm: TCG_LSSE -> TCG_LOONGSON, tpm_lsse.c ->tpm_loongson.c v5: Registered "ls6000se-rng" device in mfd driver. v4: Please look at changelog in tpm and MAINTAINERS. No changes to mfd and crypto. v3: Put the updates to the MAINT

[PATCH v8 5/5] MAINTAINERS: Add tpm_loongson.c to LOONGSON CRYPTO DRIVER entry

2025-04-18 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Jarkko Sakkinen Reviewed-by: Huacai Chen --- v8: None v7: Added tag from Jarkko and Huacai v6: "tpm_lsse.c" -> "tpm_loongson" v4-v5:

[PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-18 Thread Qunqin Zhao
_LOONGSON_RNG, ls6000se-rng.c ->loongson-rng.c tpm: TCG_LSSE -> TCG_LOONGSON, tpm_lsse.c ->tpm_loongson.c v5: Registered "ls6000se-rng" device in mfd driver. v4: Please look at changelog in tpm and MAINTAINERS. No changes to mfd and crypto. v3: Put the updates to the MAINT

[PATCH v8 4/5] tpm: Add a driver for Loongson TPM device

2025-04-18 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v8: In the send callback, it will wait until the TPM2 command is completed. So do not need to wait in the recv callback. Removed

[PATCH v8 1/5] crypto: loongson - Add Loongson Security Engine chip controller driver

2025-04-18 Thread Qunqin Zhao
Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. This is the base driver for other specific engine drivers. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v8: As explained in the cover letter

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Qunqin Zhao
在 2025/4/30 下午4:18, Herbert Xu 写道: On Wed, Apr 30, 2025 at 04:14:40PM +0800, Qunqin Zhao wrote: Sorry to bother you, may i ask is it fine to move  the Security Engine base driver[Patch v8 1/5] to drivers/crypto ? The base driver uses MFD  interface  to register child device(tpm, rng) , as

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Qunqin Zhao
在 2025/4/20 下午3:17, Huacai Chen 写道: Hi, Qunqin, On Fri, Apr 18, 2025 at 5:33 PM Qunqin Zhao wrote: The Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. Each engine have its own DMA buffer provided by the controller. The kernel cannot directly send commands

Re: [PATCH v8 4/5] tpm: Add a driver for Loongson TPM device

2025-04-30 Thread Qunqin Zhao
在 2025/4/22 上午2:58, Jarkko Sakkinen 写道: On Fri, Apr 18, 2025 at 05:34:06PM +0800, Qunqin Zhao wrote: Loongson Security Engine supports random number generation, hash, symmetric encryption and asymmetric encryption. Based on these encryption functions, TPM2 have been implemented in the

Re: [PATCH v8 0/5] Add Loongson Security Engine chip driver

2025-04-30 Thread Qunqin Zhao
在 2025/4/30 下午4:58, Lee Jones 写道: On Wed, 30 Apr 2025, Huacai Chen wrote: On Wed, Apr 30, 2025 at 4:47 PM Qunqin Zhao wrote: 在 2025/4/30 下午4:18, Herbert Xu 写道: On Wed, Apr 30, 2025 at 04:14:40PM +0800, Qunqin Zhao wrote: Sorry to bother you, may i ask is it fine to move the Security

Re: [PATCH v7 3/6] crypto: loongson - add Loongson RNG driver support

2025-04-10 Thread Qunqin Zhao
在 2025/4/6 下午5:05, Huacai Chen 写道: Hi, Qunqin, On Thu, Apr 3, 2025 at 10:46 AM Qunqin Zhao wrote: Loongson's Random Number Generator is found inside Loongson security engine. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai

Re: [PATCH v7 3/6] crypto: loongson - add Loongson RNG driver support

2025-04-10 Thread Qunqin Zhao
在 2025/4/7 下午12:04, Herbert Xu 写道: On Thu, Apr 03, 2025 at 10:46:42AM +0800, Qunqin Zhao wrote: Loongson's Random Number Generator is found inside Loongson security engine. Is this a hardware RNG or a pseudo RNG? If it's pseudo, it should provide a means of reseeding. Will provi

[PATCH v9 0/5] Add Loongson Security Engine chip driver

2025-05-06 Thread Qunqin Zhao
s6000se.c -> loongson-se.c crypto :CRYPTO_DEV_LS6000SE_RNG -> CRYPTO_DEV_LOONGSON_RNG, ls6000se-rng.c ->loongson-rng.c tpm: TCG_LSSE -> TCG_LOONGSON, tpm_lsse.c ->tpm_loongson.c v5: Registered "ls6000se-rng" device in mfd driver Qunqin Zhao (5): mfd: Add support for Loong

[PATCH v9 3/5] MAINTAINERS: Add entry for Loongson crypto driver

2025-05-06 Thread Qunqin Zhao
This patch adds an entry for Loongson crypto driver in the list of maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v9: Added loongson-se.c/.h to the entry. v8: "RNG" --> "crypto" v7: Added Huacai's tag v5-v6: None v4: Changed tile to "

[PATCH v9 5/5] MAINTAINERS: Add tpm_loongson.c to LOONGSON CRYPTO DRIVER entry

2025-05-06 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen Reviewed-by: Jarkko Sakkinen --- v8-v9: None v7: Added tag from Jarkko and Huacai v6: "tpm_lsse.c" -> "tpm_loongson" v4

[PATCH v9 2/5] crypto: loongson - add Loongson RNG driver support

2025-05-06 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson Security Engine chip. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v8: Added reseed callbak. "lsrng" --> "loongson_rng". v7: Change the ls

[PATCH v9 1/5] mfd: Add support for Loongson Security Engine chip controller

2025-05-06 Thread Qunqin Zhao
Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. This is the base driver for other specific engine drivers. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v8: As explained in the cover letter

[PATCH v9 4/5] tpm: Add a driver for Loongson TPM device

2025-05-06 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen Reviewed-by: Jarkko Sakkinen --- v9: "tpm_loongson_driver" --> "tpm_loongson" "depends on CRYPTO_DEV_

Re: [PATCH v9 5/5] MAINTAINERS: Add tpm_loongson.c to LOONGSON CRYPTO DRIVER entry

2025-05-06 Thread Qunqin Zhao
在 2025/5/6 下午5:03, Yanteng Si 写道: 在 5/6/25 11:20 AM, Qunqin Zhao 写道: Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen Reviewed-by: Jarkko Sakkinen --- v8-v9: None v7: Added tag from Jarkko

[PATCH v8 3/5] MAINTAINERS: Add entry for Loongson crypto driver

2025-04-18 Thread Qunqin Zhao
This patch adds an entry for Loongson crypto driver in the list of maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v8: "RNG" --> "crypto" v7: Added Huacai's tag v5-v6: None v4: Changed tile to "Add entry for ...". Lowcased "Ma

[PATCH V3 0/6] Drivers for Loongson security engine

2025-02-18 Thread Qunqin Zhao
. v2: Removed misc driver. Added tpm driver. Qunqin Zhao (6): mfd: Add support for Loongson Security Module MAINTAINERS: Add maintainer for Loongson Security Module driver crypto: loongson - add Loongson RNG driver support MAINTAINERS: Add maintainer for Loongson RNG driver tpm: Add a

[PATCH V3 1/6] mfd: Add support for Loongson Security Module

2025-02-18 Thread Qunqin Zhao
This driver supports Loongson Security Module, which provides the control for it's hardware encryption acceleration child devices. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v3: None v2: Removed "ls6000se-sdf" device, added "

[PATCH V3 2/6] MAINTAINERS: Add maintainer for Loongson Security Module driver

2025-02-18 Thread Qunqin Zhao
This patch adds an entry for Loongson Security Module driver in the list of Maintainers. Signed-off-by: Qunqin Zhao --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5583df569c..cd6c029398 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH V3 4/6] MAINTAINERS: Add maintainer for Loongson RNG driver

2025-02-18 Thread Qunqin Zhao
This patch adds an entry for Loongson RNG driver in the list of Maintainers. Signed-off-by: Qunqin Zhao --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cd6c029398..6493d58436 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13480,6

[PATCH V3 3/6] crypto: loongson - add Loongson RNG driver support

2025-02-18 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson 6000SE. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v2-v3: None drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile| 1 + drivers/crypto/loo

[PATCH V3 0/6] Drivers for Loongson security engine

2025-02-18 Thread Qunqin Zhao
. v2: Removed misc driver. Added tpm driver. Qunqin Zhao (6): mfd: Add support for Loongson Security Module MAINTAINERS: Add maintainer for Loongson Security Module driver crypto: loongson - add Loongson RNG driver support MAINTAINERS: Add maintainer for Loongson RNG driver tpm: Add a

[PATCH V3 5/6] tpm: Add a driver for Loongson TPM device

2025-02-18 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v3: Added reminder about Loongson security engine to git log. drivers/char/tpm/Kconfig| 9 drivers/char/tpm/Makefile | 1 + drivers/char/tpm

[PATCH V3 6/6] MAINTAINERS: Add tpm_lsse.c to LOONGSON CRYPTO DRIVER entry

2025-02-18 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6493d58436..6aad0f08ad 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

Re: [PATCH v4 1/6] mfd: Add support for Loongson Security Module

2025-03-12 Thread Qunqin Zhao
在 2025/3/12 下午4:08, Lee Jones 写道: On Wed, 26 Feb 2025, Qunqin Zhao wrote: This driver supports Loongson Security Module, which provides the control for it's hardware encryption acceleration child devices. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin

[PATCH v5 0/6] Drivers for Loongson security engine

2025-03-13 Thread Qunqin Zhao
driver. v4: Please look at changelog in tpm and MAINTAINERS. No changes to mfd and crypto. v3: Put the updates to the MAINTAINERS in a separate patch. v2: Removed misc driver. Added tpm driver. Qunqin Zhao (6): mfd: Add support for Loongson Security Module MAINTAINERS: Add entry for Loongso

[PATCH v5 6/6] MAINTAINERS: Add tpm_lsse.c to LOONGSON CRYPTO DRIVER entry

2025-03-13 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao --- v4-v5: None MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3f04f43ffe..75760e6ec2 100644 --- a/MAINTAINERS +++ b

[PATCH v5 2/6] MAINTAINERS: Add entry for Loongson Security Module driver

2025-03-13 Thread Qunqin Zhao
This patch adds an entry for Loongson Security Module driver in the list of maintainers. Signed-off-by: Qunqin Zhao --- v5: None v4: Changed tile to "Add entry for ". Lowcased "Maintainers" in commit message. MAINTAINERS | 7 +++ 1 file changed, 7 inserti

[PATCH v5 1/6] mfd: Add support for Loongson Security Module

2025-03-13 Thread Qunqin Zhao
This driver supports Loongson Security Module, which provides the control for it's hardware encryption acceleration child devices. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v5: Registered "ls6000se-rng" device. v3-v4: None v2: Remove

[PATCH v5 5/6] tpm: Add a driver for Loongson TPM device

2025-03-13 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v5: None v4: Prefix all with tpm_lsse instead of tpm. Removed MODULE_AUTHOR fields. v3: Added reminder about Loongson security engine to git log. drivers/char

Re: [PATCH v5 0/6] Drivers for Loongson security engine

2025-03-13 Thread Qunqin Zhao
se.c ->tpm_loongson.c" BR, Qunqin. Huacai On Thu, Mar 13, 2025 at 5:05 PM Qunqin Zhao wrote: Loongson security engine supports random number generation, hash, symmetric encryption and asymmetric encryption. Based on these encryption functions, TPM2 have been implemented in it. mfd is

[PATCH v5 4/6] MAINTAINERS: Add entry for Loongson RNG driver

2025-03-13 Thread Qunqin Zhao
This patch adds an entry for Loongson RNG driver in the list of maintainers. Signed-off-by: Qunqin Zhao --- v5: None v4: Changed tile to "Add entry for ...". Lowcased "Maintainers" in commit message. MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff -

Re: [PATCH V3 2/6] MAINTAINERS: Add maintainer for Loongson Security Module driver

2025-02-20 Thread Qunqin Zhao
-logs. I suggest: MAINTAINERS: Add Qunqin Zhao for new Loongson Security Module driver Hi, Paul,  thanks for your comments. I took a look at the git log of MAINTAINERS file.  It is rare to put the maintainer's name on the title when adding a new entry. The usual practice should be "

Re: [PATCH V3 5/6] tpm: Add a driver for Loongson TPM device

2025-02-20 Thread Qunqin Zhao
quot;Yinggang Gu "); +MODULE_AUTHOR("Qunqin Zhao "); Remove MODULE_AUTHOR fields. Git encodes this already. Do you mean that "modinfo" will still show the author after removing MODULE_AUTHOR fields? +MODULE_DESCRIPTION("Loongson TPM driver"); -- 2.43.0 Prefi

[PATCH v4 1/6] mfd: Add support for Loongson Security Module

2025-02-25 Thread Qunqin Zhao
This driver supports Loongson Security Module, which provides the control for it's hardware encryption acceleration child devices. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v3-v4: None v2: Removed "ls6000se-sdf" device, added "

[PATCH v4 0/6] Drivers for Loongson security engine

2025-02-25 Thread Qunqin Zhao
changes to tpm and crypto. v3: Put the updates to the MAINTAINERS in a separate patch. v2: Removed misc driver. Added tpm driver. Qunqin Zhao (6): mfd: Add support for Loongson Security Module MAINTAINERS: Add entry for Loongson Security Module driver crypto: loongson - add Loongson RNG

[PATCH v4 3/6] crypto: loongson - add Loongson RNG driver support

2025-02-25 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson 6000SE. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v2-v4: None drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile| 1 + drivers/crypto/loo

[PATCH v4 5/6] tpm: Add a driver for Loongson TPM device

2025-02-25 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao --- v4: Prefix all with tpm_lsse instead of tpm. Removed MODULE_AUTHOR fields. v3: Added reminder about Loongson security engine to git log. drivers/char/tpm

[PATCH v4 6/6] MAINTAINERS: Add tpm_lsse.c to LOONGSON CRYPTO DRIVER entry

2025-02-25 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao --- v4: None MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3f04f43ffe..75760e6ec2 100644 --- a/MAINTAINERS +++ b

[PATCH v4 2/6] MAINTAINERS: Add entry for Loongson Security Module driver

2025-02-25 Thread Qunqin Zhao
This patch adds an entry for Loongson Security Module driver in the list of maintainers. Signed-off-by: Qunqin Zhao --- v4: Changed tile to "Add entry for ". Lowcased "Maintainers" in commit message. MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff -

[PATCH v4 4/6] MAINTAINERS: Add entry for Loongson RNG driver

2025-02-25 Thread Qunqin Zhao
This patch adds an entry for Loongson RNG driver in the list of maintainers. Signed-off-by: Qunqin Zhao --- v4: Changed tile to "Add entry for ...". Lowcased "Maintainers" in commit message. MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINT

[PATCH v7 0/6] Drivers for Loongson security engine

2025-04-02 Thread Qunqin Zhao
: Please look at changelog in tpm and MAINTAINERS. No changes to mfd and crypto. v3: Put the updates to the MAINTAINERS in a separate patch. v2: Removed misc driver. Added tpm driver. Qunqin Zhao (6): mfd: Add support for Loongson Security Module MAINTAINERS: Add entry for Loongson Security

[PATCH v7 2/6] MAINTAINERS: Add entry for Loongson Security Module driver

2025-04-02 Thread Qunqin Zhao
This patch adds an entry for Loongson Security Module driver in the list of maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v7: Added Huacai's tag v6: "ls6000se.c" --> "loongson_se.c" "ls6000se.h" --> "loongson_se.

[PATCH v7 4/6] MAINTAINERS: Add entry for Loongson RNG driver

2025-04-02 Thread Qunqin Zhao
This patch adds an entry for Loongson RNG driver in the list of maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v7: Added Huacai's tag v5-v6: None v4: Changed tile to "Add entry for ...". Lowcased "Maintainers" in commit message. MAINTAINERS |

[PATCH v7 3/6] crypto: loongson - add Loongson RNG driver support

2025-04-02 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson security engine. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v7: Change the lsrng_ prefix to loongson_rng_ v6: Replace all "ls6000se" with "l

[PATCH v7 6/6] MAINTAINERS: Add tpm_loongson.c to LOONGSON CRYPTO DRIVER entry

2025-04-02 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Jarkko Sakkinen Reviewed-by: Huacai Chen --- v7: Added tag from Jarkko and Huacai v6: "tpm_lsse.c" -> "tpm_loongson" v4-v5: None MA

[PATCH v7 5/6] tpm: Add a driver for Loongson TPM device

2025-04-02 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Jarkko Sakkinen Reviewed-by: Huacai Chen --- v7: Moved Kconfig entry between TCG_IBMVTPM and TCG_XEN. Added Jarkko's tag(a little change, shou

[PATCH v6 0/6] Drivers for Loongson security engine

2025-03-26 Thread Qunqin Zhao
INTAINERS. No changes to mfd and crypto. v3: Put the updates to the MAINTAINERS in a separate patch. v2: Removed misc driver. Added tpm driver. Qunqin Zhao (6): mfd: Add support for Loongson Security Module MAINTAINERS: Add entry for Loongson Security Module driver crypto: loongson - add

Re: [PATCH v9 4/5] tpm: Add a driver for Loongson TPM device

2025-05-13 Thread Qunqin Zhao
Hi, Jarkko and Stefano 在 2025/5/6 上午11:19, Qunqin Zhao 写道: Loongson Security Engine supports random number generation, hash, symmetric encryption and asymmetric encryption. Based on these encryption functions, TPM2 have been implemented in the Loongson Security Engine firmware. This driver is

Re: [PATCH v9 4/5] tpm: Add a driver for Loongson TPM device

2025-05-06 Thread Qunqin Zhao
在 2025/5/6 下午10:13, Stefano Garzarella 写道: On Tue, May 06, 2025 at 11:19:46AM +0800, Qunqin Zhao wrote: Loongson Security Engine supports random number generation, hash, symmetric encryption and asymmetric encryption. Based on these encryption functions, TPM2 have been implemented in the

Re: [PATCH v9 0/5] Add Loongson Security Engine chip driver

2025-05-13 Thread Qunqin Zhao
, Qunqin. Huacai On Tue, May 6, 2025 at 12:33 PM Qunqin Zhao wrote: The Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. Each engine have its own DMA buffer provided by the controller. The kernel cannot directly send commands to the engine and must first send th

Re: [PATCH v9 2/5] crypto: loongson - add Loongson RNG driver support

2025-05-19 Thread Qunqin Zhao
在 2025/5/19 下午4:22, Herbert Xu 写道: On Mon, May 19, 2025 at 04:13:14PM +0800, Qunqin Zhao wrote: Then the HISI TRNG driver isn't a right demo? Yes the hisi trng looks wrong too. This can also avoid concurrent access to a device, otherwise i need to add mutex_lock/unlock in generat

Re: [PATCH v9 2/5] crypto: loongson - add Loongson RNG driver support

2025-05-19 Thread Qunqin Zhao
在 2025/5/19 下午1:57, Herbert Xu 写道: On Tue, May 06, 2025 at 11:19:44AM +0800, Qunqin Zhao wrote: +static int loongson_rng_init(struct crypto_tfm *tfm) +{ + struct loongson_rng_ctx *ctx = crypto_tfm_ctx(tfm); + struct loongson_rng *rng; + int ret = -EBUSY; + + mutex_lock

Re: [PATCH v9 1/5] mfd: Add support for Loongson Security Engine chip controller

2025-05-25 Thread Qunqin Zhao
在 2025/5/22 下午9:46, Lee Jones 写道: On Tue, 06 May 2025, Qunqin Zhao wrote: Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. This is the base driver for other specific engine drivers. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by

Re: [PATCH v10 4/5] tpm: Add a driver for Loongson TPM device

2025-05-28 Thread Qunqin Zhao
在 2025/5/28 下午3:57, Stefano Garzarella 写道: +    chip = tpmm_chip_alloc(dev, &tpm_loongson_ops); +    if (IS_ERR(chip)) +    return PTR_ERR(chip); +    chip->flags = TPM_CHIP_FLAG_TPM2 | TPM_CHIP_FLAG_IRQ; Why setting TPM_CHIP_FLAG_IRQ? When tpm_engine completes  TPM_CC* command, the ha

Re: [PATCH v10 4/5] tpm: Add a driver for Loongson TPM device

2025-05-28 Thread Qunqin Zhao
在 2025/5/28 下午5:00, Stefano Garzarella 写道: On Wed, May 28, 2025 at 04:42:05PM +0800, Qunqin Zhao wrote: 在 2025/5/28 下午3:57, Stefano Garzarella 写道: +    chip = tpmm_chip_alloc(dev, &tpm_loongson_ops); +    if (IS_ERR(chip)) +    return PTR_ERR(chip); +    chip->flags = TPM_CHIP_FL

Re: [PATCH v10 4/5] tpm: Add a driver for Loongson TPM device

2025-05-28 Thread Qunqin Zhao
在 2025/5/28 下午5:24, Qunqin Zhao 写道: 在 2025/5/28 下午5:00, Stefano Garzarella 写道: On Wed, May 28, 2025 at 04:42:05PM +0800, Qunqin Zhao wrote: 在 2025/5/28 下午3:57, Stefano Garzarella 写道: +    chip = tpmm_chip_alloc(dev, &tpm_loongson_ops); +    if (IS_ERR(chip)) +    return PTR_ERR(

[PATCH v10 5/5] MAINTAINERS: Add tpm_loongson.c to LOONGSON CRYPTO DRIVER entry

2025-05-28 Thread Qunqin Zhao
Changes to Loongson TPM driver would be best reviewed by the Loongson crypto driver maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen Reviewed-by: Jarkko Sakkinen --- v8-v10: None v7: Added tag from Jarkko and Huacai v6: "tpm_lsse.c" -> "tpm_loongson" v4

Re: [PATCH v10 0/5] Add Loongson Security Engine chip driver

2025-05-28 Thread Qunqin Zhao
ed, May 28, 2025 at 2:59 PM Qunqin Zhao wrote: The Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. Each engine have its own DMA buffer provided by the controller. The kernel cannot directly send commands to the engine and must first send them to the controller,

[PATCH v10 0/5] Add Loongson Security Engine chip driver

2025-05-28 Thread Qunqin Zhao
E, ls6000se.c -> loongson-se.c crypto :CRYPTO_DEV_LS6000SE_RNG -> CRYPTO_DEV_LOONGSON_RNG, ls6000se-rng.c ->loongson-rng.c tpm: TCG_LSSE -> TCG_LOONGSON, tpm_lsse.c ->tpm_loongson.c v5: Registered "ls6000se-rng" device in mfd driver Qunqin Zhao (5): mfd: Add sup

[PATCH v10 1/5] mfd: Add support for Loongson Security Engine chip controller

2025-05-28 Thread Qunqin Zhao
Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. This is the base driver for other specific engine drivers. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v10: Cleanned up coding style. v8: As

[PATCH v10 2/5] crypto: loongson - add Loongson RNG driver support

2025-05-28 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson Security Engine chip. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v10: In the init callback, select the device with the minimum users, now the init cal

[PATCH v10 4/5] tpm: Add a driver for Loongson TPM device

2025-05-28 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v10: Added error check in send and recv callbak v9: "tpm_loongson_driver" --> "tpm_loongson" "depen

[PATCH v10 3/5] MAINTAINERS: Add entry for Loongson crypto driver

2025-05-28 Thread Qunqin Zhao
This patch adds an entry for Loongson crypto driver in the list of maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- v10: None v9: Added loongson-se.c/.h to the entry. v8: "RNG" --> "crypto" v7: Added Huacai's tag v5-v6: None v4: Ch

Re: [PATCH v10 4/5] tpm: Add a driver for Loongson TPM device

2025-05-28 Thread Qunqin Zhao
在 2025/5/28 下午5:53, Stefano Garzarella 写道: On Wed, May 28, 2025 at 05:34:49PM +0800, Qunqin Zhao wrote: 在 2025/5/28 下午5:24, Qunqin Zhao 写道: 在 2025/5/28 下午5:00, Stefano Garzarella 写道: On Wed, May 28, 2025 at 04:42:05PM +0800, Qunqin Zhao wrote: 在 2025/5/28 下午3:57, Stefano Garzarella 写道

[PATCH v11 3/4] tpm: Add a driver for Loongson TPM device

2025-06-18 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- drivers/char/tpm/Kconfig| 9 drivers/char/tpm/Makefile | 1 + drivers/char/tpm/tpm_loongson.c | 84

[PATCH v11 0/4] dd Loongson Security Engine chip driver

2025-06-18 Thread Qunqin Zhao
ot;ls6000se" with "loongson" v4: tpm: Removed MODULE_AUTHOR fields. Prefix all with tpm_lsse instead of tpm. v3: Put the updates to the MAINTAINERS in a separate patch. tpm: Added reminder about Loongson security engine to git log. v2: Removed misc driver. Added tpm driver

[PATCH v11 4/4] MAINTAINERS: Add entry for Loongson Security Engine drivers

2025-06-18 Thread Qunqin Zhao
This patch adds an entry for Loongson Security Engine drivers in the list of maintainers. Signed-off-by: Qunqin Zhao --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3ecb44458..23d889bca 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v11 1/4] mfd: Add support for Loongson Security Engine chip controller

2025-06-18 Thread Qunqin Zhao
Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. This is the base driver for other specific engine drivers. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- drivers/mfd/Kconfig | 11

[PATCH v11 2/4] crypto: loongson - add Loongson RNG driver support

2025-06-18 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson Security Engine chip. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile

Re: [PATCH v10 2/5] crypto: loongson - add Loongson RNG driver support

2025-06-17 Thread Qunqin Zhao
在 2025/6/11 下午5:23, Herbert Xu 写道: On Wed, May 28, 2025 at 02:59:41PM +0800, Qunqin Zhao wrote: + if (!rng_devices.is_init) { + ret = crypto_register_rng(&loongson_rng_alg); + if (ret) { + dev_err(&pdev->dev, "failed to

Re: [PATCH v11 3/4] tpm: Add a driver for Loongson TPM device

2025-06-26 Thread Qunqin Zhao
在 2025/6/27 上午2:29, Jarkko Sakkinen 写道: On Thu, Jun 26, 2025 at 08:48:35PM +0800, Huacai Chen wrote: But there is another coherency, you can see this in the 1st patch: +static const struct mfd_cell engines[] = { + { .name = "loongson-rng" }, + { .name = "loongson-tpm" }, +}; I thought alread

[PATCH v12 0/4] Add Loongson Security Engine chip driver

2025-07-05 Thread Qunqin Zhao
m_loongson instead of tpm_lsse. Replace all "ls6000se" with "loongson" v4: tpm: Removed MODULE_AUTHOR fields. Prefix all with tpm_lsse instead of tpm. v3: Put the updates to the MAINTAINERS in a separate patch. tpm: Added reminder about Loongson security en

[PATCH v12 1/4] mfd: Add support for Loongson Security Engine chip controller

2025-07-05 Thread Qunqin Zhao
Loongson Security Engine chip supports RNG, SM2, SM3 and SM4 accelerator engines. This is the base driver for other specific engine drivers. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- drivers/mfd/Kconfig | 11

[PATCH v12 2/4] crypto: loongson - add Loongson RNG driver support

2025-07-05 Thread Qunqin Zhao
Loongson's Random Number Generator is found inside Loongson Security Engine chip. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile

[PATCH v12 4/4] MAINTAINERS: Add entry for Loongson Security Engine drivers

2025-07-05 Thread Qunqin Zhao
This patch adds an entry for Loongson Security Engine drivers in the list of maintainers. Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fad6cb025..1ccb267ce 100644 --- a

[PATCH v12 3/4] tpm: Add a driver for Loongson TPM device

2025-07-05 Thread Qunqin Zhao
firmware and receiving data from the firmware. Co-developed-by: Yinggang Gu Signed-off-by: Yinggang Gu Signed-off-by: Qunqin Zhao Reviewed-by: Huacai Chen --- drivers/char/tpm/Kconfig| 9 drivers/char/tpm/Makefile | 1 + drivers/char/tpm/tpm_loongson.c | 84

Re: [PATCH v12 3/4] tpm: Add a driver for Loongson TPM device

2025-07-26 Thread Qunqin Zhao
在 2025/7/7 下午5:48, Stefano Garzarella 写道: On Sat, Jul 05, 2025 at 03:20:44PM +0800, Qunqin Zhao wrote: Loongson Security Engine supports random number generation, hash, symmetric encryption and asymmetric encryption. Based on these encryption functions, TPM2 have been implemented in the