Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: "Paul Menzel" <pmenzel@molgen.mpg.de>,
	"Armin Wolf" <W_Armin@gmx.de>,
	"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
	linux-kernel@vger.kernel.org, "René Rebe" <rene@exactcode.de>,
	"Stephen Horvath" <s.horvath@outlook.com.au>,
	"Sasha Kozachuk" <skozachuk@google.com>,
	"John Hamrick" <johnham@google.com>,
	"Chris Sarra" <chrissarra@google.com>,
	linux-hwmon@vger.kernel.org, "Jean Delvare" <jdelvare@suse.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>
Subject: Re: [RFT PATCH v2 2/3] hwmon: (spd5118) Use spd5118 specific read/write operations
Date: Tue, 18 Jun 2024 18:02:51 -0700	[thread overview]
Message-ID: <a682ab44-d623-40fe-8fee-af2a3ae5590a@roeck-us.net> (raw)
In-Reply-To: <0b8ae7fa-e3d3-4d31-9b4b-657b15c2d19c@t-8ch.de>

On 6/18/24 17:50, Thomas Weißschuh wrote:
> On 2024-06-18 17:23:44+0000, Guenter Roeck wrote:
>> On 6/18/24 16:39, Paul Menzel wrote:
>>> [Cc: +Heiner]
>>>
>>>
>>> Dear Armin,
>>>
>>>
>>> Am 19.06.24 um 01:28 schrieb Armin Wolf:
>>>> Am 19.06.24 um 00:28 schrieb Wolfram Sang:
>>>>
>>>>>> to 86 degrees C. If that doesn't work, we'll be really out of luck
>>>>>> with that controller (or at least I don't have an idea what else to try).
>>>>>
>>>>> Try CCing Heiner Kallweit for ideas about the i801 controller.
>>>
>>>> i am not Heiner Kallweit, but i found something interesting in
>>>> commit ba9ad2af7019 ("i2c: i801: Fix I2C Block Read on 8-Series/C220 and later").
>>>>
>>>> Basically, it seems that the i802 i2c controller indeed features a SPD write disable bit which blocks all writes for slave addresses 0x50-0x57.
>>>>
>>>> Does the i801 i2c controller driver print something like "SPD Write Disable is set" during boot?
>>>
>>> Nice find. Yes, it does:
>>>
>>
>> Yes, definitely. I didn't have any recent datasheets, so I missed that flag.
>> Oh well :-(.
>>
>>>       [    5.462605] i801_smbus 0000:00:1f.4: SPD Write Disable is set
>>>       [    5.468399] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
>>>
>>
>> Bummer. That explains the problem. It means that the BIOS effectively
>> blocks reading the eeprom on your system (because that would require writing
>> the page register), as well as changing temperature limits. That is really
>> annoying, but there is nothing we can do about it. Maybe the BIOS has a
>> configuration flag to enable or disable write protect, but I doubt it.
> 
> What about using 16bit addressing mode?
> 
>      Alternatively, at initial power on, the host can set the Table 112, “MR11” [3] = ‘1’ to address the entire 1024 bytes of
>      non-volatile memory with 2 bytes of address and hence not required to go through page selection to address entire
>      non-volatile memory.
> 
> regmap-i2c allows 16bit addresses when I2C_FUNC_SMBUS_I2C_BLOCK is supported,
> which to me looks like it should be the case on i801 for ICH5.
> 

Good idea, but it doesn't work. I can get write operations with
16-bit register addresses to work even on piix4, but read operations
require writing a 16-bit register address followed by byte reads (see
regmap_i2c_smbus_i2c_read_reg16). Unfortunately, spd5118 devices
don't auto-increment the address on byte read operations, meaning
each byte read returns data from address 0x00 (i.e., it returns
0x51). Try "i2cdump -y -f 0 0x50 c" and you'll see what I mean.
Maybe there is a way around it, but I have not found it.

On top of that, configuring 16-bit mode requires a write operation
into the page register, and that is blocked.

Thanks,
Guenter


  reply	other threads:[~2024-06-19  1:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 19:53 [RFT PATCH v2 0/3] hwmon: (spd5118) Various improvements Guenter Roeck
2024-06-18 19:53 ` [RFT PATCH v2 1/3] hwmon: (spd5118) Use regmap to implement paging Guenter Roeck
2024-06-18 19:53 ` [RFT PATCH v2 2/3] hwmon: (spd5118) Use spd5118 specific read/write operations Guenter Roeck
2024-06-18 20:37   ` Paul Menzel
2024-06-18 21:08     ` Guenter Roeck
2024-06-18 21:45       ` Paul Menzel
2024-06-18 22:37         ` Guenter Roeck
2024-06-18 22:59           ` Paul Menzel
2024-06-18 22:28       ` Wolfram Sang
2024-06-18 23:28         ` Armin Wolf
2024-06-18 23:39           ` Paul Menzel
2024-06-19  0:23             ` Guenter Roeck
2024-06-19  0:50               ` Thomas Weißschuh
2024-06-19  1:02                 ` Guenter Roeck [this message]
2024-06-19  9:13                   ` Thomas Weißschuh
2024-06-19 14:18                     ` Guenter Roeck
2024-06-18 19:53 ` [RFT PATCH v2 3/3] hwmon: (spd5118) Add support for Renesas/ITD SPD5118 hub controllers Guenter Roeck
2024-06-18 20:59 ` [RFT PATCH v2 0/3] hwmon: (spd5118) Various improvements Armin Wolf

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=a682ab44-d623-40fe-8fee-af2a3ae5590a@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=W_Armin@gmx.de \
    --cc=chrissarra@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=johnham@google.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=pmenzel@molgen.mpg.de \
    --cc=rene@exactcode.de \
    --cc=s.horvath@outlook.com.au \
    --cc=skozachuk@google.com \
    --cc=wsa+renesas@sang-engineering.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