Skip to contentSkip to conversation

arm: dts: rockchip: add crypto node for RK322x

PATCH In review Michele Zuccalà 3 participants 6 messages Oct 19, 2022 – Oct 20, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: rockchip: add crypto node for RK322x

The cryptographic hardware of the rk322x is compatible with the one present in the rk3288.

Add the respective node to the device tree.

---
 arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/rk322x.dtsi +11 -0
index ffc16d6b9..b381fc2a0 100644
@@ -132,6 +132,17 @@ display_subsystem: display-subsystem {
 		ports = <&vop_out>;
 	};
 
+	crypto: crypto@100a0000 {
+		compatible = "rockchip,rk3288-crypto";
+		reg = <0x100a0000 0x4000>;
+		interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_M_CRYPTO>, <&cru HCLK_S_CRYPTO>,
+			 <&cru SCLK_CRYPTO>, <&cru ACLK_DMAC>;
+		clock-names = "aclk", "hclk", "sclk", "apb_pclk";
+		resets = <&cru SRST_CRYPTO>;
+		reset-names = "crypto-rst";
+	};
+
 	i2s1: i2s1@100b0000 {
 		compatible = "rockchip,rk3228-i2s", "rockchip,rk3066-i2s";
 		reg = <0x100b0000 0x4000>;
Signature · 1 line
2.35.3
#1 lore raw

Added Cc: [email protected]

Quoted 15 lines · Michele Zuccalà

The cryptographic hardware of the rk322x is compatible with the one present in the rk3288.

Add the respective node to the device tree.

---
 arch/arm/boot/dts/rk322x.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/rk322x.dtsi +0 -0
index ffc16d6b9..b381fc2a0 100644

arch/arm/boot/dts/rk322x.dtsi display_subsystem: display-subsystem { · line 137

Quoted 6 lines
arch/arm/boot/dts/rk322x.dtsi +2 -0
@@ -132,6 +132,17 @@ display_subsystem: display-subsystem {
 		ports = <&vop_out>;
 	};
 
+	crypto: crypto@100a0000 {
 
+		compatible = "rockchip,rk3288-crypto";

Hi,

Compatible strings must SoC orientated.

Something like:
compatible = "rockchip,rk3228-crypto", "rockchip,rk3288-crypto";

This string must be add to YAML document:
https://lore.kernel.org/linux-rockchip/[email protected]/

The status of that serie is unknown to me. Not sure by who or when that is going to be merged.

Johan

Quoted 12 lines
arch/arm/boot/dts/rk322x.dtsi +9 -0
+		reg = <0x100a0000 0x4000>;
+		interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru HCLK_M_CRYPTO>, <&cru HCLK_S_CRYPTO>,
+			 <&cru SCLK_CRYPTO>, <&cru ACLK_DMAC>;
+		clock-names = "aclk", "hclk", "sclk", "apb_pclk";
+		resets = <&cru SRST_CRYPTO>;
+		reset-names = "crypto-rst";
+	};
+
 	i2s1: i2s1@100b0000 {
 		compatible = "rockchip,rk3228-i2s", "rockchip,rk3066-i2s";

reg = <0x100b0000 0x4000>;

author
#2 lore raw
Quoted 1 line

Hi,

Hi Johan,

Quoted 6 lines

Compatible strings must SoC orientated.

Something like:
compatible = "rockchip,rk3228-crypto", "rockchip,rk3288-crypto";

Quoted 7 lines

This string must be add to YAML document:
https://lore.kernel.org/linux-rockchip/[email protected]/

The status of that serie is unknown to me. Not sure by who or when that is going to be merged.

Johan

thanks for the feedback, this is my first kernel patch. Maybe at this point it is worth trying to combine the two jobs !? Or do I still have to modify my patch asking only to add the string in the yaml !?

Thank you

maintainer
#3 lore raw

Hi,

Am Donnerstag, 20. Oktober 2022, 09:10:44 CEST schrieb ilmich:

Quoted 13 lines
Quoted 1 line

Hi,

Hi Johan,

Quoted 9 lines

Compatible strings must SoC orientated.

Something like:
compatible = "rockchip,rk3228-crypto", "rockchip,rk3288-crypto";

This string must be add to YAML document:
https://lore.kernel.org/linux-rockchip/[email protected]/

Quoted 6 lines
Quoted 4 lines

The status of that serie is unknown to me. Not sure by who or when that is going to be merged.

Johan

thanks for the feedback, this is my first kernel patch.

no worries, we'll get you through it :-)

Quoted 3 lines

Maybe at this point it is worth trying to combine the two jobs !? Or do I still have to modify my patch asking only to add the string in the yaml !?

actually you want to go the following route:

(1) pick up
- https://lore.kernel.org/all/[email protected]/
- https://lore.kernel.org/all/[email protected]/
as a base to work on

(2) create a patch to add your compatible.
I _think_ after that, the compatible block should looks something like:

compatible:
oneOf:
- const: rockchip,rk3288-crypto
- const: rockchip,rk3328-crypto
- const: rockchip,rk3399-crypto
- items:
- const: rockchip,rk3228-crypto
- const: rockchip,rk3288-crypto

to handle the new dual element compatible.
make dt_binding_check
should tell you about a wrong format.

(3) modify your dts patch to use the two compatibles
(4) export patches by

	git format-patch -2 --cover-letter

and mention in the cover-letter the dependency on the yaml conversion.

Heiko

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#4 lore raw

Hi Heiko,

Quoted 3 lines

no worries, we'll get you through it :-)

thank you

Quoted 25 lines

actually you want to go the following route:

(1) pick up
- https://lore.kernel.org/all/[email protected]/
- https://lore.kernel.org/all/[email protected]/
as a base to work on

(2) create a patch to add your compatible.
I _think_ after that, the compatible block should looks something like:

compatible:
oneOf:
- const: rockchip,rk3288-crypto
- const: rockchip,rk3328-crypto
- const: rockchip,rk3399-crypto
- items:
- const: rockchip,rk3228-crypto
- const: rockchip,rk3288-crypto

to handle the new dual element compatible.
make dt_binding_check
should tell you about a wrong format.

Quoted 5 lines

(3) modify your dts patch to use the two compatibles
(4) export patches by

        git format-patch -2 --cover-letter

and mention in the cover-letter the dependency on the yaml conversion.

very clear. But excuse the stupid question, this way it becomes a new patchset and not the v2 of this patch, right?! Will this patch be automatically ignored ?!

Michele

maintainer
#5 lore raw

Hi Michele,

Am Donnerstag, 20. Oktober 2022, 13:13:10 CEST schrieb Michele Zuccalà:

Quoted 36 lines
Quoted 2 lines

no worries, we'll get you through it :-)

thank you

Quoted 25 lines

actually you want to go the following route:

(1) pick up
- https://lore.kernel.org/all/[email protected]/
- https://lore.kernel.org/all/[email protected]/
as a base to work on

(2) create a patch to add your compatible.
I _think_ after that, the compatible block should looks something like:

compatible:
oneOf:
- const: rockchip,rk3288-crypto
- const: rockchip,rk3328-crypto
- const: rockchip,rk3399-crypto
- items:
- const: rockchip,rk3228-crypto
- const: rockchip,rk3288-crypto

to handle the new dual element compatible.
make dt_binding_check
should tell you about a wrong format.

Quoted 5 lines

(3) modify your dts patch to use the two compatibles
(4) export patches by

        git format-patch -2 --cover-letter

and mention in the cover-letter the dependency on the yaml conversion.

Quoted 3 lines

very clear. But excuse the stupid question, this way it becomes a new patchset and not the v2 of this patch, right?! Will this patch be automatically ignored ?!

The new patchset still should become v2, as it still addresses your overall goal of adding crypto support for the rk3228.

Heiko