* Dynamic address for an i2c device
@ 2025-02-16 16:51 Frederik Brændstrup
2025-02-17 10:13 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Frederik Brændstrup @ 2025-02-16 16:51 UTC (permalink / raw)
To: linux-i2c
Hello!
I'm starting to mess around with linux drivers again, and made a PCB
for controlling some stepper motors and I chose the TI DRV8847S
driver, as it has an I2C interface for controlling the position of the
connected stepper motor.
DRV8847S Datasheet:
https://www.ti.com/lit/ds/symlink/drv8847.pdf?ts=1739724138814&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FDRV8847%252Fpart-details%252FDRV8847SPWR
I have been trying (and failing) to understand if it's possible to
make the arrangement specified on page 45 regarding "Multi-Slave
Operation", where each device address is configured during
initialization, by first pulling down the nFAULT pin of all other
devices and then writing to the address register of the default
address, which the remaining device would then ack and use afterwards.
Is anyone aware of other devices using similar schemes, that I could
maybe draw some inspiration from?
Thanks
Frede Braendstrup
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Dynamic address for an i2c device
2025-02-16 16:51 Dynamic address for an i2c device Frederik Brændstrup
@ 2025-02-17 10:13 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2025-02-17 10:13 UTC (permalink / raw)
To: Frederik Brændstrup; +Cc: linux-i2c
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
Hi,
> I have been trying (and failing) to understand if it's possible to
> make the arrangement specified on page 45 regarding "Multi-Slave
> Operation", where each device address is configured during
> initialization, by first pulling down the nFAULT pin of all other
> devices and then writing to the address register of the default
> address, which the remaining device would then ack and use afterwards.
>
> Is anyone aware of other devices using similar schemes, that I could
> maybe draw some inspiration from?
Well, GMSL has a somewhat similar mechanism, it seems. The de-serializer
(drivers/media/i2c/max9286.c) is an i2c-mux to which n camera sensors
are attached. The sensors all have the same i2c address initially. Now,
the code first muxes each single bus to the controller, so that the
serializer (drivers//media/i2c/max9271.c) on the "other side" of the
muxed bus can then be programmed to translate the all-the-same-address
to an individual address. After this is done for all cameras, the mux
enables all channels at once because the addresses are now unique on the
busses.
The code for all that is complicated, though. Not sure if you can derive
inspiration from it. Good luck, though!
Happy hacking,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-17 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 16:51 Dynamic address for an i2c device Frederik Brændstrup
2025-02-17 10:13 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox