Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5347

Interfacing (DSI, CSI, I2C, etc.) • Re: multiple PCA9548s on same I2C port

$
0
0
Well, the case is not quite closed:

I now realize that RPi decided to reassign my ports.

With one mux 0x70, ports were assigned 22-29

With two ports, it decided to give 0x70 30-37 and move move the 0x77's ports to 22-29... I'm not sure, if this is random or not, or if it follows any type of logic. Note that I define the overlays starting with 0x70 followed by 0x77. So it seems to assign them in reverse order.

Code:

Helios@HeliosRPi4:~ $ i2cdetect -li2c-1   i2c             bcm2835 (i2c@7e804000)                  I2C adapteri2c-20  i2c             fef04500.i2c                            I2C adapteri2c-21  i2c             fef09500.i2c                            I2C adapteri2c-22  i2c             i2c-1-mux (chan_id 0)                   I2C adapteri2c-23  i2c             i2c-1-mux (chan_id 1)                   I2C adapteri2c-24  i2c             i2c-1-mux (chan_id 2)                   I2C adapteri2c-25  i2c             i2c-1-mux (chan_id 3)                   I2C adapteri2c-26  i2c             i2c-1-mux (chan_id 4)                   I2C adapteri2c-27  i2c             i2c-1-mux (chan_id 5)                   I2C adapteri2c-28  i2c             i2c-1-mux (chan_id 6)                   I2C adapteri2c-29  i2c             i2c-1-mux (chan_id 7)                   I2C adapteri2c-30  i2c             i2c-1-mux (chan_id 0)                   I2C adapteri2c-31  i2c             i2c-1-mux (chan_id 1)                   I2C adapteri2c-32  i2c             i2c-1-mux (chan_id 2)                   I2C adapteri2c-33  i2c             i2c-1-mux (chan_id 3)                   I2C adapteri2c-34  i2c             i2c-1-mux (chan_id 4)                   I2C adapteri2c-35  i2c             i2c-1-mux (chan_id 5)                   I2C adapteri2c-36  i2c             i2c-1-mux (chan_id 6)                   I2C adapteri2c-37  i2c             i2c-1-mux (chan_id 7)                   I2C adapter
No idea what bus 20 and 21 are assigned to.

But I'd rather ASSIGN a starting port number per MUX address, say:

MUX 0x70 gets ports 30-37
MUX 0x77 gets ports 40-47

Any way to achieve that, please?

Statistics: Posted by TriLife — Wed Mar 13, 2024 7:58 pm



Viewing all articles
Browse latest Browse all 5347

Trending Articles