Index: head/sys/arm/conf/ARMADA38X =================================================================== --- head/sys/arm/conf/ARMADA38X +++ head/sys/arm/conf/ARMADA38X @@ -81,6 +81,11 @@ device iicbus device twsi +# CESA +device cesa +device crypto +device cryptodev + #FDT options FDT options FDT_DTB_STATIC Index: head/sys/boot/fdt/dts/arm/armada-388-gp.dts =================================================================== --- head/sys/boot/fdt/dts/arm/armada-388-gp.dts +++ head/sys/boot/fdt/dts/arm/armada-388-gp.dts @@ -62,6 +62,13 @@ ranges = ; internal-regs { + crypto@90000 { + status = "okay"; + }; + crypto@92000 { + status = "okay"; + }; + spi@10600 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; Index: head/sys/boot/fdt/dts/arm/armada-38x.dtsi =================================================================== --- head/sys/boot/fdt/dts/arm/armada-38x.dtsi +++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi @@ -63,6 +63,8 @@ gpio1 = &gpio1; serial0 = &uart0; serial1 = &uart1; + sram0 = &SRAM0; + sram1 = &SRAM1; }; pmu { @@ -70,6 +72,16 @@ interrupts-extended = <&mpic 3>; }; + SRAM0: sram@f1100000 { + compatible = "mrvl,cesa-sram"; + reg = <0xf1100000 0x0010000>; + }; + + SRAM1: sram@f1110000 { + compatible = "mrvl,cesa-sram"; + reg = <0xf1110000 0x0010000>; + }; + soc { compatible = "marvell,armada380-mbus", "simple-bus"; #address-cells = <2>; @@ -140,6 +152,25 @@ #size-cells = <1>; ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>; + crypto@90000 { + compatible = "mrvl,cesa"; + reg = <0x90000 0x10000>; + interrupts = ; + interrupt-parent = <&gic>; + sram-handle = <&SRAM0>; + status = "disabled"; + }; + + crypto@92000 { + compatible = "mrvl,cesa"; + reg = <0x92000 0x1000 /* tdma base reg chan 1 */ + 0x9F000 0x1000>; /* cesa base reg chan 1 */ + interrupts = ; + interrupt-parent = <&gic>; + sram-handle = <&SRAM1>; + status = "disabled"; + }; + L2: cache-controller@8000 { compatible = "arm,pl310-cache"; reg = <0x8000 0x1000>; Index: head/sys/dev/cesa/cesa.c =================================================================== --- head/sys/dev/cesa/cesa.c +++ head/sys/dev/cesa/cesa.c @@ -1043,6 +1043,7 @@ switch (d) { case MV_DEV_88F6281: case MV_DEV_88F6282: + case MV_DEV_88F6828: sc->sc_tperr = 0; break; case MV_DEV_MV78100: @@ -1214,7 +1215,7 @@ /* Register in OCF */ sc->sc_cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE); - if (sc->sc_cid) { + if (sc->sc_cid < 0) { device_printf(dev, "could not get crypto driver id\n"); goto err8; }