From: Troy Mitchell <troy.mitchell@linux.dev>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>, Yixun Lan <dlan@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>
Cc: Troy Mitchell <troy.mitchell@linux.dev>,
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,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
Jean Delvare <jdelvare@suse.de>
Subject: [PATCH v4 0/6] hwmon: (lm63) Add Sensylink CTF2301 support
Date: Mon, 31 Aug 2026 21:45:34 +0800 [thread overview]
Message-ID: <20260831-ctl2301-v4-0-b335d52a0570@linux.dev> (raw)
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.
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 <troy.mitchell@linux.dev>
---
Changes in v4:
- Rebase onto v7.3-rc1, which includes the SpacemiT I2C timing
prerequisite, and remove the obsolete dependency note.
- Do not add the SENSORS_LM63 THERMAL dependency suggested on v3 because
CONFIG_THERMAL is boolean and v7.3-rc1 removes such tautological
expressions.
- Preserve the upstream five-bit PWM frequency multiplier mask in the
LM63 initialization error-handling path.
- Sort the chip type enum and remove redundant CTF2301 8-bit local
temperature cache updates.
- Serialize CTF2301 12-bit local temperature cache reads.
- Keep PWM configuration caches synchronized after partial I2C write
failures.
- Override the CoM260 I2C6 pin configuration through &i2c6_1_cfg,
as suggested by Yixun.
- Add Krzysztof's Acked-by and Reviewed-by tags.
- Link to v3: https://patch.msgid.link/20260805-ctl2301-v3-0-fd4b8ffb5b0d@linux.dev
Changes in v3:
- Add the Sensylink website link to the vendor-prefix commit.
- Preserve the optional interrupt from the trivial-devices binding.
- Explain in the commit message of patch 3/6 why CTF2301 cannot use
national,lm63 as a fallback compatible.
- Check both bytes of CTF2301 local temperature values before caching them.
- Use the schema-valid 25 mA drive strength for the K3 I2C6 pins.
- Link to v2: https://patch.msgid.link/20260721-ctl2301-v2-0-ef5fb342872a@linux.dev
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 <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
To: Paul Walmsley <pjw@kernel.org>
To: Palmer Dabbelt <palmer@dabbelt.com>
To: Albert Ou <aou@eecs.berkeley.edu>
To: Alexandre Ghiti <alex@ghiti.fr>
To: Yixun Lan <dlan@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
To: Shuah Khan <skhan@linuxfoundation.org>
To: Randy Dunlap <rdunlap@infradead.org>
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 | 55 +++
.../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 | 17 +
arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 11 +
drivers/hwmon/Kconfig | 8 +-
drivers/hwmon/lm63.c | 426 +++++++++++++++++----
8 files changed, 462 insertions(+), 85 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20250916-ctl2301-0416b073c280
Best regards,
--
Troy Mitchell <troy.mitchell@linux.dev>
WARNING: multiple messages have this Message-ID (diff)
From: Troy Mitchell <troy.mitchell@linux.dev>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Guenter Roeck <linux@roeck-us.net>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>, Yixun Lan <dlan@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>
Cc: Troy Mitchell <troy.mitchell@linux.dev>,
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,
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>,
Jean Delvare <jdelvare@suse.de>
Subject: [PATCH v4 0/6] hwmon: (lm63) Add Sensylink CTF2301 support
Date: Mon, 31 Aug 2026 21:45:34 +0800 [thread overview]
Message-ID: <20260831-ctl2301-v4-0-b335d52a0570@linux.dev> (raw)
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.
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 <troy.mitchell@linux.dev>
---
Changes in v4:
- Rebase onto v7.3-rc1, which includes the SpacemiT I2C timing
prerequisite, and remove the obsolete dependency note.
- Do not add the SENSORS_LM63 THERMAL dependency suggested on v3 because
CONFIG_THERMAL is boolean and v7.3-rc1 removes such tautological
expressions.
- Preserve the upstream five-bit PWM frequency multiplier mask in the
LM63 initialization error-handling path.
- Sort the chip type enum and remove redundant CTF2301 8-bit local
temperature cache updates.
- Serialize CTF2301 12-bit local temperature cache reads.
- Keep PWM configuration caches synchronized after partial I2C write
failures.
- Override the CoM260 I2C6 pin configuration through &i2c6_1_cfg,
as suggested by Yixun.
- Add Krzysztof's Acked-by and Reviewed-by tags.
- Link to v3: https://patch.msgid.link/20260805-ctl2301-v3-0-fd4b8ffb5b0d@linux.dev
Changes in v3:
- Add the Sensylink website link to the vendor-prefix commit.
- Preserve the optional interrupt from the trivial-devices binding.
- Explain in the commit message of patch 3/6 why CTF2301 cannot use
national,lm63 as a fallback compatible.
- Check both bytes of CTF2301 local temperature values before caching them.
- Use the schema-valid 25 mA drive strength for the K3 I2C6 pins.
- Link to v2: https://patch.msgid.link/20260721-ctl2301-v2-0-ef5fb342872a@linux.dev
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 <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
To: Paul Walmsley <pjw@kernel.org>
To: Palmer Dabbelt <palmer@dabbelt.com>
To: Albert Ou <aou@eecs.berkeley.edu>
To: Alexandre Ghiti <alex@ghiti.fr>
To: Yixun Lan <dlan@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
To: Shuah Khan <skhan@linuxfoundation.org>
To: Randy Dunlap <rdunlap@infradead.org>
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 | 55 +++
.../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 | 17 +
arch/riscv/boot/dts/spacemit/k3-pinctrl.dtsi | 11 +
drivers/hwmon/Kconfig | 8 +-
drivers/hwmon/lm63.c | 426 +++++++++++++++++----
8 files changed, 462 insertions(+), 85 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20250916-ctl2301-0416b073c280
Best regards,
--
Troy Mitchell <troy.mitchell@linux.dev>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2026-08-31 13:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 13:45 Troy Mitchell [this message]
2026-08-31 13:45 ` [PATCH v4 0/6] hwmon: (lm63) Add Sensylink CTF2301 support Troy Mitchell
2026-08-31 13:45 ` [PATCH v4 1/6] dt-bindings: vendor-prefixes: Add Sensylink Troy Mitchell
2026-08-31 13:45 ` Troy Mitchell
2026-08-31 16:08 ` sashiko-bot
2026-08-31 13:45 ` [PATCH v4 2/6] dt-bindings: hwmon: Move LM63 family to a dedicated binding Troy Mitchell
2026-08-31 13:45 ` Troy Mitchell
2026-08-31 16:17 ` sashiko-bot
2026-08-31 13:45 ` [PATCH v4 3/6] dt-bindings: hwmon: Add Sensylink CTF2301 Troy Mitchell
2026-08-31 13:45 ` Troy Mitchell
2026-08-31 16:20 ` sashiko-bot
2026-08-31 13:45 ` [PATCH v4 4/6] hwmon: (lm63) Add Sensylink CTF2301 support Troy Mitchell
2026-08-31 13:45 ` Troy Mitchell
2026-08-31 16:32 ` sashiko-bot
2026-09-01 6:23 ` Troy Mitchell
2026-09-01 6:23 ` Troy Mitchell
2026-08-31 13:45 ` [PATCH v4 5/6] riscv: dts: spacemit: Add K3 I2C6 pinctrl state Troy Mitchell
2026-08-31 13:45 ` Troy Mitchell
2026-08-31 16:36 ` sashiko-bot
2026-08-31 13:45 ` [PATCH v4 6/6] riscv: dts: spacemit: Add CTF2301 on K3 CoM260 Troy Mitchell
2026-08-31 13:45 ` Troy Mitchell
2026-08-31 16:39 ` sashiko-bot
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=20260831-ctl2301-v4-0-b335d52a0570@linux.dev \
--to=troy.mitchell@linux.dev \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=jdelvare@suse.de \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski@oss.qualcomm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@roeck-us.net \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=rdunlap@infradead.org \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=spacemit@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.