Skip to content

Commit 658be7a

Browse files
committed
board/adi/ev-sc598-som: support SPI NAND
The long-term availability of eMMC is in question. Support a modified EV-SC598-SOM where the SPI flash has been replaced with a NAND part that is pin compatible to evaluate performance on the EV-SC598-SOM. Define two devicetree overlays, for Linux and U-Boot, because the register values are off by one. This will eventually get cleaned up as part of a bigger effort to clean-up Linux and remove the U-Boot devicetrees. Signed-off-by: Philip Molloy <philip.molloy@analog.com>
1 parent b27fa4f commit 658be7a

6 files changed

Lines changed: 168 additions & 0 deletions

File tree

board/adi/ev-sc598-som/nand.cfg

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Micron 8Gb (1GB) SPI NAND flash
2+
# Model: MT29F8G01ADAFD12-AAT:F
3+
# Datasheet: https://www.micron.com/content/dam/micron/global/secure/products/data-sheet/nand-flash/70-series/m70a-4-8gb-nand-spi-auto.pdf
4+
# Label: U4
5+
flash nand-1G {
6+
pebsize = 256K
7+
numpebs = 4096
8+
minimum-io-unit-size = 4096
9+
sub-page-size = 4096
10+
vid-header-offset = 4096
11+
}
12+
13+
image nand.img {
14+
flash {}
15+
flashtype = "nand-1G"
16+
17+
partition u-boot-spl {
18+
image = "u-boot-spl.ldr"
19+
size = 256K
20+
}
21+
22+
partition u-boot {
23+
image = "u-boot.ldr"
24+
size = 768K
25+
}
26+
27+
partition dtb {
28+
image = "sc598-som-nand.dtb"
29+
size = 256K
30+
}
31+
32+
partition kernel {
33+
image = "Image"
34+
size = 32M
35+
}
36+
37+
partition rootfs {
38+
image = "rootfs.ubi"
39+
}
40+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright (c) 2026 Analog Devices Incorporated
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "sc598-som-revE.dtsi"
9+
10+
/ {
11+
model = "ADI SC598-SOM with NAND";
12+
compatible = "adi,sc598-som-nand", "adi,sc59x-64";
13+
};
14+
15+
&spi2 {
16+
/delete-node/ is25lp01g@0;
17+
18+
som_flash: spi-nand@0 {
19+
#address-cells = <1>;
20+
#size-cells = <1>;
21+
compatible = "spi-nand";
22+
reg = <0>;
23+
spi-max-frequency = <25000000>;
24+
spi-rx-bus-width = <4>;
25+
spi-tx-bus-width = <4>;
26+
27+
partitions {
28+
compatible = "fixed-partitions";
29+
#address-cells = <1>;
30+
#size-cells = <1>;
31+
32+
partition@0 {
33+
label = "u-boot-spl";
34+
reg = <0x0 0x40000>;
35+
};
36+
37+
partition@40000 {
38+
label = "u-boot";
39+
reg = <0x40000 0xC0000>;
40+
};
41+
42+
partition@100000 {
43+
label = "dtb";
44+
reg = <0x100000 0x40000>;
45+
};
46+
47+
partition@140000 {
48+
label = "kernel";
49+
reg = <0x140000 0x2000000>;
50+
};
51+
52+
partition@2140000 {
53+
label = "rootfs";
54+
reg = <0x2140000 0x3DEC0000>;
55+
};
56+
};
57+
};
58+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_MTD_SPI_NAND=y
2+
CONFIG_MTD_UBI=y
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Copyright (c) 2026 Analog Devices Incorporated
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "sc598-som-revE.dtsi"
9+
10+
/ {
11+
model = "ADI SC598-SOM with NAND";
12+
compatible = "adi,sc598-som-nand", "adi,sc59x-64";
13+
};
14+
15+
&spi2 {
16+
/delete-node/ is25lp01g@1;
17+
18+
som_flash: spi-nand@1 {
19+
#address-cells = <1>;
20+
#size-cells = <1>;
21+
compatible = "spi-nand";
22+
reg = <1>;
23+
spi-max-frequency = <25000000>;
24+
spi-rx-bus-width = <4>;
25+
spi-tx-bus-width = <4>;
26+
27+
partitions {
28+
compatible = "fixed-partitions";
29+
#address-cells = <1>;
30+
#size-cells = <1>;
31+
32+
partition@0 {
33+
label = "u-boot-spl";
34+
reg = <0x0 0x40000>;
35+
};
36+
37+
partition@40000 {
38+
label = "u-boot";
39+
reg = <0x40000 0xC0000>;
40+
};
41+
42+
partition@100000 {
43+
label = "dtb";
44+
reg = <0x100000 0x40000>;
45+
};
46+
47+
partition@140000 {
48+
label = "kernel";
49+
reg = <0x140000 0x2000000>;
50+
};
51+
52+
partition@2140000 {
53+
label = "rootfs";
54+
reg = <0x2140000 0x3DEC0000>;
55+
};
56+
};
57+
};
58+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_DEFAULT_DEVICE_TREE="sc598-som-nand"
2+
CONFIG_DM_MTD=y
3+
CONFIG_MTD_SPI_NAND=y

configs/adi_sc598_nand.fragment

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
BR2_LINUX_KERNEL_INTREE_DTS_NAME="adi/sc598-som-nand"
2+
BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="$(BR2_EXTERNAL)/board/adi/ev-sc598-som/patches/linux/dts/"
3+
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL)/board/adi/ev-sc598-som/patches/linux/nand.fragment"
4+
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="$(BR2_EXTERNAL)/board/adi/ev-sc598-som/patches/uboot/dts/sc598-som-nand.dts"
5+
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL)/board/adi/ev-sc598-som/patches/uboot/nand.fragment"
6+
BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c $(BR2_EXTERNAL)/board/adi/ev-sc598-som/nand.cfg"
7+
# BR2_TARGET_ROOTFS_EXT2 is not set

0 commit comments

Comments
 (0)