From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7362FC44529 for ; Tue, 21 Jul 2026 09:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lGQ3p7yMyXteTnCERLYd4M3QqbO9oLy4WTYcxUcXNsc=; b=AizGIcgCEXAzPS cMYR8cQOlDBaalEm6figBYQFxpd8kBXgkOLMf9XlndSIxccJhzCc9jcUq77P+ajKKspQbFIVSXsQh 0+LgmgCY1Xpxx73NYaiH2QKx8qVzKUJJcYhEudIc/J5kc/UTnheOhNf/WHUXeB3p99ztytMSBIq0L 5YgiJjjbyUXBlMSx9XcdzjW1Am0K1niqEcJqg/X4BWGSqHzc1MwK1zcCvjEOG1doGbqUSww2xed5o vTy9RYXv1aUroRmLkO8nRR1KguzY+y49Pvw53bSUFb1qgKPli+U7fyrVVuSd8kUSvQAutjPmDJB4V bU7cS7N9YP1jBAjoC9ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wm75r-000000090yL-3tgH; Tue, 21 Jul 2026 09:48:55 +0000 Received: from out-181.mta0.migadu.com ([91.218.175.181]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wm75o-000000090xn-2AX1 for linux-riscv@lists.infradead.org; Tue, 21 Jul 2026 09:48:54 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784627326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qItdemN2VjjBBlZQtxInsZBw9ADrmvr0MbevsqcHD1s=; b=n34G9VU4ASHowXrkO6ymj5wOj+Hhz7LPiaXvB2nNIMszIkqTdqaEIdEqRQdFDIwZy2TELB 1B8P2aCnGrmLwmfzmmiy2ejsxcHXyvwgkGRFI91I+UfnaSHtBXAerO/qobiXIuKJLn4ySC ii6P833hl+YUP9JDkrHTOMlsoRjfL8U= From: Troy Mitchell Subject: [PATCH v2 0/6] hwmon: (lm63) Add Sensylink CTF2301 support Date: Tue, 21 Jul 2026 02:48:26 -0700 Message-Id: <20260721-ctl2301-v2-0-ef5fb342872a@linux.dev> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAAAAAAAC/2XMQQ6CMBCF4auQWVszHSoFV97DsNAyyCQESIsNh vTuVrYu/5eXb4fAXjjAtdjBc5Qg85SDTgW44TG9WEmXGwjpgo2ulFtHKlErNLp6oi0d1Qj5vXj uZTuke5t7kLDO/nPAUf/WfyNmRjWWratNT87Y2yjTezt3HKFNKX0BUHUPFZ4AAAA= X-Change-ID: 20250916-ctl2301-0416b073c280 To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Guenter Roeck , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Yixun Lan , Jonathan Corbet , Shuah Khan Cc: Troy Mitchell , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-doc@vger.kernel.org, Jean Delvare X-Developer-Signature: v=1; a=openpgp-sha256; l=5529; i=troy.mitchell@linux.dev; h=from:subject:message-id; bh=ZuBbGDtILLJc9cljeN2cxK5OUQN09Do0FRqsNBN0hcg=; b=owGbwMvMwCU2g/N9w09jE33G02pJDFnxDnlPzDzTcg1bZky8su906bqlev4H332b6yFzQoa5q HVvmNe3jlIWBjEuBlkxRZbuBzzbCnyibAsECn1h5rAygQxh4OIUgImsusLwv+jXFbtlq7vbTv8+ sFswl8eiv7VaRfjlhr6NOdlnF3m8b2Bk+KvafvfxloTObI0oqa2rk5nXeHNtbau2s3r3cmPR/sU PeQE= X-Developer-Key: i=troy.mitchell@linux.dev; a=openpgp; fpr=3FE5535CF1B0E658E57DB59BAE1C2FBEA7DB42E1 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260721_024852_790815_2E16C778 X-CRM114-Status: GOOD ( 17.41 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Sensylink CTF2301 is a system-level thermal management solution chip. The CTF2301 is an I2C/SMBus compatible device featuring: - One local temperature sensor with +/-0.5 degree C accuracy and 0.0625 degree C resolution. - One remote temperature sensor for external diode-connected transistors, offering +/-1 degree C accuracy and 0.125 degree C resolution (temperature range: -40 degree C to +125 degree C). - An integrated PWM fan controller capable of operating in two modes: 1. Direct-DCY: Open-loop direct duty cycle control. 2. Auto-Temp: Closed-loop automatic fan speed control based on measured temperature. - A 1-channel fan speed monitor (TACH input) for RPM measurement. As Guenter pointed out on v1, the CTF2301 register map is a near match for the LM63/LM96163 family (local and remote temperature, tachometer and PWM fan control), so this version drops the standalone ctf2301 driver and instead adds CTF2301 as a new chip type in the existing lm63 driver. This reuses the shared temperature, limit, alarm and PWM handling instead of duplicating it. The CTF2301-specific differences are handled on top of lm63: 12-bit local temperature input and high-limit values, nine conversion rates, 12 fan-control lookup table entries, and optional 22.5 kHz high-resolution PWM. When no IRQ is described, the shared ALERT/TACH pin is configured as a tachometer input. The LM63 family can also register as a thermal cooling device when the device tree provides the #cooling-cells property. The required SpacemiT I2C controller clock series has been merged but is not yet included in an rc release: https://lore.kernel.org/all/20260508-k1-i2c-ilcr-v7-0-8c2dde5c3ed5@linux.spacemit.com/ Apply that series before testing this series on K3. Without it, the I2C controller cannot generate an accurate 400 kHz SCL clock and CTF2301 accesses may fail. Tested on a SpacemiT K3 CoM260 by booting an initramfs and verifying the CTF2301 probe. Temperature, tachometer, PWM, and conversion-rate behavior were checked against direct I2C register accesses and the datasheet. Datasheet: https://www.sensylink.com/upload/1/net.sensylink.portal/1689557281035.pdf Register description: https://github.com/TroyMitchell911/ctf2301-datasheet Signed-off-by: Troy Mitchell --- Changes in v2: - Replace the standalone CTF2301 driver with a new lm63 chip type, as suggested by Guenter, reusing the existing temperature, limit, alarm, tachometer, PWM, and automatic fan-control paths. - Add the temperature thresholds, alarms, and automatic fan-control lookup table support which were missing from the v1 driver. - Handle CTF2301-specific 12-bit local temperature values, nine conversion rates, 12 lookup table entries, shared ALERT/TACH pin, and optional 22.5 kHz high-resolution PWM. - Propagate SMBus failures from lm63 initialization and write paths. - Add optional thermal cooling-device support for the LM63 family using the existing manual PWM control path. - Move the National LM63-family compatibles from trivial-devices.yaml to a dedicated binding which permits #cooling-cells. - Add CTF2301 to the LM63-family binding instead of keeping the standalone schema from v1. Do not declare #cooling-cells on K3 CoM260 yet because the board has no thermal consumer. - Fix the binding errors reported by Rob by using a plain compatible string and wrapping the description. - Document CTF2301 support in the lm63 hwmon documentation and provide the detailed register description used for review. - Add the K3 CoM260 I2C6 pinctrl state and CTF2301 device node for hardware testing. - Link to v1: https://lore.kernel.org/r/20250916-ctl2301-v1-0-97e7c84f2c47@linux.dev To: Rob Herring To: Krzysztof Kozlowski To: Conor Dooley To: Guenter Roeck To: Paul Walmsley To: Palmer Dabbelt To: Albert Ou To: Alexandre Ghiti To: Yixun Lan To: Jonathan Corbet To: Shuah Khan Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-hwmon@vger.kernel.org Cc: linux-riscv@lists.infradead.org Cc: spacemit@lists.linux.dev Cc: linux-doc@vger.kernel.org --- Troy Mitchell (6): dt-bindings: vendor-prefixes: Add Sensylink dt-bindings: hwmon: Move LM63 family to a dedicated binding dt-bindings: hwmon: Add Sensylink CTF2301 hwmon: (lm63) Add Sensylink CTF2301 support riscv: dts: spacemit: Add K3 I2C6 pinctrl state riscv: dts: spacemit: Add CTF2301 on K3 CoM260 .../devicetree/bindings/hwmon/national,lm63.yaml | 52 +++ .../devicetree/bindings/trivial-devices.yaml | 6 - .../devicetree/bindings/vendor-prefixes.yaml | 2 + Documentation/hwmon/lm63.rst | 22 ++ arch/riscv/boot/dts/spacemit/k3-com260.dtsi | 19 + arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 11 + drivers/hwmon/Kconfig | 8 +- drivers/hwmon/lm63.c | 393 +++++++++++++++++---- 8 files changed, 433 insertions(+), 80 deletions(-) --- base-commit: a13c140cc289c0b7b3770bce5b3ad42ab35074aa change-id: 20250916-ctl2301-0416b073c280 Best regards, -- Troy Mitchell _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv