Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp406181lqp; Mon, 10 Jun 2024 07:41:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWl27Z4py13QUxAU9Lro3jX9PjiAZEMGxO74GUaeOk53+4rAdA+vW1ymQHUkQvKu+t3g6G1p2IN/665xeg7iXcpy9IR3/bsA/iOmVq9eg== X-Google-Smtp-Source: AGHT+IFXhYx73iX/Pea5WPCraKAT2jY5XOBVPygv4/LBZ6X8R015A95fqh9Z3z+GdsaXfMqPocR5 X-Received: by 2002:a05:6214:4612:b0:6b0:8725:656b with SMTP id 6a1803df08f44-6b0872568b5mr11818386d6.36.1718030505779; Mon, 10 Jun 2024 07:41:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718030505; cv=pass; d=google.com; s=arc-20160816; b=Fo+50+NLq5NlpSq93Tz0stP21BFrpHNi1uKBEOrRcVB7EwBk8HnvU4USqrLc+o9o2Y UdmqYo6YCEWQsV8b2tEVie/kaa6weLMA3wcnwvUddNvJjdtOBe7TYhkR13F+O3c5G5hS 4bm+mJY8v71Lkc821l3WPpiJmdewUkYcy+Fe5i32vrtQ+TLrb6yFIY0zrFCnpfr4CZOs jM3WMSTUtTlYseG2ElfdXqtZxcu2FGQm5PKygi1EahQ1JvrR/9qy1FAVBbNSgmelPnIO 68spvyL28mNiB2/P7oec92CLwpnqCIgdugd56AHi/4BT8hzxqA/UzMaNZ8HqIyXkuKR9 eoLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:sender:dkim-signature; bh=3Oflg6MelnCBiDbZKifqbBRD3GJwcku6VDqLHLAOzRU=; fh=vwcaVrpzA7akE7odmvhwRcsQpIb393/4lzkG5YmizEw=; b=TJ7LLYb4S0HJNkZoE7KS6ichVEg2t7WhPNSjkA46+7ZvgPV8bjuUHzIiKBzO3dX0r5 KndTwQ74YRk3dJHiBQnA2lvAnqRTNJossq1K/yd0MkQUmx8gyJF/2OaH9muEzCOpj3of zpAKxZi1XJBLCbA5TOvKd/VITxib9zXWGqaljUhDiclgEJY9hQwUnEF5+O1fYRTinmAL V6YrNwcMOULHvvSesBMXr66mwOrqlEF0QBKP+vryW8FsgUxgmZiBlFgHDy9OKtgU0IMs zqRSPnGGVpaIArGDzV7t0HMhxe3kSikNl0xlJ9Mu3LocGTRtaFGIrWJD9qZ7s68Mzj1K bVZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hUvxOG6a; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-208380-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208380-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b04f963ceasi106789336d6.287.2024.06.10.07.41.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 07:41:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208380-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hUvxOG6a; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-208380-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208380-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 485D41C22179 for ; Mon, 10 Jun 2024 14:41:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9159D139578; Mon, 10 Jun 2024 14:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hUvxOG6a" Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 1E7F0132138; Mon, 10 Jun 2024 14:41:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718030471; cv=none; b=qrYx0uKF+0d7PajQD/qSep86L9kC3608VQ4/tYrYf0egRJ9Hd6Xv68mn57I3ioTsuab8+eERm+VErAen1qqlHPt4b3JOOrPUh9675gx5Ejff1IlwBn/J+9+aUIHqL1E5eneaBUn1fYHO/ic9H+1b7WBoj+ELsiOWFF9XUCaib40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718030471; c=relaxed/simple; bh=Ewfv6BSJ//H6ogPGQXqz9bBUaJFKXlasAB18jtXeIQs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=mawCabcqvPJDOmu1eRoSSotY26nlqgHnlCQ/oj0ajdtuw/SkOaFoS0359G51+Yc/rLxJjT2mhj35Oi6pFdmtDJtX2Nk6WzQTqxljOGcs+lfUsFUMj4APULtvJlzkqDyJLanZlPdal3Ut0vtet9NkE3MWd4zTVGaz689s189Fjbg= 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=hUvxOG6a; arc=none smtp.client-ip=209.85.210.175 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-f175.google.com with SMTP id d2e1a72fcca58-70423e8e6c9so1614948b3a.0; Mon, 10 Jun 2024 07:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718030469; x=1718635269; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=3Oflg6MelnCBiDbZKifqbBRD3GJwcku6VDqLHLAOzRU=; b=hUvxOG6anxbGdEnnNbebiARJayHN3lX8RbTd4mtMDi+I1twoBN0OildR134wQj7dOl b+btf6AC/EgMq0cFRrqzgErBeSSWgfU1KXfLeSN3XtD+6zowUPJ7UHC9mALiXFANjh8O aM1t877qiO6OYU1OaTG3w4srSvWEc2qH8OjiYhjND90r3ecmMGvaXr698OM+PBjjOvlC mWJ55iE5z2D+IwzfJQ8J8cMjk1/1nReDW4O0OMeU9/ltnjeSCua3M+9nH9zrj3XYUmnk 2IX3y6MUreXSKOVhNwCg032JmTi6gxayks1Z4q1dekbvu/6yBgQXH4FpcD3A8f8h0zHX RC1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718030469; x=1718635269; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3Oflg6MelnCBiDbZKifqbBRD3GJwcku6VDqLHLAOzRU=; b=THnz6whAnVUppVQaTbB3IhDQ4k4746jkA/babpQiXtt2Rqm9KJjcv9+y0YK8rlqhpn YobsKnCDVSQbihv7WGn6x+SrktiJrLMmZOYk0tJCeIpXym1pFGzOBUt5lYifaq2/q54G dbMoupwNiCrlv0B7j87IVKZXNXE2WC5/LwFiul/UbLMgvIOqt5HkO4ZIVg029TX2hSY1 ELiuvascHb3ovEaHTAuMfq/49V30bUBOZOS2rGjunMaznVmRhdOfok8PBspMU5mURcje nIx7c75vC73NgVjrMkN4A59SD52RLSeOdDt5sbV63efQJ3vFJXsXMub/Z39txEWXk4zH wWNw== X-Forwarded-Encrypted: i=1; AJvYcCVl/6djBhpbMV6ojmiZBaJjn/as9yo61yGLs5JeiOkbC5oCzArfB90F8mE8tny9eNEY48DXTBGEBAc2MIgILRhf+UiZWmiON+tpsqxfqm3a8eyg6z0L8a/3uaJh9dM3GQxl2VWDfeJgiw== X-Gm-Message-State: AOJu0YzOT2PU7jwE0AX4Dxy+isg0nNIPLKmjAM33AoUOxzG9sAUBRQ2O 9cSGbTvPrzVSNr60TJpJ3hsO+zkXO+7c1r91nxdffj/ZvIlRHATScaR3EQ== X-Received: by 2002:a05:6a20:9699:b0:1a7:11bf:7b74 with SMTP id adf61e73a8af0-1b2f9df87d5mr8059896637.62.1718030468692; Mon, 10 Jun 2024 07:41:08 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70594077c64sm2081072b3a.6.2024.06.10.07.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 07:41:07 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: linux-hwmon@vger.kernel.org Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski , Wolfram Sang , =?UTF-8?q?Ren=C3=A9=20Rebe?= , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Armin Wolf , Stephen Horvath , Paul Menzel , Guenter Roeck Subject: [PATCH v5 0/6] hwmon: Add support for SPD5118 compliant chips Date: Mon, 10 Jun 2024 07:40:57 -0700 Message-Id: <20240610144103.1970359-1-linux@roeck-us.net> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for SPD5118 (Jedec JESD300) compliant chips supporting a temperature sensor and SPD NVRAM. Such devices are typically found on DDR5 memory modules. The first patch of the series adds SPD5118 devicetree bindings. The second patch adds support for SPD5118 temperature sensors. The third patch adds support for suspend/resume. The 4th patch adds support for reading the SPD NVRAM. The 5th patch adds support for auto-detecting SPD5118 compliant chips to i2c_register_spd() in the i2c-smbus code. The last patch of the series adds a configuration option to make the auto-detect code in the spd5118 driver configurable. Note: The driver introduced with this patch series does not currently support accessing SPD5118 compliant chips in I3C mode. v5: Added Tested-by: tags Cosmetic changes Added reference to LPDDR5 to subject and description of patch 5/6 Updated comments associated with i2c_register_spd() to include support for (LP)DDR5 Replaced #ifdef with IS_ENABLED() and included address_list in conditional code of patch 6/6 v4: Add support for detecting SPD5118 compliant chips in i2c-smbus driver Make auto-detect code in driver optional Fix suspend code Ignore failure to register with nvmem core if it is disabled Use NVMEM_DEVID_NONE instead of NVMEM_DEVID_AUTO in nvmem code, changing nvmem attribute directories from 0-005[0-7]X to 0-005[0-7] v3: Drop explicit bindings document; add binding to trivial devices instead Add support for reading SPD NVRAM v2: Drop PEC support; it only applies to I3C mode. Update documentation Add suspend/resume support ---------------------------------------------------------------- Guenter Roeck (6): dt-bindings: trivial-devices: Add jedec,spd5118 hwmon: Add support for SPD5118 compliant temperature sensors hwmon: (spd5118) Add suspend/resume support hwmon: (spd5118) Add support for reading SPD data i2c: smbus: Support DDR5 and LPDDR5 SPD EEPROMs hwmon: (spd5118) Add configuration option for auto-detection .../devicetree/bindings/trivial-devices.yaml | 2 + Documentation/hwmon/index.rst | 1 + Documentation/hwmon/spd5118.rst | 63 ++ drivers/hwmon/Kconfig | 31 + drivers/hwmon/Makefile | 1 + drivers/hwmon/spd5118.c | 658 +++++++++++++++++++++ drivers/i2c/i2c-smbus.c | 6 +- 7 files changed, 761 insertions(+), 1 deletion(-) create mode 100644 Documentation/hwmon/spd5118.rst create mode 100644 drivers/hwmon/spd5118.c