MX25L(4)
πΎ MX25L β the mx25l driver, bestie edition π
okay so this is the MX25L(4) man page, from the Kernel Interfaces Manual section (that's section 4, drivers, we love her). it's all about a driver for SpiFlash(tm)-compatible non-volatile storage devices. sit down, grab a snack π, we're gonna get into it.
β¨ NAME β¨
mx25l β driver for SpiFlash(tm) compatible non-volatile storage devices π
like. that's literally her. that's the whole vibe.
πΈ SYNOPSIS πΈ
so to get this driver compiled into your kernel, you drop this line into your kernel configuration file:
device mx25l
or, alternatively, if you'd rather load the driver as a module at boot time, you put this line in loader.conf(5):
mx25l_load="YES"
pick your fighter. both slay. π«Ά
π DESCRIPTION π
okay so the mx25l driver provides support for the whole family of non-volatile storage devices that everyone calls SpiFlash(tm). these chips typically have part numbers starting with EN25, IS25, MX25, S25, SST25, or W25 β if you see one of those prefixes you already know what time it is. π
the mx25l driver reads the manufacturer and device ID data using opcode 0x9f to figure out whether the device is supported. and the way it checks β it looks the device ID up in a table of data inside the driver, which describes the attributes of each supported device, like block size, sector size, and device capacity. so smart. so organized. π
when a supported device is found, the mx25l driver creates a disk device and makes it accessible at /dev/flash/mx25l?. the new disk device then gets tasted by the available geom(4) modules, just like with any other disk device. no special treatment, she's just a disk now. periodt.
π₯ HARDWARE π₯
the mx25l driver provides support for these devices, and honestly? the roster is giving range:
AT25DF641EN25F32EN25P32EN25P64EN25Q32EN25Q64GD25Q64M25P32M25P64MX25L1606EMX25LL128MX25LL256MX25LL32MX25LL64S25FL032S25FL064S25FL128S25FL256SSST25VF010ASST25VF032BW25Q128W25Q256W25Q32W25Q64W25Q64BVW25X32W25X64
twenty-seven icons. not one flop. π
π§ FDT CONFIGURATION π§
on an fdt(4) based system, the mx25l device is defined as a slave device subnode of the SPI bus controller node. and good news β all the properties documented in the spibus.txt bindings document can be used with the mx25l device. the most commonly-used ones are documented below. π
the properties you NEED (required) in the mx25l device subnode π«Ά
compatibleβ must be the string"jedec,spi-nor". non-negotiable bestie.regβ chip select address of device.spi-max-frequencyβ the maximum bus frequency to use when communicating with this slave device. heads up though: the actual bus speed may be lower, depending on what the SPI bus controller hardware is capable of. she can only go as fast as she can go. π
the properties you CAN add (optional) π
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.
empty properties are such a mood ngl. present, but with nothing to say. π
β HINTS CONFIGURATION β
on a device.hints(5) based system β like MIPS, hi MIPS ily β these values are configurable for mx25l:
hint.mx25l.%d.atβ thespibusthemx25linstance is attached to.hint.mx25l.%d.clockβ the maximum bus frequency to use when communicating with this device. again: actual bus speed may be lower, depending on the capabilities of the SPI bus controller hardware. same disclaimer, same energy.hint.mx25l.%d.csβ the chip-select number to assert when performing I/O for this device. and ooh, spicy detail: 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/mx25l?β provides read/write access to the storage device. this is the main character right here. π/dev/flash/spi?β an alias for the/dev/mx25l?device, for backwards compatibility with older versions of the driver. she's keeping the old name alive out of respect. we love a nostalgic queen.
π SEE ALSO π
go read those next, bestie, that's the homework. π
π HISTORY π
the mx25l driver first appeared in FreeBSD 8.0. a legend from day one, no cap.
π and that's the whole page! every option, every device, every property, every path β nothing skipped, nothing invented. iykyk. π β¨
okay and for the cute sign-off: this page came to you courtesy of Debian, dated February 26, 2019 β that's the source and version vibes, and she's still serving. bye bestie, go mount something ππ¦π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2019 Ian Lepore <ian@freebsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms