From nobody Sat Jul 25 20:06:04 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 201DA3FA5FC; Tue, 14 Jul 2026 08:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; cv=none; b=U8fE540jyCqTKh3VoliwDA5cBCPPbuvfwxA4SX+OwH+Jsu0NLs5DtH+HFhOmKmEIkq4mG69Wmvv6OoSVJ0JEzqsUrtU074aAJF0HFImrN8eI+/EcIij9SekB2mS3ZWM81pf/M79jfLZNZo0qeTL0KCO1NiWV9K7Gm6Wr4g6PhLY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; c=relaxed/simple; bh=Bn+mjHD2IEppmCcxLbMdGRfdadYeLoPUhKh/DKeDdwM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qvjTuJLjm5upMQijWEZ74YOXLVpGFx6TQL3RByTSwqJbk8u+Oo1nbzPTEEPNrdgEYw4WCKo/ClB2wLExlPfYWGsJSkpAh6mHsGCVeMXeyDPc3YZI2Y07OpHwVolFUhUQBJwZURLxfwev327GhoeJnpj1oCn1gjFiXg0TSos/lc8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IhJd0FKM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IhJd0FKM" Received: by smtp.kernel.org (Postfix) with ESMTPS id 3B463C2BCB9; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1784017271; bh=Bn+mjHD2IEppmCcxLbMdGRfdadYeLoPUhKh/DKeDdwM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=IhJd0FKM3FL/B+CbLNplQdswpf0SyBf127ByKKMShgIg92hk0sSBBI82VZdMPQqCN J4s8Z1t/6RM8/r9/AErUYHF8p+mRzjJuhkO+Okl5OrrU8+IT06x3pvNm0OWbqhep2f qc4Qkx87jo5ZM8cSQRqqvPEUPuVUfbwJ5cJqFDxR6EcKhXCjGPO2Wzwfr7EZY0Z8Vu QZpDB+G66PNQSaoUvQdomxbydOPJQjk2/qnm2FAF1zXI4QXwIIuHMyFMuyPypUHsQ9 FTHUYQxl9CaYad0L7GyfhBHahiHy9GdDjiQ0TTO9DUSISI3PNirZ2c8zSpkBFJdf7+ TZUbXyJfj+6zw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B3F4C44507; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) From: Andy Chung via B4 Relay Date: Tue, 14 Jul 2026 16:19:32 +0800 Subject: [PATCH 1/4] dt-bindings: Add vendor prefix for Kandou 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: quoted-printable Message-Id: <20260714-kb9002-upstream-v1-1-8fd2f0b135d8@amd.com> References: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> In-Reply-To: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Chung , Guenter Roeck , Jonathan Corbet , Shuah Khan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Andy Chung X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784017234; l=789; i=Andy.Chung@amd.com; s=20260327; h=from:subject:message-id; bh=3lNslbOQdXYZMYDoyDnFtx7x1pZDPtfgEkyZivjTfbY=; b=DAYkBBYEDXnUK2/4byzLT1GlXs00Btu812tTfAxJa+4Ximd6TRRy44i+u2B75SMEkL9y3s0Hj KPZwTibzPuZCtD3lroDFhfIUrFWmcYeJYLAg75MyrN6HSBzh4enLfAP X-Developer-Key: i=Andy.Chung@amd.com; a=ed25519; pk=X2gaHRnhU2q5hvMjkC6xmIcC03vKNvHY9CQRdsj9ecM= X-Endpoint-Received: by B4 Relay for Andy.Chung@amd.com/20260327 with auth_id=696 X-Original-From: Andy Chung Reply-To: Andy.Chung@amd.com From: Andy Chung Kandou Bus, S.A. is the vendor of the KB9002 PCIe retimer. Signed-off-by: Andy Chung --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Docum= entation/devicetree/bindings/vendor-prefixes.yaml index 396044f368e7..727871970d97 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -879,6 +879,8 @@ patternProperties: description: JuTouch Technology Co., Ltd. "^kam,.*": description: Kamstrup A/S + "^kandou,.*": + description: Kandou Bus, S.A. "^karo,.*": description: Ka-Ro electronics GmbH "^keithkoep,.*": --=20 2.34.1 From nobody Sat Jul 25 20:06:04 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 205613FC5B9; Tue, 14 Jul 2026 08:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; cv=none; b=Wk7j7FthfeqRk/1JmKF7BSH+w/LGQDb43J/p7iJZ214V/a4jngGBlhALg/sgpWLOJgonMowgyMRn0q1S3IuH7IqovOmIxf1xZqL2n5pg4+ScaDLHIJ6VTZ7ONmgW/IIesS8hmJkFrREJwHrMSM8ILepUb2oJ/35KmZaTQmmHHvg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; c=relaxed/simple; bh=awbzImwgwevD5B+WPMxw/mtoevlgiKoZ2ZmXSNjFfjM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ozXKj2p/FkMQifQ22m3e3rlApbIGM8VXokMlXb0m+nJf3yfpUysQGaWLfRIXF8wozzkXIZkh1NfvN1rNlgCYQ6WoQs7L8wFBBqrOm99xNkSKpuK3dQtEvSlTCfI3JDjnPuvCOkPSfe9Wg+5RUwr284WS9sJWGiPcL2fzAuaRWDI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pWQoZ+lz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pWQoZ+lz" Received: by smtp.kernel.org (Postfix) with ESMTPS id 49F6BC2BCF6; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1784017271; bh=awbzImwgwevD5B+WPMxw/mtoevlgiKoZ2ZmXSNjFfjM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=pWQoZ+lzVjQrc40QTZ28nBJNFfQ51BF8Ni1y0VZpzD579aJZrI2kH3V0EToPJJgGd gW+9eNngOD7LwGbcN+vekD9E4MRZcJcpUZ/fkJDj6h9WVu/ry4BI+Fo/HvcbTCiFkP KkHTrVyt0p97L/1iKTB4q8F3VSQjzGB8qXvrXBqZxgdLPufTt4qbbRc9tTE135J9dN H/SWFs65hTEOMb8vwPW/idVQ5GWHcEU5GnT/tpowvnLG4WEU8q680Sih/jHsc6tMVn bcculRSfEgvifcj3cxzoahxO02r0WD56iul7b0cEuZ9x2BkiFv3DVFYw3WKGAUr6tK KldOJ3qYy2ZpA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29546C43458; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) From: Andy Chung via B4 Relay Date: Tue, 14 Jul 2026 16:19:33 +0800 Subject: [PATCH 2/4] dt-bindings: hwmon: Add Kandou KB9002 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: quoted-printable Message-Id: <20260714-kb9002-upstream-v1-2-8fd2f0b135d8@amd.com> References: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> In-Reply-To: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Chung , Guenter Roeck , Jonathan Corbet , Shuah Khan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Andy Chung X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784017234; l=1681; i=Andy.Chung@amd.com; s=20260327; h=from:subject:message-id; bh=sULzoCWER8/kQnyowJD1BDPPGQySh69msij2k9XFp+Q=; b=8zJAQLtX0kZC4kdR3dcLh1flHMfVeEaL72dbEK0awPhGacrTeMmXHFgUReYt4vLQ5ceUvmLwn XAY7qVIeBCICfNHTb4wz+vqlVXwlZnQngLsPV1dZfRDsUo26PfLU5wt X-Developer-Key: i=Andy.Chung@amd.com; a=ed25519; pk=X2gaHRnhU2q5hvMjkC6xmIcC03vKNvHY9CQRdsj9ecM= X-Endpoint-Received: by B4 Relay for Andy.Chung@amd.com/20260327 with auth_id=696 X-Original-From: Andy Chung Reply-To: Andy.Chung@amd.com From: Andy Chung Add device tree bindings for the Kandou KB9002 PCIe 5.0 retimer, an SMBus target that exposes an aggregated die temperature. Signed-off-by: Andy Chung --- .../devicetree/bindings/hwmon/kandou,kb9002.yaml | 45 ++++++++++++++++++= ++++ 1 file changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/hwmon/kandou,kb9002.yaml b/D= ocumentation/devicetree/bindings/hwmon/kandou,kb9002.yaml new file mode 100644 index 000000000000..67859e9d63c2 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/kandou,kb9002.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/kandou,kb9002.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Kandou KB9002 PCIe 5.0 retimer + +maintainers: + - Andy Chung + +description: | + The Kandou KB9002 is an 8-lane PCIe 5.0 retimer that exposes a + firmware-controlled SMBus 3.0 target on its sideband interface. + The host can query the aggregated maximum die temperature and the + running firmware version through that target. + + The 7-bit SMBus address is selected by three SMB_ADDR straps and + ranges from 0x20 to 0x27. + +properties: + compatible: + const: kandou,kb9002 + + reg: + minimum: 0x20 + maximum: 0x27 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + retimer@20 { + compatible =3D "kandou,kb9002"; + reg =3D <0x20>; + }; + }; --=20 2.34.1 From nobody Sat Jul 25 20:06:04 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 202DC3FB055; Tue, 14 Jul 2026 08:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; cv=none; b=Tn7KkFfRB0Hwu+YpGHftQNtPMWI1AzLoMXf7xu7ESkhVZJOnzMSGFWk7oI8YvI7i4ClH3WcqK6EHAXqFUbkJNnEyeTzhZA8AV5jTf0t3yfgu1JmSiROIp363ftqEMz8O1lDZfdi27YYY80EX68ygtLjm5CfBSYYQyLYPuvR81yM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; c=relaxed/simple; bh=xVgwU56IXPjKPKcSTdUptUX53OdDqgELGCDvbL2TfO0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kGAjt2+Lg42U6pXcaVtjZDRudjAhnpSzWzakhzNFkqDz13ZQHOM+jEWHHpCzhto/m8Hs23UjTvUnWU7Rlaqd+SSHLZ5be67pzkBbW88Dkfw1Jr3vyDyMg4Cd0D3MpgXIvG9ZeZhCCxlGkNdTx52ZAO8390q/UL3u0+1vOZ+l1uU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Dwze69IR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dwze69IR" Received: by smtp.kernel.org (Postfix) with ESMTPS id 551BBC2BCC9; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1784017271; bh=xVgwU56IXPjKPKcSTdUptUX53OdDqgELGCDvbL2TfO0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Dwze69IRyGhCf7N+YGyuWvH66zniv+eSOW/fVnRnTy8DsMKWu1wpDQQAm1/AJTMb4 9eMMbMlj6PTx2WWBt9H2Ox93S+3D/Ga2cbEFuJXYHPgEXwJpBPL9OpAD+OkEOZx7Uk U2aUy7fTV6+m+HuZJbET5R3kqr5WkUG5wSk9cRaD713aLNkxC+6iY3nEk38x5Gsu1V wvCsNN373l2OpOx/JYMf4JOtBmJSpMJHUSN/iIFJL+UTIhsLkLv5bqh5oRyYr6uXcb sv/bSM1j1+5/tbVkeYNz6bVGlGVn0c6gMA/PZY75Tq8j7ZVr4w0evdDizqGGJTb1tI ajJYId8x/mXGw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37B61C44509; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) From: Andy Chung via B4 Relay Date: Tue, 14 Jul 2026 16:19:34 +0800 Subject: [PATCH 3/4] hwmon: (kb9002) Add driver for Kandou KB9002 retimer 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: quoted-printable Message-Id: <20260714-kb9002-upstream-v1-3-8fd2f0b135d8@amd.com> References: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> In-Reply-To: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Chung , Guenter Roeck , Jonathan Corbet , Shuah Khan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Andy Chung X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784017234; l=15621; i=Andy.Chung@amd.com; s=20260327; h=from:subject:message-id; bh=fOOEogfGsGauvHkZsj16I8kc/TQnGgYkoNVrArIxjrk=; b=efv05AnrYb2fUTEpbyXvm/C7u2FsIXky1mM9erC+r852QASiE8XhMWQXyuWND9o8mx3EISFOO Zbb9drDoVsLBngtEmQfOIRKKyEn8f849rh3D2WPCODpNmGVYapA5j4o X-Developer-Key: i=Andy.Chung@amd.com; a=ed25519; pk=X2gaHRnhU2q5hvMjkC6xmIcC03vKNvHY9CQRdsj9ecM= X-Endpoint-Received: by B4 Relay for Andy.Chung@amd.com/20260327 with auth_id=696 X-Original-From: Andy Chung Reply-To: Andy.Chung@amd.com From: Andy Chung The Kandou KB9002 is an 8-lane PCIe 5.0 retimer that exposes an SMBus target with mandatory PEC. Add a hwmon driver reporting the firmware aggregated maximum die temperature as temp1_input, with the firmware version and boot status under debugfs. Signed-off-by: Andy Chung --- MAINTAINERS | 8 + drivers/hwmon/Kconfig | 11 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/kb9002.c | 473 +++++++++++++++++++++++++++++++++++++++++++++= ++++ 4 files changed, 493 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9b4b1575bdbd..1d80ac2660e2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13931,6 +13931,14 @@ S: Maintained F: Documentation/hwmon/k8temp.rst F: drivers/hwmon/k8temp.c =20 +KANDOU KB9002 PCIE RETIMER HWMON DRIVER +M: Andy Chung +L: linux-hwmon@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/hwmon/kandou,kb9002.yaml +F: Documentation/hwmon/kb9002.rst +F: drivers/hwmon/kb9002.c + KASAN M: Andrey Ryabinin R: Alexander Potapenko diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 08c29685126a..300329773e87 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -335,6 +335,17 @@ config SENSORS_K10TEMP This driver can also be built as a module. If so, the module will be called k10temp. =20 +config SENSORS_KB9002 + tristate "Kandou KB9002 PCIe retimer" + depends on I2C + help + If you say yes here you get support for the integrated + temperature sensor and firmware version readout on Kandou + KB9002 PCIe 5.0 retimers, accessed over SMBus. + + This driver can also be built as a module. If so, the module + will be called kb9002. + config SENSORS_KBATT tristate "KEBA battery controller support" depends on KEBA_CP500 diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 63809eeec2f4..0cad7e21634c 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -113,6 +113,7 @@ obj-$(CONFIG_SENSORS_IT87) +=3D it87.o obj-$(CONFIG_SENSORS_JC42) +=3D jc42.o obj-$(CONFIG_SENSORS_K8TEMP) +=3D k8temp.o obj-$(CONFIG_SENSORS_K10TEMP) +=3D k10temp.o +obj-$(CONFIG_SENSORS_KB9002) +=3D kb9002.o obj-$(CONFIG_SENSORS_KBATT) +=3D kbatt.o obj-$(CONFIG_SENSORS_KFAN) +=3D kfan.o obj-$(CONFIG_SENSORS_LAN966X) +=3D lan966x-hwmon.o diff --git a/drivers/hwmon/kb9002.c b/drivers/hwmon/kb9002.c new file mode 100644 index 000000000000..2a3dffe52a62 --- /dev/null +++ b/drivers/hwmon/kb9002.c @@ -0,0 +1,473 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Kandou KB9002 PCIe 5.0 retimer hwmon driver. + * + * The retimer exposes a system management bus (SMBus 3.0 with PEC) + * target for firmware-managed status registers. This driver assumes + * the chip is strapped to SMBus mode and exports the aggregated + * maximum die temperature as hwmon temp1_input (millidegrees Celsius) + * plus the firmware version and boot status under debugfs. + * + * Datasheet: Kandou KB9002 PCIe retimer (KA-015171-PD). + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define KB9002_DEV_NAME "kb9002" + +/* + * SMBus read command codes. Each read is a two-phase PEC-protected + * transaction: prime writes the target address, data reads it back with + * the register contents. FW reads use a 16-bit address, HW reads 32-bit. + */ +#define KB9002_CC_FW_READ_PRIME 0x82 +#define KB9002_CC_FW_READ_DATA 0x81 +#define KB9002_CC_HW_READ_PRIME 0x8a +#define KB9002_CC_HW_READ_DATA 0x89 + +/* Firmware register offsets (16-bit). */ +#define KB9002_FW_REG_VID 0x0004 +#define KB9002_FW_REG_FW_VERSION 0x0500 +#define KB9002_FW_REG_TEMP_MAXIMUM 0x0550 + +#define KB9002_VID_MASK GENMASK(31, 16) +#define KB9002_VID_KANDOU 0x1e6f + +/* Firmware boot status: 0xe8 in the top byte means init completed OK. */ +#define KB9002_HW_REG_FW_BOOT_STATUS 0xe0090008 +#define KB9002_FW_BOOT_STATUS_OK_MSB 0xe8 + +/* + * Hardware registers reached over raw I2C (32-bit addressing). The + * host-interface bit selects SMBus (set) vs raw-I2C target; parts + * strapped to raw I2C need it set before SMBus access works. + */ +#define KB9002_HW_REG_REVID 0x00480004 +#define KB9002_HW_REG_HOST_IF 0x00480008 +#define KB9002_HOST_IF_SMBUS BIT(1) + +#define KB9002_REVID_MASK GENMASK(7, 0) +#define KB9002_REVID_B0 0x10 +#define KB9002_REVID_B1 0x11 + +/* Retries to drain a stray leading 0xff from the raw-I2C FIFO. */ +#define KB9002_REVID_READ_RETRIES 16 + +/* Temperature: 32-bit Q16.16 absolute Kelvin. */ +#define KB9002_TEMP_FRAC_BITS 16 +#define KB9002_ABS_ZERO_MILLI_C (-273150) + +/* Firmware takes up to ~2s to respond after a host-interface change. */ +#define KB9002_FW_READY_POLL_US (25 * USEC_PER_MSEC) +#define KB9002_FW_READY_TIMEOUT_US (2 * USEC_PER_SEC) + +struct kb9002_data { + struct i2c_client *client; + struct mutex lock; /* serialises register accesses */ +}; + +/* Raw-I2C read: write the 32-bit BE address, then read 4 BE data bytes. */ +static int kb9002_i2c_read(struct i2c_client *client, u32 reg, u32 *val) +{ + u8 addr[4]; + u8 rbuf[4]; + struct i2c_msg msgs[2] =3D { + { + .addr =3D client->addr, + .flags =3D 0, + .len =3D sizeof(addr), + .buf =3D addr, + }, + { + .addr =3D client->addr, + .flags =3D I2C_M_RD, + .len =3D sizeof(rbuf), + .buf =3D rbuf, + }, + }; + int ret; + + put_unaligned_be32(reg, addr); + + ret =3D i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); + if (ret < 0) + return ret; + if (ret !=3D ARRAY_SIZE(msgs)) + return -EIO; + + *val =3D get_unaligned_be32(rbuf); + return 0; +} + +/* Raw-I2C write: 4 BE address bytes followed by 4 BE data bytes. */ +static int kb9002_i2c_write(struct i2c_client *client, u32 reg, u32 val) +{ + u8 buf[8]; + struct i2c_msg msg =3D { + .addr =3D client->addr, + .flags =3D 0, + .len =3D sizeof(buf), + .buf =3D buf, + }; + int ret; + + put_unaligned_be32(reg, &buf[0]); + put_unaligned_be32(val, &buf[4]); + + ret =3D i2c_transfer(client->adapter, &msg, 1); + if (ret < 0) + return ret; + if (ret !=3D 1) + return -EIO; + + return 0; +} + +/* + * Read the silicon revision ID. A fresh FIFO may start with a stray + * 0xff that shifts the result, so drain one byte between retries until + * the top byte is no longer 0xff. + */ +static int kb9002_read_revid(struct i2c_client *client, u32 *revid) +{ + u8 dummy; + int ret; + int i; + + for (i =3D 0; i < KB9002_REVID_READ_RETRIES; i++) { + ret =3D kb9002_i2c_read(client, KB9002_HW_REG_REVID, revid); + if (!ret && (*revid >> 24) !=3D 0xff) + return 0; + /* Drain one byte from the chip to re-align the I2C FIFO. */ + i2c_master_recv(client, &dummy, 1); + } + + return ret ? ret : -EIO; +} + +/* + * Read a 32-bit firmware register over SMBus: block-write the 16-bit LE + * address, then block-read the echoed address plus 4 LE data bytes. + */ +static int kb9002_fw_read(struct kb9002_data *data, u16 reg, u32 *val) +{ + struct i2c_client *client =3D data->client; + u8 addr[2]; + u8 rbuf[I2C_SMBUS_BLOCK_MAX]; + int ret; + + put_unaligned_le16(reg, addr); + + mutex_lock(&data->lock); + + ret =3D i2c_smbus_write_block_data(client, KB9002_CC_FW_READ_PRIME, + sizeof(addr), addr); + if (ret < 0) + goto out; + + ret =3D i2c_smbus_read_block_data(client, KB9002_CC_FW_READ_DATA, rbuf); + if (ret < 0) + goto out; + if (ret < (int)(sizeof(addr) + sizeof(*val))) { + ret =3D -EIO; + goto out; + } + + *val =3D get_unaligned_le32(&rbuf[sizeof(addr)]); + ret =3D 0; +out: + mutex_unlock(&data->lock); + return ret; +} + +/* Like kb9002_fw_read but for a hardware register (32-bit LE address). */ +static int kb9002_smbus_hw_read(struct kb9002_data *data, u32 reg, u32 *va= l) +{ + struct i2c_client *client =3D data->client; + u8 addr[4]; + u8 rbuf[I2C_SMBUS_BLOCK_MAX]; + int ret; + + put_unaligned_le32(reg, addr); + + mutex_lock(&data->lock); + + ret =3D i2c_smbus_write_block_data(client, KB9002_CC_HW_READ_PRIME, + sizeof(addr), addr); + if (ret < 0) + goto out; + + ret =3D i2c_smbus_read_block_data(client, KB9002_CC_HW_READ_DATA, rbuf); + if (ret < 0) + goto out; + if (ret < (int)(sizeof(addr) + sizeof(*val))) { + ret =3D -EIO; + goto out; + } + + *val =3D get_unaligned_le32(&rbuf[sizeof(addr)]); + ret =3D 0; +out: + mutex_unlock(&data->lock); + return ret; +} + +/* + * Switch the host interface from raw-I2C to SMBus and wait for firmware + * to come back up. Called only when SMBus access failed in probe, i.e. + * the chip is strapped to raw-I2C mode. Confirms the revision, sets the + * SMBus-mode bit, then polls until firmware responds again. + */ +static int kb9002_enable_smbus_target(struct kb9002_data *data) +{ + struct i2c_client *client =3D data->client; + u32 revid; + u32 val; + int op_ret; + int ret; + + ret =3D kb9002_read_revid(client, &revid); + if (ret) + return dev_err_probe(&client->dev, ret, + "revision ID read failed\n"); + + switch (FIELD_GET(KB9002_REVID_MASK, revid)) { + case KB9002_REVID_B0: + case KB9002_REVID_B1: + break; + default: + return dev_err_probe(&client->dev, -ENODEV, + "unsupported revision ID 0x%08x\n", revid); + } + + ret =3D kb9002_i2c_read(client, KB9002_HW_REG_HOST_IF, &val); + if (ret) + return dev_err_probe(&client->dev, ret, + "host interface read failed\n"); + + val |=3D KB9002_HOST_IF_SMBUS; + + ret =3D kb9002_i2c_write(client, KB9002_HW_REG_HOST_IF, val); + if (ret) + return dev_err_probe(&client->dev, ret, + "host interface write failed\n"); + + /* Wait until firmware re-initialisation completes. */ + ret =3D read_poll_timeout(kb9002_fw_read, op_ret, op_ret =3D=3D 0, + KB9002_FW_READY_POLL_US, + KB9002_FW_READY_TIMEOUT_US, true, + data, KB9002_FW_REG_VID, &val); + if (ret) + return dev_err_probe(&client->dev, ret, + "firmware not responding over SMBus\n"); + + return 0; +} + +/* Convert Q16.16 absolute Kelvin to millidegrees Celsius. */ +static long kb9002_temp_to_milli_c(u32 raw) +{ + s64 milli_k =3D ((s64)raw * 1000) >> KB9002_TEMP_FRAC_BITS; + + return (long)milli_k + KB9002_ABS_ZERO_MILLI_C; +} + +static int kb9002_read_temp(struct kb9002_data *data, long *val) +{ + u32 raw; + int ret; + + ret =3D kb9002_fw_read(data, KB9002_FW_REG_TEMP_MAXIMUM, &raw); + if (ret) + return ret; + + *val =3D kb9002_temp_to_milli_c(raw); + return 0; +} + +static umode_t kb9002_is_visible(const void *drvdata, + enum hwmon_sensor_types type, + u32 attr, int channel) +{ + if (type =3D=3D hwmon_temp && + (attr =3D=3D hwmon_temp_input || attr =3D=3D hwmon_temp_label)) + return 0444; + return 0; +} + +static int kb9002_read(struct device *dev, enum hwmon_sensor_types type, + u32 attr, int channel, long *val) +{ + struct kb9002_data *data =3D dev_get_drvdata(dev); + + if (type =3D=3D hwmon_temp && attr =3D=3D hwmon_temp_input) + return kb9002_read_temp(data, val); + + return -EOPNOTSUPP; +} + +static int kb9002_read_string(struct device *dev, enum hwmon_sensor_types = type, + u32 attr, int channel, const char **str) +{ + if (type =3D=3D hwmon_temp && attr =3D=3D hwmon_temp_label) { + *str =3D KB9002_DEV_NAME; + return 0; + } + return -EOPNOTSUPP; +} + +static const struct hwmon_ops kb9002_hwmon_ops =3D { + .is_visible =3D kb9002_is_visible, + .read =3D kb9002_read, + .read_string =3D kb9002_read_string, +}; + +static const struct hwmon_channel_info * const kb9002_hwmon_info[] =3D { + HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_LABEL), + NULL, +}; + +static const struct hwmon_chip_info kb9002_chip_info =3D { + .ops =3D &kb9002_hwmon_ops, + .info =3D kb9002_hwmon_info, +}; + +static int kb9002_fw_version_show(struct seq_file *s, void *unused) +{ + struct kb9002_data *data =3D s->private; + u32 ver; + int ret; + + ret =3D kb9002_fw_read(data, KB9002_FW_REG_FW_VERSION, &ver); + if (ret) + return ret; + + seq_printf(s, "%u.%02u.%02u.%u\n", + (ver >> 24) & 0xff, (ver >> 16) & 0xff, + (ver >> 8) & 0xff, (ver >> 0) & 0xff); + return 0; +} +DEFINE_SHOW_ATTRIBUTE(kb9002_fw_version); + +static int kb9002_fw_load_status_show(struct seq_file *s, void *unused) +{ + struct kb9002_data *data =3D s->private; + u32 status; + int ret; + + ret =3D kb9002_smbus_hw_read(data, KB9002_HW_REG_FW_BOOT_STATUS, &status); + if (ret) + return ret; + + seq_printf(s, "%s\n", + (status >> 24) =3D=3D KB9002_FW_BOOT_STATUS_OK_MSB ? + "normal" : "abnormal"); + return 0; +} +DEFINE_SHOW_ATTRIBUTE(kb9002_fw_load_status); + +static void kb9002_debugfs_init(struct kb9002_data *data) +{ + struct dentry *dir =3D data->client->debugfs; + + debugfs_create_file("fw_ver", 0444, dir, data, + &kb9002_fw_version_fops); + debugfs_create_file("fw_load_status", 0444, dir, data, + &kb9002_fw_load_status_fops); +} + +static int kb9002_probe(struct i2c_client *client) +{ + struct device *dev =3D &client->dev; + struct kb9002_data *data; + struct device *hwmon_dev; + u32 vid; + int ret; + + if (!i2c_check_functionality(client->adapter, + I2C_FUNC_SMBUS_BLOCK_DATA | + I2C_FUNC_SMBUS_PEC | I2C_FUNC_I2C)) + return -ENODEV; + + data =3D devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; + + data->client =3D client; + mutex_init(&data->lock); + + /* All firmware register accesses are PEC-protected. */ + client->flags |=3D I2C_CLIENT_PEC; + + i2c_set_clientdata(client, data); + + /* + * Try SMBus first. If the chip is strapped to raw-I2C mode it + * will not respond to SMBus framing, so fall back to switching + * the host interface over raw I2C and retry. + */ + ret =3D kb9002_fw_read(data, KB9002_FW_REG_VID, &vid); + if (ret) { + dev_dbg(dev, "SMBus probe failed (%d), trying raw-I2C host-interface swi= tch\n", + ret); + ret =3D kb9002_enable_smbus_target(data); + if (ret) + return ret; + ret =3D kb9002_fw_read(data, KB9002_FW_REG_VID, &vid); + if (ret) + return dev_err_probe(dev, ret, + "VID read failed after host-interface switch\n"); + } + if (FIELD_GET(KB9002_VID_MASK, vid) !=3D KB9002_VID_KANDOU) + return dev_err_probe(dev, -ENODEV, + "unexpected VID 0x%08x\n", vid); + + hwmon_dev =3D devm_hwmon_device_register_with_info(dev, KB9002_DEV_NAME, + data, + &kb9002_chip_info, + NULL); + if (IS_ERR(hwmon_dev)) + return PTR_ERR(hwmon_dev); + + kb9002_debugfs_init(data); + return 0; +} + +static const struct i2c_device_id kb9002_id[] =3D { + { KB9002_DEV_NAME }, + { } +}; +MODULE_DEVICE_TABLE(i2c, kb9002_id); + +static const struct of_device_id kb9002_of_match[] =3D { + { .compatible =3D "kandou,kb9002" }, + { } +}; +MODULE_DEVICE_TABLE(of, kb9002_of_match); + +static struct i2c_driver kb9002_driver =3D { + .driver =3D { + .name =3D KB9002_DEV_NAME, + .of_match_table =3D kb9002_of_match, + }, + .probe =3D kb9002_probe, + .id_table =3D kb9002_id, +}; +module_i2c_driver(kb9002_driver); + +MODULE_AUTHOR("Andy Chung "); +MODULE_DESCRIPTION("Kandou KB9002 PCIe retimer hwmon driver"); +MODULE_LICENSE("GPL"); --=20 2.34.1 From nobody Sat Jul 25 20:06:04 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56E953FAE15; Tue, 14 Jul 2026 08:21:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; cv=none; b=gmAhZwygQJXOzeLL+1m3FMyvE3HF4Kz2snYaJgApW+ui07RGqVS0kCFzr1XMKEPankcoHk36WrkJPS637IwBMh90YRyYkDtFCpjuPKTXA9l8G2dmfFopAsHX6vRrz9DF3YI/a82/+vXEF+eU7W7HY/zffSBRUw3lXhsA/xgLt90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784017273; c=relaxed/simple; bh=12v4kLfM0t53W8e1jIm92V7bHObkh5Z/3ph0XkzStPQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EimKZIQiHGQtAo2/UChdx1BLylomDYOdZgzdV4+L2m8xMC3tpBpgmn1osmsTlvBqRVdmEfn17KLIyyCRdF7rt2VMu3TQInzlDSdEuNfezIrUGGJt2y+ff9M5FOBLXBpKyQRqLUvdW/qD+LWMO3s5bBZkmL1HVp0QuvAKeHcJrjo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vPmZLd3R; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vPmZLd3R" Received: by smtp.kernel.org (Postfix) with ESMTPS id 5E7D7C2BCFA; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1784017271; bh=12v4kLfM0t53W8e1jIm92V7bHObkh5Z/3ph0XkzStPQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=vPmZLd3ReB03x/cOY7Z66BXyUlWt9NN7Bq+3UqiaZbJGKFe2DOSiaHhGGcX4/i03P qkwZE+2aVKlmsL+wCFJnvUY83g8IxTudBtHbZzmrNqRrCWyh3UwEUpQ2tT4uxczjev F9fHIUMX9ZOqAF7PRot3kUjCnDHCBYlHpIPCBWbiHHyGD789D8H/w0dLz37ZZbH/EV EscT6/wu0JPBp+wq3FaAVd8gmkwcilQ8CQklxtfmS+vDZ/o7qwNqaKlX/2ZXNBiFkP tGb93Zjydec50JOUAAPI4cwRCiLkHSratOV2hBTpn1Wtvir2S0LTPCzfrDRXjew6ED 9t2DIeDjEmqKQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46673C44508; Tue, 14 Jul 2026 08:21:11 +0000 (UTC) From: Andy Chung via B4 Relay Date: Tue, 14 Jul 2026 16:19:35 +0800 Subject: [PATCH 4/4] hwmon: (kb9002) Add documentation 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: quoted-printable Message-Id: <20260714-kb9002-upstream-v1-4-8fd2f0b135d8@amd.com> References: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> In-Reply-To: <20260714-kb9002-upstream-v1-0-8fd2f0b135d8@amd.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Chung , Guenter Roeck , Jonathan Corbet , Shuah Khan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org, Andy Chung X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1784017234; l=3142; i=Andy.Chung@amd.com; s=20260327; h=from:subject:message-id; bh=N49+QrvixV76oNVim+qejmy5UhGOUcqywymzDOcJACo=; b=J8pTjlGcewVJ2uWOgm1rGzZ5vNCgSsjQ4/Zo3/xaIYmypB6O33r4rcw7m3RnPnkQxhSeAR1go T1Ciw6+GTJHDZJ0v4rR4st3Bk0UgxZLHrW2ei9UCy1sXs3OSbBbiOzD X-Developer-Key: i=Andy.Chung@amd.com; a=ed25519; pk=X2gaHRnhU2q5hvMjkC6xmIcC03vKNvHY9CQRdsj9ecM= X-Endpoint-Received: by B4 Relay for Andy.Chung@amd.com/20260327 with auth_id=696 X-Original-From: Andy Chung Reply-To: Andy.Chung@amd.com From: Andy Chung Document the sysfs and debugfs interfaces of the Kandou KB9002 hwmon driver. Signed-off-by: Andy Chung --- Documentation/hwmon/index.rst | 1 + Documentation/hwmon/kb9002.rst | 65 ++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 66 insertions(+) diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst index 226789376217..9dc796d087dc 100644 --- a/Documentation/hwmon/index.rst +++ b/Documentation/hwmon/index.rst @@ -112,6 +112,7 @@ Hardware Monitoring Kernel Drivers jc42 k10temp k8temp + kb9002 kbatt kfan lan966x diff --git a/Documentation/hwmon/kb9002.rst b/Documentation/hwmon/kb9002.rst new file mode 100644 index 000000000000..e6d8d9c78923 --- /dev/null +++ b/Documentation/hwmon/kb9002.rst @@ -0,0 +1,65 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Kernel driver kb9002 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Supported chips: + + * Kandou KB9002 + + Prefix: 'kb9002' + + Addresses scanned: - + + Datasheet: KA-015171-PD (available from Kandou under NDA) + +Author: Andy Chung + +Description +----------- + +The Kandou KB9002 is an 8-lane PCIe 5.0 retimer with an integrated +microcontroller. It exposes an SMBus 3.0 target (with mandatory PEC) +on its sideband interface. The internal firmware aggregates per-lane +die temperatures and publishes the maximum value through a 16-bit +addressed register window. + +This driver reports that aggregated maximum as the only hwmon +temperature channel. The running firmware version and the firmware +boot status are exposed under debugfs. + +sysfs interface +--------------- + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +temp1_input Aggregated maximum die temperature across all + active lanes (millidegrees Celsius). +temp1_label Always "kb9002". +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +debugfs interface +----------------- + +Files live in the per-client debugfs directory created by the I2C +core: ``/sys/kernel/debug/i2c/i2c-/-/``. + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +fw_ver Running firmware version in + "major.minor.patch.suffix" format. Read-only. +fw_load_status Firmware boot status: "normal" once firmware has + finished initialising, "abnormal" otherwise. + Read-only. +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Notes +----- + +The driver requires ``I2C_FUNC_SMBUS_BLOCK_DATA``, +``I2C_FUNC_SMBUS_PEC`` and ``I2C_FUNC_I2C`` from the host adapter. The +last is needed only during probe for the host-interface mode switch; +runtime accesses use SMBus block transactions exclusively. + +The retimer's SMBus address is configurable on three strap pins and +ranges from 0x20 to 0x27. The address is selected through device tree +(or i2c board info) the same way as any other I2C device; the driver +does not auto-detect. --=20 2.34.1