MX25L(4)
π NAME π
Okay so bestie, meet mx25l: the SpiFlash-compatible non-volatile storage devices driver. This is the MX25L(4) page from the Kernel Interfaces Manual, and itβs literally your backstage pass to this whole storage-device situation. π
β¨ SYNOPSIS β¨
Kernel-config era: drop this in:
device mx25l
And in loader.conf(5):
mx25l_load="YES"
π DESCRIPTION π
Okay so the mx25l driver provides support for the family of non-volatile storage devices known collectively as SpiFlash(tm), and honestly? Obsessed. SpiFlash chips typically have part numbers beginning with EN25, IS25, MX25, S25, SST25, or W25 β those prefixes are your vibe check. π
The mx25l driver uses opcode 0x9f to read the manufacturer and device ID data and determine whether the device is supported. The device ID is looked up using a table of data within the driver, and that table describes the attributes of each supported device, such as block size, sector size, and device capacity. When a supported device is found, the driver creates a disk device and makes it accessible at /dev/flash/spi?. The new disk device is then tasted by the available geom(4) modules as with any disk device β and yes, βtastedβ is the technical term, no cap. π«Ά
π₯ HARDWARE π₯
The mx25l driver supports the following spi flash memory devices. Itβs giving compatibility queen, and every single one is on the list. β¨
AT25DF641EN25F32EN25P32EN25P64EN25Q32EN25Q64GD25Q64M25P32M25P64MX25L1606EMX25LL128MX25LL256MX25LL32MX25LL64N25Q64S25FL032S25FL064S25FL128S25FL256SSST25VF010ASST25VF032BW25Q128W25Q256W25Q32W25Q64W25Q64BVW25X32W25X64
πΈ FDT CONFIGURATION πΈ
On an fdt(4) based system, the mx25l device is defined as a slave device subnode of the SPI bus controller node. All properties documented in the spibus.txt bindings document can be used with the mx25l device β the most commonly-used ones are documented below, bestie. π
β¨ Required properties in the mx25l device subnode β¨
The following properties are required in the mx25l device subnode:
compatibleβ Must be the string"jedec,spi-nor".regβ Chip select address of device.spi-max-frequencyβ The maximum bus frequency to use when communicating with this slave device. Actual bus speed may be lower, depending on the capabilities of the SPI bus controller hardware.
π Optional properties for the mx25l device subnode π
The following properties are optional for the mx25l device subnode:
spi-cphaβ Empty property indicating the slave device requires shifted clock phase (CPHA) mode.spi-cpolβ Empty property indicating the slave device requires inverse clock polarity (CPOL) mode.spi-cs-highβ Empty property indicating the slave device requires chip select active high.
π¦ HINTS CONFIGURATION π¦
On a device.hints(5) based system, such as MIPS, these values are configurable for mx25l:
hint.mx25l.%d.atβ The spibus themx25linstance is attached to.hint.mx25l.%d.clockβ The maximum bus frequency to use when communicating with this device. Actual bus speed may be lower, depending on the capabilities of the SPI bus controller hardware.hint.mx25l.%d.csβ The chip-select number to assert when performing I/O for this device. Set the high bit (1 << 31) to invert the logic level of the chip select line.hint.mx25l.%d.modeβ The SPI mode (0-3) to use when communicating with this device.
π FILES π
/dev/flash/spi?β Provides read/write access to the storage device. Slay. π
π SEE ALSO π
fdt(4), geom(4) β the lore, iykyk. π
β HISTORY β
The mx25l driver first appeared in FreeBSD 8.0. A whole main character origin story. π
And we out: mwah π β this MX25L(4) page is from Debian, dated November 11, 2025. Stay storied, bestie. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π the page's license: BSD-2-Clause
- Copyright (c) 2019 Ian Lepore <ian@freebsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms