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>
This commit is contained in:
Kumar Gala 2018-11-03 06:50:08 -05:00 committed by Maureen Helm
commit 727a9a7f99
6 changed files with 68 additions and 0 deletions

View file

@ -8,6 +8,7 @@ menuconfig ENTROPY_MCUX_RNGA
bool "MCUX RNGA driver"
depends on ENTROPY_GENERATOR && HAS_MCUX_RNGA
select ENTROPY_HAS_DRIVER
select HAS_DTS_ENTROPY
help
This option enables the random number generator accelerator (RNGA)
driver based on the MCUX RNGA driver.

View file

@ -409,6 +409,14 @@
interrupts-names = "IEEE1588_TMR";
};
};
rnga: random@40029000 {
compatible = "nxp,kinetis-rnga";
reg = <0x40029000 0x1000>;
status = "ok";
interrupts = <23 0>;
label = "RNGA";
};
};
};

View file

@ -326,6 +326,14 @@
status = "disabled";
label = "USBD";
};
rnga: random@40029000 {
compatible = "nxp,kinetis-rnga";
reg = <0x40029000 0x1000>;
status = "ok";
interrupts = <23 0>;
label = "RNGA";
};
};
};

View file

@ -0,0 +1,39 @@
#
# Copyright (c) 2018, Linaro Limited
#
# SPDX-License-Identifier: Apache-2.0
#
---
title: Kinetis RNGA (Random Number Generator Accelerator)
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-rnga"
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

@ -135,4 +135,10 @@
#define CONFIG_IRQ_ETH_ERR_MISC NXP_KINETIS_ETHERNET_400C0004_IRQ_ERR_MISC
#define CONFIG_ETH_MCUX_0_IRQ_PRI NXP_KINETIS_ETHERNET_400C0004_IRQ_RX_PRIORITY
#define CONFIG_ENTROPY_MCUX_RNGA_BASE_ADDRESS NXP_KINETIS_RNGA_40029000_BASE_ADDRESS
#define CONFIG_ENTROPY_MCUX_RNGA_IRQ NXP_KINETIS_RNGA_40029000_IRQ_0
#define CONFIG_ENTROPY_MCUX_RNGA_IRQ_PRI NXP_KINETIS_RNGA_40029000_IRQ_0_PRIORITY
#define CONFIG_ENTROPY_MCUX_RNGA_NAME NXP_KINETIS_RNGA_40029000_LABEL
#define CONFIG_ENTROPY_NAME NXP_KINETIS_RNGA_40029000_LABEL
/* End of SoC Level DTS fixup file */

View file

@ -110,6 +110,12 @@
#define CONFIG_USBD_KINETIS_IRQ_PRI NXP_KINETIS_USBD_40072000_IRQ_USB_OTG_PRIORITY
#define CONFIG_USBD_KINETIS_BASE_ADDRESS NXP_KINETIS_USBD_40072000_BASE_ADDRESS
#define CONFIG_USBD_KINETIS_NUM_BIDIR_EP NXP_KINETIS_USBD_40072000_NUM_BIDIR_ENDPOINTS
#define CONFIG_ENTROPY_MCUX_RNGA_BASE_ADDRESS NXP_KINETIS_RNGA_40029000_BASE_ADDRESS
#define CONFIG_ENTROPY_MCUX_RNGA_IRQ NXP_KINETIS_RNGA_40029000_IRQ_0
#define CONFIG_ENTROPY_MCUX_RNGA_IRQ_PRI NXP_KINETIS_RNGA_40029000_IRQ_0_PRIORITY
#define CONFIG_ENTROPY_MCUX_RNGA_NAME NXP_KINETIS_RNGA_40029000_LABEL
#define CONFIG_ENTROPY_NAME NXP_KINETIS_RNGA_40029000_LABEL
#endif /* CONFIG_SOC_MKW22D5 || CONFIG_SOC_MKW24D5 */
#if defined(CONFIG_SOC_MKW40Z4) || defined(CONFIG_SOC_MKW41Z4)