-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rockchip-rk3588-edge: refresh HDMI TX & RX patches from Collabora and…
… add Hantro VPU back
- Loading branch information
1 parent
53396d2
commit b9d7bd9
Showing
17 changed files
with
4,855 additions
and
7,791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From a0ba8a456c62483e2b8fbbf021fd5ca4ffa07fe8 Mon Sep 17 00:00:00 2001 | ||
From: Corentin Labbe <[email protected]> | ||
Date: Tue, 7 Nov 2023 15:55:27 +0000 | ||
Subject: dt-bindings: crypto: add support for rockchip,crypto-rk3588 | ||
Subject: [PATCH 1/4] dt-bindings: crypto: add support for | ||
rockchip,crypto-rk3588 | ||
|
||
Add device tree binding documentation for the Rockchip cryptographic | ||
offloader V2. | ||
|
||
Signed-off-by: Corentin Labbe <[email protected]> | ||
--- | ||
Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml | 65 ++++++++++ | ||
.../crypto/rockchip,rk3588-crypto.yaml | 65 +++++++++++++++++++ | ||
1 file changed, 65 insertions(+) | ||
create mode 100644 Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml | ||
|
||
diff --git a/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml | ||
new file mode 100644 | ||
index 000000000000..111111111111 | ||
index 000000000000..c01963413260 | ||
--- /dev/null | ||
+++ b/Documentation/devicetree/bindings/crypto/rockchip,rk3588-crypto.yaml | ||
@@ -0,0 +1,65 @@ | ||
|
@@ -83,24 +85,25 @@ index 000000000000..111111111111 | |
+ reset-names = "core"; | ||
+ }; | ||
-- | ||
Armbian | ||
2.45.2 | ||
|
||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
|
||
From b9c55c60a732b7d05b6344289091218f7dcb9208 Mon Sep 17 00:00:00 2001 | ||
From: Corentin Labbe <[email protected]> | ||
Date: Tue, 7 Nov 2023 15:55:30 +0000 | ||
Subject: ARM64: dts: rk356x: add crypto node | ||
Subject: [PATCH 2/4] ARM64: dts: rk356x: add crypto node | ||
|
||
Both RK3566 and RK3568 have a crypto IP handled by the rk3588 crypto driver so adds a | ||
node for it. | ||
|
||
Tested-by: Ricardo Pardini <[email protected]> | ||
Signed-off-by: Corentin Labbe <[email protected]> | ||
--- | ||
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 12 ++++++++++ | ||
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 12 ++++++++++++ | ||
1 file changed, 12 insertions(+) | ||
|
||
diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi | ||
index 111111111111..222222222222 100644 | ||
index 4690be841a1c..50d1c42b6740 100644 | ||
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi | ||
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi | ||
@@ -1113,6 +1113,18 @@ sdhci: mmc@fe310000 { | ||
|
@@ -123,12 +126,13 @@ index 111111111111..222222222222 100644 | |
compatible = "rockchip,rk3568-i2s-tdm"; | ||
reg = <0x0 0xfe400000 0x0 0x1000>; | ||
-- | ||
Armbian | ||
2.45.2 | ||
|
||
|
||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From 9e082adac7e03d2ffe78b49f92e556a4a70e0ee8 Mon Sep 17 00:00:00 2001 | ||
From: Corentin Labbe <[email protected]> | ||
Date: Tue, 7 Nov 2023 15:55:31 +0000 | ||
Subject: reset: rockchip: secure reset must be used by SCMI | ||
Subject: [PATCH 3/4] reset: rockchip: secure reset must be used by SCMI | ||
|
||
While working on the rk3588 crypto driver, I loose lot of time | ||
understanding why resetting the IP failed. | ||
|
@@ -138,12 +142,12 @@ All resets in this block must be handled via SCMI call. | |
|
||
Signed-off-by: Corentin Labbe <[email protected]> | ||
--- | ||
drivers/clk/rockchip/rst-rk3588.c | 42 ------ | ||
include/dt-bindings/reset/rockchip,rk3588-cru.h | 68 +++++----- | ||
drivers/clk/rockchip/rst-rk3588.c | 42 ------------ | ||
.../dt-bindings/reset/rockchip,rk3588-cru.h | 68 +++++++++---------- | ||
2 files changed, 34 insertions(+), 76 deletions(-) | ||
|
||
diff --git a/drivers/clk/rockchip/rst-rk3588.c b/drivers/clk/rockchip/rst-rk3588.c | ||
index 111111111111..222222222222 100644 | ||
index c4ebc01f1c9c..7a856de64d9e 100644 | ||
--- a/drivers/clk/rockchip/rst-rk3588.c | ||
+++ b/drivers/clk/rockchip/rst-rk3588.c | ||
@@ -16,9 +16,6 @@ | ||
|
@@ -203,7 +207,7 @@ index 111111111111..222222222222 100644 | |
|
||
void rk3588_rst_init(struct device_node *np, void __iomem *reg_base) | ||
diff --git a/include/dt-bindings/reset/rockchip,rk3588-cru.h b/include/dt-bindings/reset/rockchip,rk3588-cru.h | ||
index 111111111111..222222222222 100644 | ||
index e2fe4bd5f7f0..b74f1046f5a5 100644 | ||
--- a/include/dt-bindings/reset/rockchip,rk3588-cru.h | ||
+++ b/include/dt-bindings/reset/rockchip,rk3588-cru.h | ||
@@ -716,40 +716,40 @@ | ||
|
@@ -282,12 +286,13 @@ index 111111111111..222222222222 100644 | |
#define SRST_A_HDMIRX_BIU 660 | ||
|
||
-- | ||
Armbian | ||
2.45.2 | ||
|
||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
|
||
From 8e6f2d80ad933db9d542a9d08a9f733341e65b90 Mon Sep 17 00:00:00 2001 | ||
From: Corentin Labbe <[email protected]> | ||
Date: Tue, 7 Nov 2023 15:55:32 +0000 | ||
Subject: crypto: rockchip: add rk3588 driver | ||
Subject: [PATCH 4/4] crypto: rockchip: add rk3588 driver | ||
|
||
RK3588 have a new crypto IP, this patch adds basic support for it. | ||
Only hashes and cipher are handled for the moment. | ||
|
@@ -296,14 +301,18 @@ Signed-off-by: Corentin Labbe <[email protected]> | |
--- | ||
drivers/crypto/Kconfig | 29 + | ||
drivers/crypto/rockchip/Makefile | 5 + | ||
drivers/crypto/rockchip/rk2_crypto.c | 739 ++++++++++ | ||
drivers/crypto/rockchip/rk2_crypto.h | 246 +++ | ||
drivers/crypto/rockchip/rk2_crypto_ahash.c | 344 +++++ | ||
drivers/crypto/rockchip/rk2_crypto_skcipher.c | 576 ++++++++ | ||
6 files changed, 1939 insertions(+) | ||
drivers/crypto/rockchip/rk2_crypto.c | 738 ++++++++++++++++++ | ||
drivers/crypto/rockchip/rk2_crypto.h | 246 ++++++ | ||
drivers/crypto/rockchip/rk2_crypto_ahash.c | 344 ++++++++ | ||
drivers/crypto/rockchip/rk2_crypto_skcipher.c | 576 ++++++++++++++ | ||
6 files changed, 1938 insertions(+) | ||
create mode 100644 drivers/crypto/rockchip/rk2_crypto.c | ||
create mode 100644 drivers/crypto/rockchip/rk2_crypto.h | ||
create mode 100644 drivers/crypto/rockchip/rk2_crypto_ahash.c | ||
create mode 100644 drivers/crypto/rockchip/rk2_crypto_skcipher.c | ||
|
||
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig | ||
index 111111111111..222222222222 100644 | ||
index 94f23c6fc93b..95d700c88161 100644 | ||
--- a/drivers/crypto/Kconfig | ||
+++ b/drivers/crypto/Kconfig | ||
@@ -653,6 +653,35 @@ config CRYPTO_DEV_TEGRA | ||
|
@@ -343,7 +352,7 @@ index 111111111111..222222222222 100644 | |
tristate "Support for Xilinx ZynqMP AES hw accelerator" | ||
depends on ZYNQMP_FIRMWARE || COMPILE_TEST | ||
diff --git a/drivers/crypto/rockchip/Makefile b/drivers/crypto/rockchip/Makefile | ||
index 111111111111..222222222222 100644 | ||
index 785277aca71e..452a12ff6538 100644 | ||
--- a/drivers/crypto/rockchip/Makefile | ||
+++ b/drivers/crypto/rockchip/Makefile | ||
@@ -3,3 +3,8 @@ obj-$(CONFIG_CRYPTO_DEV_ROCKCHIP) += rk_crypto.o | ||
|
@@ -357,10 +366,10 @@ index 111111111111..222222222222 100644 | |
+ rk2_crypto_ahash.o | ||
diff --git a/drivers/crypto/rockchip/rk2_crypto.c b/drivers/crypto/rockchip/rk2_crypto.c | ||
new file mode 100644 | ||
index 000000000000..111111111111 | ||
index 000000000000..bac7cc39c403 | ||
--- /dev/null | ||
+++ b/drivers/crypto/rockchip/rk2_crypto.c | ||
@@ -0,0 +1,739 @@ | ||
@@ -0,0 +1,738 @@ | ||
+// SPDX-License-Identifier: GPL-2.0 | ||
+/* | ||
+ * hardware cryptographic offloader for RK3568/RK3588 SoC | ||
|
@@ -1063,7 +1072,7 @@ index 000000000000..111111111111 | |
+ return err; | ||
+} | ||
+ | ||
+static int rk2_crypto_remove(struct platform_device *pdev) | ||
+static void rk2_crypto_remove(struct platform_device *pdev) | ||
+{ | ||
+ struct rk2_crypto_dev *rkc = platform_get_drvdata(pdev); | ||
+ struct rk2_crypto_dev *first; | ||
|
@@ -1082,7 +1091,6 @@ index 000000000000..111111111111 | |
+ } | ||
+ rk2_crypto_pm_exit(rkc); | ||
+ crypto_engine_exit(rkc->engine); | ||
+ return 0; | ||
+} | ||
+ | ||
+static struct platform_driver crypto_driver = { | ||
|
@@ -1102,7 +1110,7 @@ index 000000000000..111111111111 | |
+MODULE_AUTHOR("Corentin Labbe <[email protected]>"); | ||
diff --git a/drivers/crypto/rockchip/rk2_crypto.h b/drivers/crypto/rockchip/rk2_crypto.h | ||
new file mode 100644 | ||
index 000000000000..111111111111 | ||
index 000000000000..59cd8be59f70 | ||
--- /dev/null | ||
+++ b/drivers/crypto/rockchip/rk2_crypto.h | ||
@@ -0,0 +1,246 @@ | ||
|
@@ -1354,7 +1362,7 @@ index 000000000000..111111111111 | |
+void rk2_hash_exit_tfm(struct crypto_ahash *tfm); | ||
diff --git a/drivers/crypto/rockchip/rk2_crypto_ahash.c b/drivers/crypto/rockchip/rk2_crypto_ahash.c | ||
new file mode 100644 | ||
index 000000000000..111111111111 | ||
index 000000000000..75b8d9893447 | ||
--- /dev/null | ||
+++ b/drivers/crypto/rockchip/rk2_crypto_ahash.c | ||
@@ -0,0 +1,344 @@ | ||
|
@@ -1704,7 +1712,7 @@ index 000000000000..111111111111 | |
+} | ||
diff --git a/drivers/crypto/rockchip/rk2_crypto_skcipher.c b/drivers/crypto/rockchip/rk2_crypto_skcipher.c | ||
new file mode 100644 | ||
index 000000000000..111111111111 | ||
index 000000000000..3e8e44d84b47 | ||
--- /dev/null | ||
+++ b/drivers/crypto/rockchip/rk2_crypto_skcipher.c | ||
@@ -0,0 +1,576 @@ | ||
|
@@ -2285,5 +2293,5 @@ index 000000000000..111111111111 | |
+ crypto_free_skcipher(ctx->fallback_tfm); | ||
+} | ||
-- | ||
Armbian | ||
2.45.2 | ||
|
Oops, something went wrong.