Commit graph

19 commits

Author SHA1 Message Date
David Leach 00b46686b1 drivers: lpc55s36: Remove deprecated CSS driver
CSS was deprecated from the mcu-sdk. Removing driver from lpc55s36
to clear build error.

This is a temporary patch to remove the build error.

Fixes #69961

Signed-off-by: David Leach <david.leach@nxp.com>
2024-04-10 14:11:34 -04:00
David Leach cde1573619 drivers: entropy: use non-cache intermediate buffer for RNG
The CAAM hardware needs to read RNG values into a non-cache
buffer. Since the contract to Zephyr RNG functions do not
require non-cache buffers, we use an intermediate non-cache
buffer to retrieve results.

Added a Kconfig to control the size of the intermediate buffer.

Fixes #53035

Signed-off-by: David Leach <david.leach@nxp.com>
2023-01-26 09:46:20 -06:00
Declan Snyder b5708e273b drivers: entropy: Fix MCUX CAAM Entropy
Re-enable the CAAM for entropy
now that the HAL driver has been fixed

Job descriptors must be accessed coherently
between CAAM DMA and core.

The M4 Cores still do not work
because of mpu/cache/kconfig arch complications,
disable caam for M4 cores in DTS

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-12-01 17:57:12 +01:00
Declan Snyder 0acfefed77 drivers: Add NXP CSS entropy driver
Add entropy driver using NXP CSS
Add Kconfig and DTS binding for the NXP CSSv2

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-11-02 16:54:10 -05:00
Declan Snyder 4baf7b9552 drivers: entropy: Disable CAAM driver
Temporarily disable CAAM driver because of bug in init on rt11xx

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-09-06 09:56:48 +02:00
Declan Snyder d556a0c8a6 drivers: entropy: Add entropy driver for MCUX CAAM
Added entropy shim driver for MCUX CAAM and Kconfig symbol

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2022-08-11 17:14:43 -05:00
Kumar Gala 2245bf89b7 drivers: entropy: Update drivers to use devicetree Kconfig symbol
Update entropy drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-25 09:39:10 +02:00
David Leach 569a1a0a5d soc: arm: nxp_imx: rt: Configure settings for TRNG IP
RT platforms that support TRNG IP (rt10xx and rt6xx) need to set
RNG and CSRNG to Xoroshiro and CTR_DRBG respectively instead of
using TRNG as random source.

Fixes: #37307

Signed-off-by: David Leach <david.leach@nxp.com>
2021-08-06 20:29:59 -04:00
Andrei Gansari 5b02519d8f drivers: entropy_mcux_rng LPC entropy
Added RNG device used by LPC family devices to generate random numbers.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-05-07 23:25:31 -05:00
Kumar Gala 8b6930ebef drivers: entropy: Remove Kconfig HAS_DTS_ENTROPY
Now that all entropy drivers use DTS we can remove HAS_DTS_ENTROPY being
set everywhere as well as Kconfig ENTROPY_NAME since that is now coming
from DT_ENTROPY_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-13 09:14:21 -05:00
Ulf Magnusson bd6e04411e kconfig: Clean up header comments and make them consistent
Use this short header style in all Kconfig files:

    # <description>

    # <copyright>
    # <license>

    ...

Also change all <description>s from

    # Kconfig[.extension] - Foo-related options

to just

    # Foo-related options

It's clear enough that it's about Kconfig.

The <description> cleanup was done with this command, along with some
manual cleanup (big letter at the start, etc.)

    git ls-files '*Kconfig*' | \
        xargs sed -i -E '1 s/#\s*Kconfig[\w.-]*\s*-\s*/# /'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-11-04 17:31:27 -05:00
Ulf Magnusson 677f1e6db9 kconfig: Turn pointless/confusing 'menuconfig's into 'config's
Defining a symbol with 'menuconfig' just tells the menuconfig to display
any dependent symbols that immediately follow it in a separate menu.
'menuconfig' has no effect on symbol values.

Making a symbol that doesn't have any dependent symbols after it a
'menuconfig' should be avoided, because then you end up with an empty
menu, which is shown as e.g.

    [*] Enable foo ---

This is how it would be shown if there were children but they all
happened to be invisible as well.

With a regular 'config', it turns into

    [*] Enable foo

Change all pointless 'menuconfig's to 'config's.

See the section on 'menuconfig' on the Kconfig - Tips and Best Practices
page as well.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-10-22 13:53:06 -05:00
Ulf Magnusson 61bcd766f7 kconfig: drivers: entropy: Remove duplicated ENTROPY_GENERATOR deps.
Also remove some duplicated dependencies for the related symbol
ENTROPY_NRF5_RNG.

The redundant ENTROPY_GENERATOR deps. are in files sourced within a

  if ENTROPY_GENERATOR
  ...
  endif

block in drivers/entropy/Kconfig.

The redundant ENTROPY_NRF5_RNG deps. are due to redundant 'depends on'
within an 'if' in the same file.

Tip: Jump to symbols with '/' in the menuconfig and press '?' to check
their dependencies. If there are duplicated dependencies, the
'included via ...' path can be handy to discover where they are added.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-07 13:38:35 +01:00
Kumar Gala bfc4281cc0 arm: kinetis: Add basic DTS support for TRNG
Add dts binding and info for TRNG device and enable basic support to
get the device name from DTS.  We leave for now the base addresses
coming from the MCUX HAL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 08:49:50 -06:00
Kumar Gala 727a9a7f99 arm: kinetis: Add basic DTS support for RNGA
Add dts binding and info for RNGA device and enable basic support to
get the device name from DTS.  We leave for now the base addresses
coming from the MCUX HAL.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-11-06 08:49:50 -06:00
Ulf Magnusson 00ab5ed22a drivers: entropy: Kconfig: Remove redundant 'default n' properties
Bool symbols implicitly default to 'n'.

A 'default n' can make sense e.g. in a Kconfig.defconfig file, if you
want to override a 'default y' on the base definition of the symbol. It
isn't used like that on any of these symbols though, and is
inconsistent.

This will make the auto-generated Kconfig documentation have "No
defaults. Implicitly defaults to n." as well, which is clearer than
'default n if ...'

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-03 17:11:31 -04:00
Ulf Magnusson 93689bdc80 kconfig: Remove no-op selects of choice symbols
Selecting a choice symbol is always a no-op, and the latest version of
Kconfiglib prints a warning. This commit removes all selects of choice
symbols, which might make the Kconfig files a bit clearer and gets rid
of the warnings.

This is just a dumb removal. I did not try to guess the intent of each
select.

Fixes #6849

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2018-03-29 08:57:39 -04:00
Leandro Pereira 8b883a61a3 subsys/random: sys_rand32_get() implementation that uses entropy API
Instead of every hardware number generator driver providing an
implementation of this function, use the random device API to
centralize the implementation of this function.

This is a very simplistic function that can be seen as a stepping stone
to refactor the random number generation in Zephyr.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Leandro Pereira da9b0ddf5b drivers: Rename random to entropy
This should clear up some of the confusion with random number
generators and drivers that obtain entropy from the hardware.  Also,
many hardware number generators have limited bandwidth, so it's natural
for their output to be only used for seeding a random number generator.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-11-01 08:26:29 -04:00
Renamed from drivers/random/Kconfig.mcux (Browse further)