Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions boards/sifli/sf32lb52_devkit_lcd/sf32lb52_devkit_lcd.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <sifli/sf32lb52x.dtsi>
#include <sifli/sf32lb52x-ram012.dtsi>
#include <zephyr/dt-bindings/dma/sf32lb52x-dma.h>
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>

Expand All @@ -18,6 +19,7 @@

chosen {
zephyr,flash = &py25q128ha;
zephyr,flash-controller = &mpi2;
zephyr,code-partition = &code;
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
Expand Down Expand Up @@ -84,12 +86,22 @@
status = "okay";
};

&dmac {
status = "okay";
};

&mpi2 {
compatible = "sifli,sf32lb-mpi-qspi-nor";
dmas = <&dmac 0 SF32LB52X_DMA_REQ_MPI2 SF32LB_DMA_PL_MEDIUM>;
sifli,psclr = <0>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is freq=240/1 too high? change to 4?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're still using HXT48

sifli,lines = <4>;
status = "okay";

py25q128ha: memory@12000000 {
compatible = "puya,py25q128ha";
reg = <0x12000000 DT_SIZE_M(16)>;
py25q128ha: flash@0 {
compatible = "puya,py25q128ha", "jedec,qspi-nor";
reg = <0x0>;
size = <DT_SIZE_M(128)>;
quad-enable-requirements = "S2B1v1";

partitions {
compatible = "fixed-partitions";
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ zephyr_library_sources_ifdef(CONFIG_FLASH_NPCX_FIU_QSPI flash_npcx_fiu_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RENESAS_RA_OSPI_B flash_renesas_ra_ospi_b.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RENESAS_RA_QSPI flash_renesas_ra_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_RPI_PICO flash_rpi_pico.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_SF32LB_MPI_QSPI_NOR flash_sf32lb_mpi_qspi_nor.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_STM32_OSPI flash_stm32_ospi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_STM32_QSPI flash_stm32_qspi.c)
zephyr_library_sources_ifdef(CONFIG_FLASH_STM32_XSPI flash_stm32_xspi.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/flash/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ source "drivers/flash/Kconfig.rts5912"
source "drivers/flash/Kconfig.rv32m1"
source "drivers/flash/Kconfig.sam"
source "drivers/flash/Kconfig.sam0"
source "drivers/flash/Kconfig.sf32lb_mpi_qspi_nor"
source "drivers/flash/Kconfig.si32"
source "drivers/flash/Kconfig.silabs"
source "drivers/flash/Kconfig.simulator"
Expand Down
15 changes: 15 additions & 0 deletions drivers/flash/Kconfig.sf32lb_mpi_qspi_nor
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2025 Core Devices LLC
# SPDX-License-Identifier: Apache-2.0

config FLASH_SF32LB_MPI_QSPI_NOR
bool "SiFli SF32LB MPI QSPI NOR driver"
default y
depends on DT_HAS_SIFLI_SF32LB_MPI_QSPI_NOR_ENABLED
select FLASH_HAS_PAGE_LAYOUT
select FLASH_HAS_DRIVER_ENABLED
select FLASH_HAS_EXPLICIT_ERASE
select FLASH_JESD216
select DMA
help
Enable the flash driver for a NOR serial flash memory device connected
to the SiFli SF32LB MPI peripheral.
Loading
Loading