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:
parent
a394693d2f
commit
b8173d960e
6 changed files with 74 additions and 15 deletions
6
arch/arm/soc/nxp_kinetis/kl2x/dts.fixup
Normal file
6
arch/arm/soc/nxp_kinetis/kl2x/dts.fixup
Normal 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 */
|
|
@ -5,4 +5,8 @@
|
||||||
#define FLASH_DEV_NAME NXP_KINETIS_FTFL_40020000_LABEL
|
#define FLASH_DEV_NAME NXP_KINETIS_FTFL_40020000_LABEL
|
||||||
#endif /* CONFIG_SOC_MKW22D5 || CONFIG_SOC_MKW24D5 */
|
#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 */
|
/* End of SoC Level DTS fixup file */
|
||||||
|
|
|
@ -21,11 +21,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
soc {
|
soc {
|
||||||
flash0: flash@0 {
|
flash-controller@40020000 {
|
||||||
compatible = "soc-nv-flash";
|
compatible = "nxp,kinetis-ftfa";
|
||||||
label = "MCUX_FLASH";
|
label = "FLASH_CTRL";
|
||||||
reg = <0 0x20000>;
|
reg = <0x40020000 0x14>;
|
||||||
write-block-size = <4>;
|
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 {
|
i2c0: i2c@40066000 {
|
||||||
|
|
|
@ -49,11 +49,21 @@
|
||||||
#clocks-cells = <3>;
|
#clocks-cells = <3>;
|
||||||
};
|
};
|
||||||
|
|
||||||
flash0: flash@0 {
|
flash-controller@40020000 {
|
||||||
compatible = "soc-nv-flash";
|
compatible = "nxp,kinetis-ftfa";
|
||||||
label = "MCUX_FLASH";
|
label = "FLASH_CTRL";
|
||||||
reg = <0 0x80000>;
|
reg = <0x40020000 0x2c>;
|
||||||
write-block-size = <4>;
|
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 {
|
i2c0: i2c@40066000 {
|
||||||
|
|
|
@ -49,11 +49,21 @@
|
||||||
#clocks-cells = <3>;
|
#clocks-cells = <3>;
|
||||||
};
|
};
|
||||||
|
|
||||||
flash0: flash@0 {
|
flash-controller@40020000 {
|
||||||
compatible = "soc-nv-flash";
|
compatible = "nxp,kinetis-ftfa";
|
||||||
label = "MCUX_FLASH";
|
label = "FLASH_CTRL";
|
||||||
reg = <0 0x80000>;
|
reg = <0x40020000 0x2c>;
|
||||||
write-block-size = <4>;
|
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 {
|
i2c0: i2c@40066000 {
|
||||||
|
|
19
dts/bindings/flash_controller/nxp,kinetis-ftfa.yaml
Normal file
19
dts/bindings/flash_controller/nxp,kinetis-ftfa.yaml
Normal 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"
|
||||||
|
|
||||||
|
...
|
Loading…
Add table
Add a link
Reference in a new issue