Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp52098lqh; Thu, 30 May 2024 13:47:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIU2gPdfl7v4I5ur4Gv0rDkEambHHTnKZJTNTXCXvwSaPG8L/2EaT15CJUiig3KidncKY23XrJC3vAMtjk5j98/8Gkz4tX6VKeiio5vQ== X-Google-Smtp-Source: AGHT+IF7JaNGEzq7639zCzequtUD3jfOo+690mrd8MSqUNJxUWVPKiS8kj4cXbmAA3oLq38Edi1c X-Received: by 2002:a50:ccc2:0:b0:579:c015:5376 with SMTP id 4fb4d7f45d1cf-57a3634a94cmr66139a12.4.1717102023368; Thu, 30 May 2024 13:47:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717102023; cv=pass; d=google.com; s=arc-20160816; b=TkHVoNcfUszmY0u1bDKiLQFQA7kbSwRimZbZuvxDVHDoT9I6uO+qJ+O7dhgObx3BMK ZFVWPxszU0YfLdfH8QSKpwIeyCE2r7uECrL7Vp3w2Gkm0AuI0NquCZm8o5zjIWlGB2DK +Pk8BSUOvptzczgWfJBvrB9aFritBVyILxRfy+/BzCaCTBWiTqZqDIgl+AX3WDWMu47x JmmI38GNm4ePumN/pAzfRdrQN0ddVxVN7nRmNf6JyAFbB+x4/VDi1p2WZxW7HeFFOfMz UDDgiybug4AUc8M5Z/Q3Nzksh872S+er5m9dYko8Ytb1a7/9G4AaUKVqc3z3K65FApYE 4I8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=E8+qAtTovxBphlFz5Q9kg2Dc3KRxfx07X1VODQucJoI=; fh=ElZJEoSRgjGKzRZ+B4FSfq/f2pBtMRfTIWWWNiL46OY=; b=qxLooa1zE8F+HVkxC9wU18HLitN167EiB7Fjo6ZYbC1Q5Az8UUMW+Xe+nPpl51Z1jP j7aqPtaPrAa7TLG3P1ZQs4DDSDVwYTgv8WvtgDHXd8cC3bqDFR8H3nQJcfSexjwO3j1r /KEYDXpPCGpVnirj0qKlpQYqx3CWD09GL7LpDLAGhW4/fU5j+rZrBjPcxowVcSwfhKBL u3Io+hkZRDJM21hDXdZQq6dudACO6+juS70BNrGRYkrpTMcpHlCLwNbheZzaeYUgb+xk A1lVsKJCUx0zwxpPEug1zugrZY7R4L85+VGIg2RauDQnBnUEn+dlUzVEQJ/v+OBVcTZ8 39dA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HIIYnpTB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-195895-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195895-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31c697f4si180119a12.221.2024.05.30.13.47.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 13:47:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195895-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HIIYnpTB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-195895-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195895-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E4F581F242E6 for ; Thu, 30 May 2024 20:47:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8214284FA0; Thu, 30 May 2024 20:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HIIYnpTB" Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06A7818756A; Thu, 30 May 2024 20:46:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717102013; cv=none; b=D2eLweYTTsQakBfuDcI9MgcP96qlt4NxGt5X4WuSxMUVFImHaSMGm9/LOPtAF8ZeY6T02vYSNfKwsg2/ziFsrzjzpRe/dYqG7HUesjRNMPDFDDuT1UJf/M64u1bzNLuQepzqJSgO4aeM/y1sN7m1j9+z0XbHSKyuVdRB1PIGilE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717102013; c=relaxed/simple; bh=nOJFQWqNKzm+GdzgNB2fOL4HWWjcT4f0uqIrqikqFwM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AkFsThViEIU74agmvQBmn88qsag2oEfLQZwe2vMyaMsOpEXaPuZChwyqG50zteRUiWurDG6pIyF8wuULHHJOzSp7HEI9upUtsirzczszfjJTHhpwnfQxQOYMf21F5SkWkqT4BDSayh1Uk73rjMoZb+o8JSE6CjrACJUnzC3Ck24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HIIYnpTB; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-701d854b8dfso1195450b3a.0; Thu, 30 May 2024 13:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717102011; x=1717706811; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=E8+qAtTovxBphlFz5Q9kg2Dc3KRxfx07X1VODQucJoI=; b=HIIYnpTBUuGtArxdgt+j4/n4YHUHRJrPlNOI5d7ZTVakmmnTlspXAL82eiwsLJ/afX UcPnJkbnjB/Xlx+wrrnvc/f1ct4AKRP2XkngZsDS0PP5DvPYX7YG6W9RryaoY7+x/rAG ApKhs8zlL1lngG1DBP+DjQxKyzWKlmLCq7SaRVqb+tTEwHj1QbaV+gn/oPCfYDsE6gl5 tYjvtmo/NlVK81cGQYp6yc3z3xkEMfyU77IUmS7rEuqsjjxTkRqwXgo3HqAtAGxVNy/b 9NlLpon+lbS5QuQPxF1BMnulNXI6DlE/8TqpFc63+e4eIWFIpPCChbuv0rvDAcU5Rd/K BBzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717102011; x=1717706811; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=E8+qAtTovxBphlFz5Q9kg2Dc3KRxfx07X1VODQucJoI=; b=ew6eizoi8O4rxvzhx6xV2zt+rTuUjyAgnpjuNGL1GSi+CIfdSEyRfC2JcEL1z7IN1D thzUEtiP9H+gFk7oiTwssx/BMAaj4vyBwo4IifsOcdlttfZmYSWzJZ60FKaYNrrURQCu dxT8SD7S2J4dpgo5f/IAfRr9jRq742LIwpi26GQjkRavOU+UAAU89I0CbetU0U9B2bTd Wo4wAu2B1k7A7z5u2vn8ZBM/BvdHh2lkzmaLAz+6EGN9F5+nSx7QRXI+yqHq9z5TNrnH JKoWDJQfYj/WFbK6j1ESsGTCnY33mkv5Q/0AruOdRtUr2WVoqgVjMyKa/Yo/v710nFup x36A== X-Forwarded-Encrypted: i=1; AJvYcCWAbavR1TqrbfL5CDVoeXnDNXWb5FUSAz5S4efqybVtxQwr0nmBQ9Q425yXckhUF4kWaCoOkTB3al/DgJo29vNTBNgFoXPa78gc4GzbRs0/gR34pPLqRXr5KDVxPIjjeio0l6MeXvsnSA== X-Gm-Message-State: AOJu0YxRNsFWsh6akgtEakFGZ51GstXBsCGGALnTO8al6V1KVO+IePBF qGcsOdZaUFipA53LQDBMXtdUDIlqEVut7e5wkUUUJHeAYkP++K1f X-Received: by 2002:a05:6a00:1f0e:b0:6f8:d4b8:b215 with SMTP id d2e1a72fcca58-702310ec3dbmr3108892b3a.6.1717102010983; Thu, 30 May 2024 13:46:50 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70242c26bbasm141513b3a.217.2024.05.30.13.46.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 May 2024 13:46:50 -0700 (PDT) Sender: Guenter Roeck Message-ID: <16e448f1-cfc9-4e88-b3f1-55e1856d1405@roeck-us.net> Date: Thu, 30 May 2024 13:46:48 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/3] hwmon: Add support for SPD5118 compliant temperature sensors To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: linux-hwmon@vger.kernel.org, Hristo Venev , =?UTF-8?Q?Ren=C3=A9_Rebe?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Radu Sabau References: <20240529205204.81208-1-linux@roeck-us.net> <20240529205204.81208-3-linux@roeck-us.net> <34a4292e-c4db-4b40-822e-b892e1444045@t-8ch.de> Content-Language: en-US From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W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ertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <34a4292e-c4db-4b40-822e-b892e1444045@t-8ch.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/30/24 13:20, Thomas Weißschuh wrote: > On 2024-05-29 13:52:03+0000, Guenter Roeck wrote: >> Add support for SPD5118 (Jedec JESD300-5B.01) compliant temperature >> sensors. Such sensors are typically found on DDR5 memory modules. > > I can get the module to automatically probe with this change: > > diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c > index 97f338b123b1..8d9218f755d7 100644 > --- a/drivers/i2c/i2c-smbus.c > +++ b/drivers/i2c/i2c-smbus.c > @@ -382,6 +386,10 @@ void i2c_register_spd(struct i2c_adapter *adap) > case 0x1E: /* LPDDR4 */ > name = "ee1004"; > break; > + case 0x22: /* DDR5 */ > + case 0x23: /* LPDDR5 */ > + name = "spd5118"; > + break; > default: > dev_info(&adap->dev, > "Memory type 0x%02x not supported yet, not instantiating SPD\n", > > (Credits go to Paul Menzel [0]) > > Maybe you can add that to your series. > That is specifically for SPD (eeprom) support, which I didn't provide in the driver. It does not register the equivalent jc42.4 temperature sensor either. Given that, using the code to register a temperature sensor seems inappropriate. I didn't include accessing the SPD eeprom to the driver because I don't have a use case. I don't mind adding it, though, if others think that it is important. > To also work with my PIIX4 I2C bus, I also need: > > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig > index fe6e8a1bb607..ff66e883b348 100644 > --- a/drivers/i2c/busses/Kconfig > +++ b/drivers/i2c/busses/Kconfig > @@ -195,6 +195,7 @@ config I2C_ISMT > config I2C_PIIX4 > tristate "Intel PIIX4 and compatible (ATI/AMD/Serverworks/Broadcom/SMSC)" > depends on PCI && HAS_IOPORT > + select I2C_SMBUS > help > If you say yes to this option, support will be included for the Intel > PIIX4 family of mainboard I2C interfaces. Specifically, the following > diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c > index 6a0392172b2f..f8d81f8c0cb3 100644 > --- a/drivers/i2c/busses/i2c-piix4.c > +++ b/drivers/i2c/busses/i2c-piix4.c > @@ -29,6 +29,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -982,6 +983,8 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba, > return retval; > } > > + i2c_register_spd(adap); > + > *padap = adap; > return 0; > } > > Though I guess it's not the right place to call i2c_register_sdp(), > I'll look at it some more and then submit it. > Hmm, I didn't find a better place though. Please copy me when you submit a patch; I can test it on an AMD system with DDR4. Thanks, Guenter