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>
This commit is contained in:
parent
727a9a7f99
commit
bfc4281cc0
5 changed files with 62 additions and 0 deletions
|
@ -17,6 +17,7 @@ menuconfig ENTROPY_MCUX_TRNG
|
|||
bool "MCUX TRNG driver"
|
||||
depends on ENTROPY_GENERATOR && HAS_MCUX_TRNG
|
||||
select ENTROPY_HAS_DRIVER
|
||||
select HAS_DTS_ENTROPY
|
||||
help
|
||||
This option enables the true random number generator (TRNG)
|
||||
driver based on the MCUX TRNG driver.
|
||||
|
|
|
@ -244,6 +244,14 @@
|
|||
label = "ADC_0";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
trng: random@40029000 {
|
||||
compatible = "nxp,kinetis-trng";
|
||||
reg = <0x40029000 0x1000>;
|
||||
status = "ok";
|
||||
interrupts = <13 0>;
|
||||
label = "TRNG";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -247,6 +247,14 @@
|
|||
label = "ADC_0";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
trng: random@40029000 {
|
||||
compatible = "nxp,kinetis-trng";
|
||||
reg = <0x40029000 0x1000>;
|
||||
status = "ok";
|
||||
interrupts = <13 0>;
|
||||
label = "TRNG";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
39
dts/bindings/rng/nxp,kinetis-trng.yaml
Normal file
39
dts/bindings/rng/nxp,kinetis-trng.yaml
Normal file
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# Copyright (c) 2018, Linaro Limited
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
---
|
||||
title: Kinetis TRNG (True Random Number Generator)
|
||||
version: 0.1
|
||||
|
||||
description: >
|
||||
This binding gives a base representation of the Kinetis RNGA
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
type: string
|
||||
category: required
|
||||
description: compatible strings
|
||||
constraint: "nxp,kinetis-trng"
|
||||
generation: define
|
||||
|
||||
reg:
|
||||
type: int
|
||||
description: mmio register space
|
||||
generation: define
|
||||
category: required
|
||||
|
||||
interrupts:
|
||||
type: compound
|
||||
category: required
|
||||
description: required interrupts
|
||||
generation: define
|
||||
|
||||
label:
|
||||
type: string
|
||||
category: required
|
||||
description: Human readable string describing the device (used by Zephyr for API name)
|
||||
generation: define
|
||||
|
||||
...
|
|
@ -145,5 +145,11 @@
|
|||
#define CONFIG_SPI_1_CLOCK_NAME NXP_KINETIS_DSPI_4002D000_CLOCK_CONTROLLER
|
||||
#define CONFIG_SPI_1_CLOCK_SUBSYS NXP_KINETIS_DSPI_4002D000_CLOCK_NAME
|
||||
|
||||
#define CONFIG_ENTROPY_MCUX_TRNG_BASE_ADDRESS NXP_KINETIS_TRNG_40029000_BASE_ADDRESS
|
||||
#define CONFIG_ENTROPY_MCUX_TRNG_IRQ NXP_KINETIS_TRNG_40029000_IRQ_0
|
||||
#define CONFIG_ENTROPY_MCUX_TRNG_IRQ_PRI NXP_KINETIS_TRNG_40029000_IRQ_0_PRIORITY
|
||||
#define CONFIG_ENTROPY_MCUX_TRNG_NAME NXP_KINETIS_TRNG_40029000_LABEL
|
||||
#define CONFIG_ENTROPY_NAME NXP_KINETIS_TRNG_40029000_LABEL
|
||||
|
||||
#endif /* CONFIG_SOC_MKW40Z4 || CONFIG_SOC_MKW41Z4 */
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue