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:
Kumar Gala 2018-11-03 06:50:44 -05:00 committed by Maureen Helm
commit bfc4281cc0
5 changed files with 62 additions and 0 deletions

View file

@ -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.

View file

@ -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";
};
};
};

View file

@ -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";
};
};
};

View 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
...

View file

@ -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 */