mbox series

[v1,00/24] Support more Amlogic SoC families in crypto driver

Message ID 20240110201216.18016-1-avromanov@salutedevices.com (mailing list archive)
Headers show
Series Support more Amlogic SoC families in crypto driver | expand

Message

Alexey Romanov Jan. 10, 2024, 8:11 p.m. UTC
Hello!

This patchset expand the funcionality of the Amlogic
crypto driver by adding support for more SoC families: 
AXG, G12A, G12B, SM1, A1, S4.

Also specify and enable crypto node in device tree
for reference Amlogic devices.

Tested on AXG, G12A/B, SM1, A1 and S4 devices via
custom tests and trcypt module.

Alexey Romanov (17):
  drivers: crypto: meson: don't hardcode IRQ count
  drivers: crypto: meson: make CLK controller optional
  drviers: crypto: meson: add platform data
  drivers: crypto: meson: add MMIO helpers
  drivers: crypto: meson: move get_engine_number()
  drivers: crypto: meson: use fallback for 192-bit keys
  drivers: crypto: meson: add support for G12-series
  drivers: crypto: meson: add support for AXG-series
  dt-bindings: crypto: meson: add new compatibles
  arch: arm64: dts: meson: a1: add crypto node
  arch: arm64: dts: meson: s4: add crypto node
  arch: arm64: dts: meson: g12: add crypto node
  arch: arm64: dts: meson: axg: add crypto node
  arch: arm64: dts: meson: s4-s805x2-aq222: enable crypto node
  arch: arm64: dts: meson: a1-ad401: enable crypto node
  arch: arm64: dts: meson: axg-s400: enable crypto node
  arch: arm64: dts: meson: g12a-u200: enable crypto node

Jan Dakinevich (7):
  drivers: crypto: meson: drop status field from meson_flow
  drivers: crypto: meson: move algs definition and cipher API to
    cipher.c
  drivers: crypto: meson: cleanup defines
  drivers: crypto: meson: process more than MAXDESCS descriptors
  drivers: crypto: meson: avoid kzalloc in engine thread
  drivers: crypto: meson: introduce hasher
  drivers: crypto: meson: add support for AES-CTR

 .../bindings/crypto/amlogic,gxl-crypto.yaml   |   2 +
 .../arm64/boot/dts/amlogic/meson-a1-ad401.dts |   4 +
 arch/arm64/boot/dts/amlogic/meson-a1.dtsi     |   8 +
 .../arm64/boot/dts/amlogic/meson-axg-s400.dts |   4 +
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi    |   7 +
 .../boot/dts/amlogic/meson-g12-common.dtsi    |   7 +
 .../boot/dts/amlogic/meson-g12a-u200.dts      |   4 +
 .../dts/amlogic/meson-s4-s805x2-aq222.dts     |   4 +
 arch/arm64/boot/dts/amlogic/meson-s4.dtsi     |   7 +
 drivers/crypto/amlogic/Makefile               |   2 +-
 drivers/crypto/amlogic/amlogic-gxl-cipher.c   | 591 ++++++++++++------
 drivers/crypto/amlogic/amlogic-gxl-core.c     | 260 ++++----
 drivers/crypto/amlogic/amlogic-gxl-hasher.c   | 448 +++++++++++++
 drivers/crypto/amlogic/amlogic-gxl.h          | 116 +++-
 14 files changed, 1135 insertions(+), 329 deletions(-)
 create mode 100644 drivers/crypto/amlogic/amlogic-gxl-hasher.c

Comments

Corentin Labbe Jan. 10, 2024, 9:08 p.m. UTC | #1
Le Wed, Jan 10, 2024 at 11:11:16PM +0300, Alexey Romanov a écrit :
> Hello!
> 
> This patchset expand the funcionality of the Amlogic
> crypto driver by adding support for more SoC families: 
> AXG, G12A, G12B, SM1, A1, S4.
> 
> Also specify and enable crypto node in device tree
> for reference Amlogic devices.
> 
> Tested on AXG, G12A/B, SM1, A1 and S4 devices via
> custom tests and trcypt module.

Hello

Thanks for your patch series.
Unfortunatly, I fail to apply it for testing on top of linux-next.
On top of which tree did you have tested ?
According to patch 01, you used a tree based before "crypto: amlogic - Use new crypto_engine_op interface" so too old.

Regards
Neil Armstrong Jan. 11, 2024, 8:19 a.m. UTC | #2
Hi !

On 10/01/2024 21:11, Alexey Romanov wrote:
> Hello!
> 
> This patchset expand the funcionality of the Amlogic
> crypto driver by adding support for more SoC families:
> AXG, G12A, G12B, SM1, A1, S4.
> 
> Also specify and enable crypto node in device tree
> for reference Amlogic devices.
> 
> Tested on AXG, G12A/B, SM1, A1 and S4 devices via
> custom tests and trcypt module.

Thanks a lot for the patchset, it's very welcome!

Could you provide some procedure used to test and test dumps for all the platforms, like `cryptsetup benchmark` or a summary of tcrypt tests output ?

Thanks,
Neil

> 
> Alexey Romanov (17):
>    drivers: crypto: meson: don't hardcode IRQ count
>    drivers: crypto: meson: make CLK controller optional
>    drviers: crypto: meson: add platform data
>    drivers: crypto: meson: add MMIO helpers
>    drivers: crypto: meson: move get_engine_number()
>    drivers: crypto: meson: use fallback for 192-bit keys
>    drivers: crypto: meson: add support for G12-series
>    drivers: crypto: meson: add support for AXG-series
>    dt-bindings: crypto: meson: add new compatibles
>    arch: arm64: dts: meson: a1: add crypto node
>    arch: arm64: dts: meson: s4: add crypto node
>    arch: arm64: dts: meson: g12: add crypto node
>    arch: arm64: dts: meson: axg: add crypto node
>    arch: arm64: dts: meson: s4-s805x2-aq222: enable crypto node
>    arch: arm64: dts: meson: a1-ad401: enable crypto node
>    arch: arm64: dts: meson: axg-s400: enable crypto node
>    arch: arm64: dts: meson: g12a-u200: enable crypto node
> 
> Jan Dakinevich (7):
>    drivers: crypto: meson: drop status field from meson_flow
>    drivers: crypto: meson: move algs definition and cipher API to
>      cipher.c
>    drivers: crypto: meson: cleanup defines
>    drivers: crypto: meson: process more than MAXDESCS descriptors
>    drivers: crypto: meson: avoid kzalloc in engine thread
>    drivers: crypto: meson: introduce hasher
>    drivers: crypto: meson: add support for AES-CTR
> 
>   .../bindings/crypto/amlogic,gxl-crypto.yaml   |   2 +
>   .../arm64/boot/dts/amlogic/meson-a1-ad401.dts |   4 +
>   arch/arm64/boot/dts/amlogic/meson-a1.dtsi     |   8 +
>   .../arm64/boot/dts/amlogic/meson-axg-s400.dts |   4 +
>   arch/arm64/boot/dts/amlogic/meson-axg.dtsi    |   7 +
>   .../boot/dts/amlogic/meson-g12-common.dtsi    |   7 +
>   .../boot/dts/amlogic/meson-g12a-u200.dts      |   4 +
>   .../dts/amlogic/meson-s4-s805x2-aq222.dts     |   4 +
>   arch/arm64/boot/dts/amlogic/meson-s4.dtsi     |   7 +
>   drivers/crypto/amlogic/Makefile               |   2 +-
>   drivers/crypto/amlogic/amlogic-gxl-cipher.c   | 591 ++++++++++++------
>   drivers/crypto/amlogic/amlogic-gxl-core.c     | 260 ++++----
>   drivers/crypto/amlogic/amlogic-gxl-hasher.c   | 448 +++++++++++++
>   drivers/crypto/amlogic/amlogic-gxl.h          | 116 +++-
>   14 files changed, 1135 insertions(+), 329 deletions(-)
>   create mode 100644 drivers/crypto/amlogic/amlogic-gxl-hasher.c
>
Alexey Romanov Jan. 11, 2024, 9:18 a.m. UTC | #3
Hello!

On Wed, Jan 10, 2024 at 10:08:15PM +0100, Corentin Labbe wrote:
> Le Wed, Jan 10, 2024 at 11:11:16PM +0300, Alexey Romanov a 'ecrit :
> > Hello!
> > 
> > This patchset expand the funcionality of the Amlogic
> > crypto driver by adding support for more SoC families: 
> > AXG, G12A, G12B, SM1, A1, S4.
> > 
> > Also specify and enable crypto node in device tree
> > for reference Amlogic devices.
> > 
> > Tested on AXG, G12A/B, SM1, A1 and S4 devices via
> > custom tests and trcypt module.
> 
> Hello
> 
> Thanks for your patch series.
> Unfortunatly, I fail to apply it for testing on top of linux-next.
> On top of which tree did you have tested ?

We use 6.5-rc3.

> According to patch 01, you used a tree based before "crypto: amlogic - Use new crypto_engine_op interface" so too old.

Will rebase over linux-next in v2.

> 
> Regards
Krzysztof Kozlowski Jan. 11, 2024, 9:29 a.m. UTC | #4
On 11/01/2024 10:18, Alexey Romanov wrote:
> Hello!
> 
> On Wed, Jan 10, 2024 at 10:08:15PM +0100, Corentin Labbe wrote:
>> Le Wed, Jan 10, 2024 at 11:11:16PM +0300, Alexey Romanov a 'ecrit :
>>> Hello!
>>>
>>> This patchset expand the funcionality of the Amlogic
>>> crypto driver by adding support for more SoC families: 
>>> AXG, G12A, G12B, SM1, A1, S4.
>>>
>>> Also specify and enable crypto node in device tree
>>> for reference Amlogic devices.
>>>
>>> Tested on AXG, G12A/B, SM1, A1 and S4 devices via
>>> custom tests and trcypt module.
>>
>> Hello
>>
>> Thanks for your patch series.
>> Unfortunatly, I fail to apply it for testing on top of linux-next.
>> On top of which tree did you have tested ?
> 
> We use 6.5-rc3.

Don't develop on old trees... I mean, internally you can do whatever you
wish, but don't work upstream on such trees.

Best regards,
Krzysztof
Krzysztof Kozlowski Jan. 11, 2024, 9:31 a.m. UTC | #5
On 11/01/2024 10:29, Krzysztof Kozlowski wrote:
> On 11/01/2024 10:18, Alexey Romanov wrote:
>> Hello!
>>
>> On Wed, Jan 10, 2024 at 10:08:15PM +0100, Corentin Labbe wrote:
>>> Le Wed, Jan 10, 2024 at 11:11:16PM +0300, Alexey Romanov a 'ecrit :
>>>> Hello!
>>>>
>>>> This patchset expand the funcionality of the Amlogic
>>>> crypto driver by adding support for more SoC families: 
>>>> AXG, G12A, G12B, SM1, A1, S4.
>>>>
>>>> Also specify and enable crypto node in device tree
>>>> for reference Amlogic devices.
>>>>
>>>> Tested on AXG, G12A/B, SM1, A1 and S4 devices via
>>>> custom tests and trcypt module.
>>>
>>> Hello
>>>
>>> Thanks for your patch series.
>>> Unfortunatly, I fail to apply it for testing on top of linux-next.
>>> On top of which tree did you have tested ?
>>
>> We use 6.5-rc3.
> 
> Don't develop on old trees... I mean, internally you can do whatever you
> wish, but don't work upstream on such trees.

Number of email bounces also prove the point: you did not Cc right
people due to work on some ancient files.

Best regards,
Krzysztof
Alexey Romanov Jan. 11, 2024, 9:33 a.m. UTC | #6
Hi Neil,

On Thu, Jan 11, 2024 at 09:19:11AM +0100, neil.armstrong@linaro.org wrote:
> Hi !
> 
> On 10/01/2024 21:11, Alexey Romanov wrote:
> > Hello!
> > 
> > This patchset expand the funcionality of the Amlogic
> > crypto driver by adding support for more SoC families:
> > AXG, G12A, G12B, SM1, A1, S4.
> > 
> > Also specify and enable crypto node in device tree
> > for reference Amlogic devices.
> > 
> > Tested on AXG, G12A/B, SM1, A1 and S4 devices via
> > custom tests and trcypt module.
> 
> Thanks a lot for the patchset, it's very welcome!
> 
> Could you provide some procedure used to test and test dumps for all the platforms, like `cryptsetup benchmark` or a summary of tcrypt tests output ?

We use the following kernel module:

https://gist.github.com/mRrvz/8d9277d57abb4d21568725785ec9e939

and don't forget to define reserved memory region in device tree.

> 
> Thanks,
> Neil
> 
> > 
> > Alexey Romanov (17):
> >    drivers: crypto: meson: don't hardcode IRQ count
> >    drivers: crypto: meson: make CLK controller optional
> >    drviers: crypto: meson: add platform data
> >    drivers: crypto: meson: add MMIO helpers
> >    drivers: crypto: meson: move get_engine_number()
> >    drivers: crypto: meson: use fallback for 192-bit keys
> >    drivers: crypto: meson: add support for G12-series
> >    drivers: crypto: meson: add support for AXG-series
> >    dt-bindings: crypto: meson: add new compatibles
> >    arch: arm64: dts: meson: a1: add crypto node
> >    arch: arm64: dts: meson: s4: add crypto node
> >    arch: arm64: dts: meson: g12: add crypto node
> >    arch: arm64: dts: meson: axg: add crypto node
> >    arch: arm64: dts: meson: s4-s805x2-aq222: enable crypto node
> >    arch: arm64: dts: meson: a1-ad401: enable crypto node
> >    arch: arm64: dts: meson: axg-s400: enable crypto node
> >    arch: arm64: dts: meson: g12a-u200: enable crypto node
> > 
> > Jan Dakinevich (7):
> >    drivers: crypto: meson: drop status field from meson_flow
> >    drivers: crypto: meson: move algs definition and cipher API to
> >      cipher.c
> >    drivers: crypto: meson: cleanup defines
> >    drivers: crypto: meson: process more than MAXDESCS descriptors
> >    drivers: crypto: meson: avoid kzalloc in engine thread
> >    drivers: crypto: meson: introduce hasher
> >    drivers: crypto: meson: add support for AES-CTR
> > 
> >   .../bindings/crypto/amlogic,gxl-crypto.yaml   |   2 +
> >   .../arm64/boot/dts/amlogic/meson-a1-ad401.dts |   4 +
> >   arch/arm64/boot/dts/amlogic/meson-a1.dtsi     |   8 +
> >   .../arm64/boot/dts/amlogic/meson-axg-s400.dts |   4 +
> >   arch/arm64/boot/dts/amlogic/meson-axg.dtsi    |   7 +
> >   .../boot/dts/amlogic/meson-g12-common.dtsi    |   7 +
> >   .../boot/dts/amlogic/meson-g12a-u200.dts      |   4 +
> >   .../dts/amlogic/meson-s4-s805x2-aq222.dts     |   4 +
> >   arch/arm64/boot/dts/amlogic/meson-s4.dtsi     |   7 +
> >   drivers/crypto/amlogic/Makefile               |   2 +-
> >   drivers/crypto/amlogic/amlogic-gxl-cipher.c   | 591 ++++++++++++------
> >   drivers/crypto/amlogic/amlogic-gxl-core.c     | 260 ++++----
> >   drivers/crypto/amlogic/amlogic-gxl-hasher.c   | 448 +++++++++++++
> >   drivers/crypto/amlogic/amlogic-gxl.h          | 116 +++-
> >   14 files changed, 1135 insertions(+), 329 deletions(-)
> >   create mode 100644 drivers/crypto/amlogic/amlogic-gxl-hasher.c
> > 
>