From: Neil Armstrong <neil.armstrong@linaro•org>
To: linux-kernel-dev@aliel•fr, Lee Jones <lee@kernel•org>,
Rob Herring <robh@kernel•org>,
Krzysztof Kozlowski <krzk+dt@kernel•org>,
Conor Dooley <conor+dt@kernel•org>,
Andi Shyti <andi.shyti@kernel•org>,
Kevin Hilman <khilman@baylibre•com>,
Jerome Brunet <jbrunet@baylibre•com>,
Martin Blumenstingl <martin.blumenstingl@googlemail•com>,
Beniamino Galvani <b.galvani@gmail•com>,
"Rafael J. Wysocki" <rafael@kernel•org>,
Daniel Lezcano <daniel.lezcano@kernel•org>,
Zhang Rui <rui.zhang@intel•com>,
Lukasz Luba <lukasz.luba@arm•com>,
Liam Girdwood <lgirdwood@gmail•com>,
Mark Brown <broonie@kernel•org>
Cc: linux-amlogic@lists•infradead.org, devicetree@vger•kernel.org,
linux-kernel@vger•kernel.org, linux-i2c@vger•kernel.org,
linux-arm-kernel@lists•infradead.org, linux-pm@vger•kernel.org,
Conor Dooley <conor.dooley@microchip•com>
Subject: Re: [PATCH v6 0/8] Add VIM4 MCU/FAN support
Date: Mon, 18 May 2026 16:17:47 +0200 [thread overview]
Message-ID: <4df49ad2-797b-4971-a8a9-13fd438e7c6f@linaro.org> (raw)
In-Reply-To: <20260516-add-mcu-fan-khadas-vim4-v6-0-cccc9b61f465@aliel.fr>
Hi,
On 5/16/26 19:17, Ronald Claveau via B4 Relay wrote:
> The Khadas VIM4 board features a different MCU variant compared to
> previous VIM boards.
> While it shares the same I2C-based communication model,
> it differs in some ways:
>
> - A distinct register map with its own volatile/writeable register set
> - A fan control with 0–100 levels instead of the 0–3 levels previously
> - A fan power supply gated through a regulator
>
> This series adds support for this new variant by:
>
> 1. Refactoring the khadas-mcu MFD driver to use per-variant data
> structures (regmap config, cells, fan platform data),
> and adding the khadas,vim4-mcu compatible string.
>
> 2. Extending the fan thermal driver to retrieve the fan register
> and maximum level from platform_data,
> and to optionally manage a power regulator for the fan supply.
>
> 3. Adding the corresponding DTS node for the VIM4, wiring the MCU to
> the I2C AO_A bus and exposing it as a thermal cooling device.
I will directly pick patch 6 now, and patch 7 & 8 later when patches 1,2,3,4 are picked
by the i2c & mfd maintainers.
Patch 5 should not be applied without path 4.
Neil
>
> Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel•fr>
> ---
> Changes in v6:
> - PATCH 4: Address Lee's review comments:
> - Use an enum to discriminate between MCU types instead of passing
> MFD data through the DT match table
> - Fix error code from -EINVAL to -ENODEV when no MCU type is matched
> - Make khadas_mcu_fan_cells and khadas_mcu_cells const
> - Use dev_err_probe() for regmap initialization error
> - Document fan speed levels for max_level
> - Link to v5: https://lore.kernel.org/r/20260424-add-mcu-fan-khadas-vim4-v5-0-afcfa7157b23@aliel.fr
>
> Changes in v5:
> - PATCH 5: Replace devm_regulator_get_optional() with devm_regulator_get()
> to simplify error handling and remove NULL checks, also
> ordering as reverse christmas according to Neil's feedback.
> - Link to v4: https://lore.kernel.org/r/20260421-add-mcu-fan-khadas-vim4-v4-0-447114a28f2d@aliel.fr
>
> Changes in v4:
> - PATCH 1: limit fan-supply property by compatible according to Conor's feedback.
> - Link to v3: https://lore.kernel.org/r/20260417-add-mcu-fan-khadas-vim4-v3-0-a6a7f570b11b@aliel.fr
>
> Changes in v3:
> - PATCH 1: adding comment on vim4 compatible saying it is not discoverable,
> thanks to Rob's and Neil's feedback.
> - Link to v2: https://lore.kernel.org/r/20260403-add-mcu-fan-khadas-vim4-v2-0-70536b22439a@aliel.fr
>
> Changes in v2:
> - PATCH 5: Add regulator_disable on suspend thanks to Neil's feedback.
> - Link to v1: https://lore.kernel.org/r/20260402-add-mcu-fan-khadas-vim4-v1-0-2b12eb4ac7b0@aliel.fr
>
> ---
> Ronald Claveau (8):
> dt-bindings: mfd: khadas: Add new compatible for Khadas VIM4 MCU
> dt-bindings: i2c: amlogic: Add compatible for T7 SOC
> mfd: khadas-mcu: Add per-variant configuration infrastructure and VIM4 support
> mfd: khadas-mcu: Add support for VIM4 MCU variant
> thermal: khadas-mcu-fan: Add fan config from platform data Add regulator support
> arm64: dts: amlogic: t7: Add i2c pinctrl node
> arm64: dts: amlogic: t7: Add i2c controller node
> arm64: dts: amlogic: t7: khadas-vim4: Add i2c MCU fan node
>
> .../bindings/i2c/amlogic,meson6-i2c.yaml | 13 ++-
> .../devicetree/bindings/mfd/khadas,mcu.yaml | 18 ++++
> .../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 13 +++
> arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 20 ++++
> drivers/mfd/khadas-mcu.c | 119 ++++++++++++++++++---
> drivers/thermal/khadas_mcu_fan.c | 37 +++++--
> include/linux/mfd/khadas-mcu.h | 44 +++++++-
> 7 files changed, 236 insertions(+), 28 deletions(-)
> ---
> base-commit: f7b64ed948718290209074a50bb0df17e5944873
> change-id: 20260402-add-mcu-fan-khadas-vim4-ac1cbe553c9b
> prerequisite-message-id: <20260326092645.1053261-1-jian.hu@amlogic•com>
> prerequisite-patch-id: f03a086b4137158412b2d47b3de793b858de8dde
> prerequisite-patch-id: 123970c9b29c2090440f2fd71c85d3c6fd8e36de
> prerequisite-patch-id: 3e2e56b0926ba327b520f935df4ced5089bbe503
> prerequisite-patch-id: 65a5d76ffdbc9b3aab3385bb65cb027004c30e7e
> prerequisite-patch-id: 237269801826dd3ad7fb16eb4d7d6d4eab504278
> prerequisite-patch-id: 57e9b08a968aedf543d3d0d56cf1ca4db20b2a16
> prerequisite-change-id: 20260326-add-bcm43752-compatible-e264a4f7973a:v2
> prerequisite-patch-id: cd98b74fa56af72af2553f391c400981d83cd4f4
> prerequisite-patch-id: b730f5e42be1d89d193e63a0265495cdbf2c7d7b
> prerequisite-change-id: 20260330-fix-invalid-property-bbe54d933f71:v2
> prerequisite-patch-id: 8d675e7a239985c762843515b241f0a2f45f9c92
> prerequisite-change-id: 20260331-fix-aml-t7-null-reset-2b608ebf9da4:v1
> prerequisite-patch-id: 5b5de77af11747ce964404fb827d2ee2bff47ea5
> prerequisite-patch-id: 1e37fc75fed1e533adee0f3e7e6ead1f8ff3c55c
> prerequisite-patch-id: 65a5d76ffdbc9b3aab3385bb65cb027004c30e7e
> prerequisite-patch-id: 2daf583fb5e7449a02bd217d8aca330171b598aa
> prerequisite-patch-id: 237269801826dd3ad7fb16eb4d7d6d4eab504278
> prerequisite-patch-id: d1ddf9b7710e91f8062de83bd7ba55afb2c4c112
> prerequisite-patch-id: 57e9b08a968aedf543d3d0d56cf1ca4db20b2a16
> prerequisite-patch-id: cd98b74fa56af72af2553f391c400981d83cd4f4
> prerequisite-patch-id: b730f5e42be1d89d193e63a0265495cdbf2c7d7b
> prerequisite-patch-id: 9debd88fa60febed9cd7208f86603b4c2d270520
> prerequisite-patch-id: 314ef9ff0c4d1d15dab1dea9d92aa065f1eac3e9
>
> Best regards,
prev parent reply other threads:[~2026-05-18 14:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-16 17:17 [PATCH v6 0/8] Add VIM4 MCU/FAN support Ronald Claveau via B4 Relay
2026-05-16 17:17 ` [PATCH v6 1/8] dt-bindings: mfd: khadas: Add new compatible for Khadas VIM4 MCU Ronald Claveau via B4 Relay
2026-05-16 17:17 ` [PATCH v6 2/8] dt-bindings: i2c: amlogic: Add compatible for T7 SOC Ronald Claveau via B4 Relay
2026-05-16 17:17 ` [PATCH v6 3/8] mfd: khadas-mcu: Add per-variant configuration infrastructure and VIM4 support Ronald Claveau via B4 Relay
2026-05-27 14:54 ` Lee Jones
2026-05-16 17:17 ` [PATCH v6 4/8] mfd: khadas-mcu: Add support for VIM4 MCU variant Ronald Claveau via B4 Relay
2026-05-27 14:53 ` Lee Jones
2026-06-03 17:50 ` linux-kernel-dev
2026-05-16 17:17 ` [PATCH v6 5/8] thermal: khadas-mcu-fan: Add fan config from platform data Add regulator support Ronald Claveau via B4 Relay
2026-05-16 17:17 ` [PATCH v6 6/8] arm64: dts: amlogic: t7: Add i2c pinctrl node Ronald Claveau via B4 Relay
2026-05-16 17:17 ` [PATCH v6 7/8] arm64: dts: amlogic: t7: Add i2c controller node Ronald Claveau via B4 Relay
2026-05-16 17:17 ` [PATCH v6 8/8] arm64: dts: amlogic: t7: khadas-vim4: Add i2c MCU fan node Ronald Claveau via B4 Relay
2026-05-18 14:17 ` Neil Armstrong [this message]
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=4df49ad2-797b-4971-a8a9-13fd438e7c6f@linaro.org \
--to=neil.armstrong@linaro$(echo .)org \
--cc=andi.shyti@kernel$(echo .)org \
--cc=b.galvani@gmail$(echo .)com \
--cc=broonie@kernel$(echo .)org \
--cc=conor+dt@kernel$(echo .)org \
--cc=conor.dooley@microchip$(echo .)com \
--cc=daniel.lezcano@kernel$(echo .)org \
--cc=devicetree@vger$(echo .)kernel.org \
--cc=jbrunet@baylibre$(echo .)com \
--cc=khilman@baylibre$(echo .)com \
--cc=krzk+dt@kernel$(echo .)org \
--cc=lee@kernel$(echo .)org \
--cc=lgirdwood@gmail$(echo .)com \
--cc=linux-amlogic@lists$(echo .)infradead.org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-i2c@vger$(echo .)kernel.org \
--cc=linux-kernel-dev@aliel$(echo .)fr \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-pm@vger$(echo .)kernel.org \
--cc=lukasz.luba@arm$(echo .)com \
--cc=martin.blumenstingl@googlemail$(echo .)com \
--cc=rafael@kernel$(echo .)org \
--cc=robh@kernel$(echo .)org \
--cc=rui.zhang@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox