Skip to content

Commit b8173d9

Browse files
galakMaureenHelm
authored andcommitted
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 <[email protected]>
1 parent a394693 commit b8173d9

File tree

6 files changed

+74
-15
lines changed

6 files changed

+74
-15
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* SoC level DTS fixup file */
2+
3+
#define FLASH_DEV_BASE_ADDRESS NXP_KINETIS_FTFA_40020000_BASE_ADDRESS_0
4+
#define FLASH_DEV_NAME NXP_KINETIS_FTFA_40020000_LABEL
5+
6+
/* End of SoC Level DTS fixup file */

arch/arm/soc/nxp_kinetis/kwx/dts.fixup

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55
#define FLASH_DEV_NAME NXP_KINETIS_FTFL_40020000_LABEL
66
#endif /* CONFIG_SOC_MKW22D5 || CONFIG_SOC_MKW24D5 */
77

8+
#if defined(CONFIG_SOC_MKW40Z4) || defined(CONFIG_SOC_MKW41Z4)
9+
#define FLASH_DEV_BASE_ADDRESS NXP_KINETIS_FTFA_40020000_BASE_ADDRESS_0
10+
#define FLASH_DEV_NAME NXP_KINETIS_FTFA_40020000_LABEL
11+
#endif /* CONFIG_SOC_MKW40Z4 || CONFIG_SOC_MKW41Z4 */
812
/* End of SoC Level DTS fixup file */

dts/arm/nxp/nxp_kl25z.dtsi

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,21 @@
2121
};
2222

2323
soc {
24-
flash0: flash@0 {
25-
compatible = "soc-nv-flash";
26-
label = "MCUX_FLASH";
27-
reg = <0 0x20000>;
28-
write-block-size = <4>;
24+
flash-controller@40020000 {
25+
compatible = "nxp,kinetis-ftfa";
26+
label = "FLASH_CTRL";
27+
reg = <0x40020000 0x14>;
28+
interrupts = <5 0>;
29+
30+
#address-cells = <1>;
31+
#size-cells = <1>;
32+
33+
flash0: flash@0 {
34+
compatible = "soc-nv-flash";
35+
label = "MCUX_FLASH";
36+
reg = <0 0x20000>;
37+
write-block-size = <4>;
38+
};
2939
};
3040

3141
i2c0: i2c@40066000 {

dts/arm/nxp/nxp_kw40z.dtsi

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,21 @@
4949
#clocks-cells = <3>;
5050
};
5151

52-
flash0: flash@0 {
53-
compatible = "soc-nv-flash";
54-
label = "MCUX_FLASH";
55-
reg = <0 0x80000>;
56-
write-block-size = <4>;
52+
flash-controller@40020000 {
53+
compatible = "nxp,kinetis-ftfa";
54+
label = "FLASH_CTRL";
55+
reg = <0x40020000 0x2c>;
56+
interrupts = <5 0>;
57+
58+
#address-cells = <1>;
59+
#size-cells = <1>;
60+
61+
flash0: flash@0 {
62+
compatible = "soc-nv-flash";
63+
label = "MCUX_FLASH";
64+
reg = <0 0x80000>;
65+
write-block-size = <4>;
66+
};
5767
};
5868

5969
i2c0: i2c@40066000 {

dts/arm/nxp/nxp_kw41z.dtsi

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,21 @@
4949
#clocks-cells = <3>;
5050
};
5151

52-
flash0: flash@0 {
53-
compatible = "soc-nv-flash";
54-
label = "MCUX_FLASH";
55-
reg = <0 0x80000>;
56-
write-block-size = <4>;
52+
flash-controller@40020000 {
53+
compatible = "nxp,kinetis-ftfa";
54+
label = "FLASH_CTRL";
55+
reg = <0x40020000 0x2c>;
56+
interrupts = <5 0>;
57+
58+
#address-cells = <1>;
59+
#size-cells = <1>;
60+
61+
flash0: flash@0 {
62+
compatible = "soc-nv-flash";
63+
label = "MCUX_FLASH";
64+
reg = <0 0x80000>;
65+
write-block-size = <4>;
66+
};
5767
};
5868

5969
i2c0: i2c@40066000 {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: NXP Kinetis Flash Memory Module (FTFA)
3+
id: nxp,kinetis-ftfa
4+
version: 0.1
5+
6+
description: >
7+
This binding gives for the NXP Kinetis Flash Memory Module A (FTFA)
8+
9+
inherits:
10+
!include flash-controller.yaml
11+
12+
properties:
13+
compatible:
14+
type: string
15+
category: required
16+
description: compatible strings
17+
constraint: "nxp,kinetis-ftfa"
18+
19+
...

0 commit comments

Comments
 (0)