From: Heiner Kallweit <hkallweit1@gmail.com>
To: Jean Delvare <jdelvare@suse.de>
Cc: Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org,
Peter Korsgaard <peter.korsgaard@barco.com>,
Peter Rosin <peda@axentia.se>
Subject: Re: [PATCH] i2c: i801: Use I2C_CLASS_HWMON for i2c mux children
Date: Wed, 20 Dec 2023 22:07:50 +0100 [thread overview]
Message-ID: <a9ab1201-58fe-4b86-81fc-b58ce0b3cd2c@gmail.com> (raw)
In-Reply-To: <20231110120822.7a81421e@endymion.delvare>
On 10.11.2023 12:08, Jean Delvare wrote:
> Hi Heiner,
>
> On Thu, 9 Nov 2023 17:34:15 +0100, Heiner Kallweit wrote:
>> On 09.11.2023 14:52, Jean Delvare wrote:
>>> For example, if DMI data says the system is using DDR4 and we were able
>>> to detect and instantiate an ee1004 SPD device at I2C address 0x50 then
>>> we should probe for a JC42.4-compliant temperature sensor device at I2C
>>> address 0x18. An SPD EEPROM at 0x51 would correspond to a possible
>>> JC42.4-compliant device at 0x19, and so on.
>>
>> Nice idea. How about our ASUS use case in i801? i2c_register_spd() isn't
>> called in case of muxing, neither for the parent nor for the mux children.
>
> When I introduced i2c_register_spd(), I wanted to go one step at a
> time, as I didn't know what to expect due to the wide variety of
> systems affected. For this reason, systems where the SMBus is
> multiplexed were originally excluded. There's also a limitation in the
> function itself, on the number of memory slots, which is 4 for now, but
> could be lifted to 8 (maximum number of memory slots connected to a
> single SMBus segment).
>
> The Asus boards we are talking about may have more than 8 memory slots,
> so they would fail the test. If we want to be able to use
> i2c_register_spd() on these boards, some adjustments will be needed.
> For example, we could add a parameter to bypass the memory slot
> counting, so that the function could be called on children segments
> (only a subset of the memory slots will be connected to that segment,
> so the total slot count it irrelevant). We would ignore the DMI data
> and hard-code dimm_count to 8 in that case, to probe all possible
> addresses.
>
> Another approach would be to add a parameter (probably a bit field)
> describing which addresses should be probed, instead of guessing that
> from the dimm_count collected from DMI data. For the Asus boards in
> question, the information is known, and this would speed things up a
> bit by not probing addresses which can't possibly correspond to a
> memory module on a given board. That's only a minor optimization
> though, so not necessarily worth it. OTOH having that possibility would
> give more control on the probing, which may be useful for specific
> boards.
>
Apart from the described extension of i2c_register_spd() I wonder where
to best call it for the muxed smbus segments.
At first I think we have to make the assumption that in case of muxing
memory slots are on the muxed child segments only.
At least I don't see an easy way to deal with the potential scenario that
some memory slots are on the parent segment, and some on muxed segments.
i801_add_mux() instantiates the i2c-mux-gpio platform device, and I think
loading and probing the i2c-mux-gpio driver can happen asynchronously.
This would mean we can't call i2c_register_spd() for the child segments
from i801. So we may have to call it from the i2c-mux-gpio driver.
prev parent reply other threads:[~2023-12-20 21:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 20:30 [PATCH] i2c: i801: Use I2C_CLASS_HWMON for i2c mux children Heiner Kallweit
2023-11-06 14:50 ` Jean Delvare
2023-11-07 8:04 ` Heiner Kallweit
2023-11-09 13:52 ` Jean Delvare
2023-11-09 16:34 ` Heiner Kallweit
2023-11-10 11:08 ` Jean Delvare
2023-12-20 21:07 ` Heiner Kallweit [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=a9ab1201-58fe-4b86-81fc-b58ce0b3cd2c@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=peda@axentia.se \
--cc=peter.korsgaard@barco.com \
/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