PCA954X(4)
π 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 upstreamiicbus(4)thepca954xinstance 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
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π the page's license: BSD-2-Clause
- Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms