public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: "Frederik Brændstrup" <frederikbraendstrup@gmail.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: Dynamic address for an i2c device
Date: Mon, 17 Feb 2025 11:13:17 +0100	[thread overview]
Message-ID: <Z7MLvS5L3ttWJ1LA@ninjato> (raw)
In-Reply-To: <CADs2FCF+v3g4V4cfNREFm6KZ_LAHB0vCC2T2PcHjNO4UHq_atw@mail.gmail.com>

[-- 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 --]

      reply	other threads:[~2025-02-17 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16 16:51 Dynamic address for an i2c device Frederik Brændstrup
2025-02-17 10:13 ` Wolfram Sang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z7MLvS5L3ttWJ1LA@ninjato \
    --to=wsa+renesas@sang-engineering.com \
    --cc=frederikbraendstrup@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox