From: Mason Chang <mason-cw.chang@mediatek.com>
To: Frank Wunderlich <frank-w@public-files.de>, <rafael@kernel.org>,
<daniel.lezcano@linaro.org>, <rui.zhang@intel.com>,
<lukasz.luba@arm.com>, <angelogioacchino.delregno@collabora.com>,
<nfraprado@collabora.com>, <jpanis@baylibre.com>,
<npitre@baylibre.com>, <colin.i.king@gmail.com>,
<u.kleine-koenig@baylibre.com>, <wenst@chromium.org>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <daniel@makrotopia.org>,
<steven.liu@mediatek.com>, <sam.shih@mediatek.com>
Subject: Re: Aw: [PATCH 2/3] thermal/drivers/mediatek/lvts_thermal: add lvts commands and their sizes to driver data
Date: Thu, 29 May 2025 13:18:28 +0800 [thread overview]
Message-ID: <f0913ce328a2e501566dc311cf8e6c4539d492d3.camel@mediatek.com> (raw)
In-Reply-To: <trinity-319df51e-2ff3-42cd-8efd-139fda159824-1748448614514@trinity-msg-rest-gmx-gmx-live-6995845bd-wzmz6>
Hi Frank,
First of all, thank you for providing the link to the actual issue
case. This issue does not affect all MT7988 ICs. Based on the
information collected from users and production lines, we have found
that about 2% of the ICs show severe temperature anomalies without this
patch.
> Hi Mason,
>
> thank you for working on this.
>
> I have not yet tested the series, but did not have the issue (which
> should be solved by it) reported [1].
>
> So just my thoughts when looking through changes
>
> > Gesendet: Montag, 26. Mai 2025 um 12:26
> > Von: "Mason Chang" <mason-cw.chang@mediatek.com>
> > Betreff: [PATCH 2/3] thermal/drivers/mediatek/lvts_thermal: add
> > lvts commands and their sizes to driver data
> >
> > Add LVTS commands and their sizes to driver data in preparation for
> > adding different commands.
> >
> > Signed-off-by: Mason Chang <mason-cw.chang@mediatek.com>
> > ---
> > drivers/thermal/mediatek/lvts_thermal.c | 65 ++++++++++++++++++++-
> > ----
> > 1 file changed, 52 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/thermal/mediatek/lvts_thermal.c
> > b/drivers/thermal/mediatek/lvts_thermal.c
> > index 7e4f56831..5b7bf29a7 100644
> > --- a/drivers/thermal/mediatek/lvts_thermal.c
> > +++ b/drivers/thermal/mediatek/lvts_thermal.c
> > @@ -96,17 +96,6 @@
> >
> > #define LVTS_MINIMUM_THRESHOLD 20000
> >
> > -static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
> > -/*
> > - * Write device mask: 0xC1030000
> > - */
> > -static const u32 default_init_cmds[] = {
> > - 0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
> > - 0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
> > - 0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
> > - 0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
> > -};
>
> could you please move this block in part 1 to the position used here
> in v2 to avoid deletion/adding again here?
To clearly separate changes and maintain the principle of minimal
modifications, you can see that in patch [1/3], the functions
lvts_ctrl_connect and lvts_ctrl_initialize call the commands.
Therefore, the commands cannot be moved to the part in patch [2/3].
> Maybe magic numbers can be described a bit?
This is just an initialization sequence, it cannot be adjusted.
> > static int golden_temp = LVTS_GOLDEN_TEMP_DEFAULT;
> > static int golden_temp_offset;
> >
> ...
> > @@ -1446,6 +1442,17 @@ static int lvts_resume(struct device *dev)
> > return 0;
> > }
> >
> > +static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
> > +/*
> > + * Write device mask: 0xC1030000
> > + */
> > +static const u32 default_init_cmds[] = {
> > + 0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
> > + 0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
> > + 0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
> > + 0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
> > +};
> > +
> > /*
> > * The MT8186 calibration data is stored as packed 3-byte little-
> > endian
> > * values using a weird layout that makes sense only when viewed
> > as a 32-bit
> > @@ -1740,7 +1747,11 @@ static const struct lvts_ctrl_data
> > mt8195_lvts_ap_data_ctrl[] = {
>
> regards Frank
>
> [1]
> https://urldefense.com/v3/__https://github.com/openwrt/openwrt/pull/18750*issuecomment-2877554514__;Iw!!CTRNKA9wMg0ARbw!lVkeuQXjfQ1pWGSvoDCEmf0FEFQqqQDEb0ovZ5cSsNiXi7hud5epYUyl9xFjO6U7vukgfBY1Ue_-xJ78F5Qe7rw4UzwJyA$
Thank you for focusing on this issue!
Sincerely
Mason
next prev parent reply other threads:[~2025-05-29 5:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 10:26 [PATCH 0/3] thermal/drivers/mediatek/lvts_thermal: add mt7988 lvts commands Mason Chang
2025-05-26 10:26 ` [PATCH 1/3] thermal/drivers/mediatek/lvts_thermal: change lvts commands array to static const Mason Chang
2025-05-26 10:26 ` [PATCH 2/3] thermal/drivers/mediatek/lvts_thermal: add lvts commands and their sizes to driver data Mason Chang
2025-05-28 16:10 ` Aw: " Frank Wunderlich
2025-05-29 5:18 ` Mason Chang [this message]
2025-05-26 10:26 ` [PATCH 3/3] thermal/drivers/mediatek/lvts_thermal: add mt7988 lvts commands Mason Chang
2025-06-16 7:01 ` Aw: [PATCH 0/3] " Frank Wunderlich
2025-07-08 11:56 ` Mason Chang
2025-07-11 12:31 ` Frank Wunderlich
2025-07-16 21:19 ` Daniel Lezcano
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=f0913ce328a2e501566dc311cf8e6c4539d492d3.camel@mediatek.com \
--to=mason-cw.chang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=colin.i.king@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=daniel@makrotopia.org \
--cc=frank-w@public-files.de \
--cc=jpanis@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=nfraprado@collabora.com \
--cc=npitre@baylibre.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sam.shih@mediatek.com \
--cc=steven.liu@mediatek.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=wenst@chromium.org \
/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®