Page MenuHomeFreeBSD

iicbus/mux/pca954x: add support for PCA9546 I2C Switch
ClosedPublic

Authored by bz on Feb 21 2024, 9:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 4:07 AM
Unknown Object (File)
Oct 2 2024, 3:00 AM
Unknown Object (File)
Sep 29 2024, 8:44 AM
Unknown Object (File)
Sep 26 2024, 1:48 PM
Unknown Object (File)
Sep 26 2024, 1:55 AM
Unknown Object (File)
Sep 23 2024, 12:32 AM
Unknown Object (File)
Sep 19 2024, 11:15 PM
Unknown Object (File)
Sep 16 2024, 7:44 PM
Subscribers

Details

Summary

Add support for the 4 channel I2C switch from NXP by adding a new
description struct and the list entries. No further changes needed.

Tested on: WHLE-LS1088A using a SPF+
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Feb 21 2024, 9:16 AM
imp added inline comments.
sys/dev/iicbus/mux/pca954x.c
6

It would be better to do a range here (even though you didn't actually contribute in 2023, the range is legal and covers things better than a long list of years). It's up to you, but that would be my advice.

This revision is now accepted and ready to land.Feb 21 2024, 3:34 PM

The change itself looks great.

There's other pca954x parts:

9541 2 channel switch https://www.nxp.com/docs/en/data-sheet/PCA9541.pdf
9542 2 channel mux https://www.nxp.com/docs/en/data-sheet/PCA9542A.pdf
9543 2 channel switch https://www.nxp.com/docs/en/data-sheet/PCA9543A_43B.pdf
9544 4 channel mux https://www.nxp.com/docs/en/data-sheet/PCA9544A.pdf
9545 4 channel mux https://www.nxp.com/docs/en/data-sheet/PCA9545A_45B_45C.pdf
9549 8 channel switch https://www.nxp.com/docs/en/data-sheet/PCA9549.pdf

Seems like it would be easy to add them while you're in the neighborhood? Again, not a request, per se, but if you had a minute...

bz marked an inline comment as done.Feb 21 2024, 3:43 PM
In D44009#1004004, @imp wrote:

The change itself looks great.

There's other pca954x parts:

..

Seems like it would be easy to add them while you're in the neighborhood? Again, not a request, per se, but if you had a minute...

True. Adding them is not the problem. I've be reluctant to add ones (also to other bits) which I cannot test.
Do we think simply adding them and take a chance is the better idea?

sys/dev/iicbus/mux/pca954x.c
6

Thanks. Done locally.

bz marked an inline comment as done.Feb 21 2024, 4:43 PM

I just skimmed them:

x=1 seems different
x=2 has INT
x=3 has INT
x=4 has INT
x=5 has INT
x=9 I find no used reference in device tree

If you don't mind, I'll pass. Once I have one with interrupt support in my hands adding the other three of those will be easy but I do not want to blindly change the code for these.