drivers: flash: NXP KL2X/KW4xZ: Add device tree support

Add device tree support for the "nxp,kinetis-ftfa" flash controller used
on the NXP KL2X and KW4xZ SoCs.

Fixes: #5788

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2018-01-29 13:24:08 -06:00 committed by Maureen Helm
commit b8173d960e
6 changed files with 74 additions and 15 deletions

View file

@ -0,0 +1,6 @@
/* SoC level DTS fixup file */
#define FLASH_DEV_BASE_ADDRESS NXP_KINETIS_FTFA_40020000_BASE_ADDRESS_0
#define FLASH_DEV_NAME NXP_KINETIS_FTFA_40020000_LABEL
/* End of SoC Level DTS fixup file */

View file

@ -5,4 +5,8 @@
#define FLASH_DEV_NAME NXP_KINETIS_FTFL_40020000_LABEL
#endif /* CONFIG_SOC_MKW22D5 || CONFIG_SOC_MKW24D5 */
#if defined(CONFIG_SOC_MKW40Z4) || defined(CONFIG_SOC_MKW41Z4)
#define FLASH_DEV_BASE_ADDRESS NXP_KINETIS_FTFA_40020000_BASE_ADDRESS_0
#define FLASH_DEV_NAME NXP_KINETIS_FTFA_40020000_LABEL
#endif /* CONFIG_SOC_MKW40Z4 || CONFIG_SOC_MKW41Z4 */
/* End of SoC Level DTS fixup file */

View file

@ -21,12 +21,22 @@
};
soc {
flash-controller@40020000 {
compatible = "nxp,kinetis-ftfa";
label = "FLASH_CTRL";
reg = <0x40020000 0x14>;
interrupts = <5 0>;
#address-cells = <1>;
#size-cells = <1>;
flash0: flash@0 {
compatible = "soc-nv-flash";
label = "MCUX_FLASH";
reg = <0 0x20000>;
write-block-size = <4>;
};
};
i2c0: i2c@40066000 {
compatible = "nxp,kinetis-i2c";

View file

@ -49,12 +49,22 @@
#clocks-cells = <3>;
};
flash-controller@40020000 {
compatible = "nxp,kinetis-ftfa";
label = "FLASH_CTRL";
reg = <0x40020000 0x2c>;
interrupts = <5 0>;
#address-cells = <1>;
#size-cells = <1>;
flash0: flash@0 {
compatible = "soc-nv-flash";
label = "MCUX_FLASH";
reg = <0 0x80000>;
write-block-size = <4>;
};
};
i2c0: i2c@40066000 {
compatible = "nxp,kinetis-i2c";

View file

@ -49,12 +49,22 @@
#clocks-cells = <3>;
};
flash-controller@40020000 {
compatible = "nxp,kinetis-ftfa";
label = "FLASH_CTRL";
reg = <0x40020000 0x2c>;
interrupts = <5 0>;
#address-cells = <1>;
#size-cells = <1>;
flash0: flash@0 {
compatible = "soc-nv-flash";
label = "MCUX_FLASH";
reg = <0 0x80000>;
write-block-size = <4>;
};
};
i2c0: i2c@40066000 {
compatible = "nxp,kinetis-i2c";

View file

@ -0,0 +1,19 @@
---
title: NXP Kinetis Flash Memory Module (FTFA)
id: nxp,kinetis-ftfa
version: 0.1
description: >
This binding gives for the NXP Kinetis Flash Memory Module A (FTFA)
inherits:
!include flash-controller.yaml
properties:
compatible:
type: string
category: required
description: compatible strings
constraint: "nxp,kinetis-ftfa"
...