MX25L(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸŽ€ 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. ✨

  • AT25DF641
  • EN25F32
  • EN25P32
  • EN25P64
  • EN25Q32
  • EN25Q64
  • GD25Q64
  • M25P32
  • M25P64
  • MX25L1606E
  • MX25LL128
  • MX25LL256
  • MX25LL32
  • MX25LL64
  • N25Q64
  • S25FL032
  • S25FL064
  • S25FL128
  • S25FL256S
  • SST25VF010A
  • SST25VF032B
  • W25Q128
  • W25Q256
  • W25Q32
  • W25Q64
  • W25Q64BV
  • W25X32
  • W25X64

🌸 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 the mx25l instance 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