PCA954X(4)

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

πŸ’… PCA954X πŸ’…

okay so bestie, this is the manual page for pca954x β€” the kernel driver for the PCA9548A I2C switch (from the Kernel Interfaces Manual, no big deal) ✨


🌸 NAME 🌸

pca954x β€” driver for PCA9548A I2C switch, and honestly it's giving main character energy in the I2C world πŸŽ€


✨ SYNOPSIS ✨

So to compile this driver into the kernel, you gotta place the following line in your kernel configuration file:

device pca954x
device iicmux
device iicbus

Alternatively β€” and this is the lazy girl route, which we respect β€” to load the driver as a module at boot time, place the following line in loader.conf(5):

pca954x_load="YES"

slay, that's it 🫢


πŸ’– DESCRIPTION πŸ’–

The pca954x driver supports the PCA9548A I2C bus switch and compatible chips such as TCA9548A (the way they just work, we love to see it ✨).

It automatically connects an upstream I2C bus to one of several downstream buses as needed when slave devices on the downstream buses initiate I/O. Like, it just knows when to switch, no cap πŸ’…

More information on the automatic switching behavior is available in iicmux(4) β€” go read it, iykyk πŸ¦‹


πŸ¦‹ FDT CONFIGURATION πŸ¦‹

On an FDT(4) based system, an pca954x device node is defined as a child node of its upstream I2C bus. It's giving family tree energy, honestly 🌳

The children of the pca954x node are additional I2C buses, which will have their own I2C slave devices described in their child nodes. Nesting doll vibes πŸŽ€

The pca954x driver attaches to nodes where the compatible property is set to one of:

  • "nxp,pca9548"

The pca954x driver supports the following optional properties in addition to the standard I2C mux properties:

  • i2c-mux-idle-disconnect β€” if defined, forces the switch to disconnect all children in idle state. Like when you need to ✨disconnect✨ from the group chat, but for hardware πŸ”₯

🌈 HINTS CONFIGURATION 🌈

On a device.hints(5) based system, these values are configurable for pca954x:

  • hint.pca954x.<unit>.at β€” the upstream iicbus(4) the pca954x instance is attached to. That's the whole "where do I belong" moment πŸ’œ
  • hint.pca954x.<unit>.chip_type β€” the type of the chip. At present, only "pca9548" is supported. Like, it's exclusive, one option only, and honestly? iconic πŸ‘‘

When configured via hints, the driver automatically adds an iicbus(4) instance for every downstream bus supported by the chip. The way it just knows to create them all 🧚

There is currently no way to indicate used versus unused channels. Yeah, that's the tea β€” it's all or nothing, no cap πŸ’€


⭐ SEE ALSO ⭐

(go read these, bestie, for the full picture πŸ“š)


πŸŽ€ HISTORY πŸŽ€

The pca954x driver and this manual page was written by Andriy Gapon <avg@FreeBSD.org>. We stan an icon who writes drivers AND documentation 🫢✨


and that's the whole vibe, periodt πŸ’…πŸŒΈ

xoxo, from the Debian crew β€” November 13, 2021 edition πŸ“…πŸ’–

πŸ“¦ where this page comes from