[PATCH v12 3/6] mfd: khadas-mcu: Add support for VIM4 MCU variant
Ronald Claveau
linux-kernel-dev at aliel.fr
Fri Sep 18 01:46:15 PDT 2026
On 9/17/26 10:11 AM, sashiko-bot at kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] mfd: Incorrect writeable registers in VIM4 regmap config
> --
>
> commit fc44329d7ee6d12a0077930b2632df3554d1e38f
> Author: Ronald Claveau <linux-kernel-dev at aliel.fr>
>
> mfd: khadas-mcu: Add support for VIM4 MCU variant
>
> This commit adds support for the VIM4 MCU variant by refactoring the
> probe function to use per-variant values. It introduces a dedicated
> regmap configuration for the VIM4 MCU, with its own volatile and
> writeable register checks.
>
>> diff --git a/drivers/mfd/khadas-mcu.c b/drivers/mfd/khadas-mcu.c
>> index 0e74efe14f367..4b37e74e2b04a 100644
>> --- a/drivers/mfd/khadas-mcu.c
>> +++ b/drivers/mfd/khadas-mcu.c
>
> [ ... ]
>
>> +static bool khadas_mcu_vim4_reg_writeable(struct device *dev, unsigned int reg)
>> +{
>> + switch (reg) {
>> + case KHADAS_MCU_VERSION_0_REG:
>> + case KHADAS_MCU_VERSION_1_REG:
>> + case KHADAS_MCU_SHUTDOWN_NORMAL_STATUS_REG:
>> + return false;
>> + default:
>> + return true;
>
> [Severity: Low]
> Does this function omit multiple known read-only registers defined for the MCU,
> such as KHADAS_MCU_MAC_0_REG and KHADAS_MCU_USID_0_REG?
>
Those registers does not exist on VIM4 MCU variant. So it's free to
ignore in my opinion.
--
Best regards,
Ronald
More information about the linux-amlogic
mailing list