January 30, 2022

Orange Pi 4 (Rockchip 3399) crypto hardware

The chip has crypto hardware!

It seems to be undocumented. The TRM gives a base address for the hardware. Actually it gives two addresses, as there are two parallel units.

There is a linux driver. I have not looked at it yet, and it is for the rk3288 Take a look at:

/u1/linux/linux-git/drivers/crypto/rockchip/rk3288_crypto.h
/u1/linux/linux-git/drivers/crypto/rockchip
The bootrom code makes use of it, and studying that is likely to be my point of entry into learning about it.

Also:

Linux support

So far, this does not look promising. I looked at the dtb files and see nothing there for addresses 0xff8b0000 or ff8b8000 in the following rockchip directory.
/u1/Projects/OrangePi/Xulong/linux-orangepi/arch/arm64/boot/dts/rockchip
/u1/linux/linux-git/ arch/arm64/boot/dts/rockchip
But some further searching turned up this:
/u1/linux/linux-git/arch/arm/boot/dts/rk3288.dtsi
With this entry:
      crypto: cypto-controller@ff8a0000 {
                compatible = "rockchip,rk3288-crypto";
                reg = <0x0 0xff8a0000 0x0 0x4000>;
                interrupts = ;
                clocks = <&cru ACLK_CRYPTO>, <&cru HCLK_CRYPTO>,
                         <&cru SCLK_CRYPTO>, <&cru ACLK_DMAC1>;
                clock-names = "aclk", "hclk", "sclk", "apb_pclk";
                resets = <&cru SRST_CRYPTO>;
                reset-names = "crypto-rst";
                status = "okay";
        };
And searching for the string "rk3288-crypto" leads me to:
drivers/crypto/rockchip/rk3288_crypto.c
No telling if this will be relevant for the RK3399, but it will certainly be something to compare to what I learn looking at the RK3399 bootrom.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / [email protected]