From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Akari Tsuyukusa <akkun11.open@gmail.com>, lee@kernel.org
Cc: matthias.bgg@gmail.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, y.oudjana@protonmail.com
Subject: Re: [PATCH] mfd: mt6397: Properly fix CID of MT6328, MT6331 and MT6332
Date: Mon, 2 Mar 2026 11:46:52 +0100 [thread overview]
Message-ID: <0eaf2427-af8f-4376-8bce-60be800c4a98@collabora.com> (raw)
In-Reply-To: <20260228190820.357538-1-akkun11.open@gmail.com>
Il 28/02/26 20:08, Akari Tsuyukusa ha scritto:
> CIDs set for MT6328, MT6331 and MT6332 are not appropriate.
> Many Android downstream kernels define CID as below,
>
> MT6328:
>
> #define PMIC6328_E1_CID_CODE 0x2810
> #define PMIC6328_E2_CID_CODE 0x2820
> #define PMIC6328_E3_CID_CODE 0x2830
>
> MT6331/MT6332:
>
> #define PMIC6331_E1_CID_CODE 0x3110
> #define PMIC6331_E2_CID_CODE 0x3120
> #define PMIC6331_E3_CID_CODE 0x3130
>
> #define PMIC6332_E1_CID_CODE 0x3210
> #define PMIC6332_E2_CID_CODE 0x3220
> #define PMIC6332_E3_CID_CODE 0x3230
>
> The current configuration incorrectly uses the revision code as the CID.
> Therefore, the driver cannot detect the same PMIC of different revisions.
> (E1/E2 for MT6328, E1/E3 for MT6331/MT6332)
> Based on these, the CID of MT6328, MT6331 and MT6332 should be corrected.
>
> Additionally, the incorrect MT6331/MT6332 CID overlaps with the MT6320's
> actual CID:
>
> #define PMIC6320_E1_CID_CODE 0x1020
> #define PMIC6320_E2_CID_CODE 0x2020
>
> This causes a conflict in the switch-case statement of mt6397-irq.c,
> this prevents adding support for MT6320.
>
> Link: https://github.com/parthibx24/android_kernel_mediatek_k35/blob/4853d1fd9e40563573fa6d6b32b75d571a95e2b7/drivers/misc/mediatek/power/mt6735/pmic.h#L10-L12
> Link: https://github.com/meizuosc/m75/blob/80ef1d26c5d73e131d064138ed09ff5a2be2bed8/mediatek/platform/mt6595/kernel/core/include/mach/pmic_mt6331_6332_sw.h#L9-L15
> Link: https://github.com/toffyjan/android_Ticwatch_S_mooneye/blob/4f2a73b26f3821afc452cdce660cdbc73daf4e4a/arch/arm/mach-mt2601/include/mach/pmic_mt6320_sw.h#L29-L30
Please remove these links, these will be invalid in a few months, so they are
irrelevant.
> Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Anyway:
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cheers,
Angelo
next prev parent reply other threads:[~2026-03-02 10:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 19:08 Akari Tsuyukusa
2026-03-02 10:46 ` AngeloGioacchino Del Regno [this message]
2026-03-02 14:00 ` [PATCH v2] " Akari Tsuyukusa
2026-03-06 13:54 ` (subset) " Lee Jones
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=0eaf2427-af8f-4376-8bce-60be800c4a98@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=akkun11.open@gmail.com \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=y.oudjana@protonmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®