Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ilia Snezhkov <iasnezhkov@gmail.com>
To: Roman Vivchar <rva333@protonmail.com>
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
	andy@kernel.org, matthias.bgg@gmail.com,
	angelogioacchino.delregno@collabora.com,
	linux-iio@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] iio: adc: mt6359: fix MT6358 VBAT impedance resistance ratio
Date: Fri, 27 Nov 2026 10:28:24 +0800	[thread overview]
Message-ID: <179574650424.5055.6452827952792020438@gmail.com> (raw)
In-Reply-To: <RyeVHYGoYxuKtlQ0QPskoF7emL4yakkPeBUW--rPVYqvaAM4Q5Pm1GACcF4t-1DjyxPPOMNyfAiMnTxVqugYC2MBKxUBhRiDDjtcPNK4Z7Q=@protonmail.com>

Hi Roman,

Thanks for checking on MT6358. On our MT6366 board with the vendor
mt635x_auxadc driver, IMP reads the same raw value as BATADC (26737) and
converts at 3/1, so the divider itself is 3/1 — but comparing mainline
mt6359-auxadc.c against vendor mt635x_auxadc.c shows two differences that
likely explain the timeout you saw:

1. mt6359_auxadc_probe() unconditionally calls mt6359_auxadc_reset()
   (pulsing PMIC_HK_TOP_RST_CON0 0x0f90 with 0x9), whereas the vendor
   driver does not reset AUXADC at probe and relies on bootloader setup.
2. After pulsing HK_TOP_RST_CON0 (0x9 -> 0), the vendor reset table
   (mt6358_rst_setting) also sets AUXADC_RQST0 |= 0x80 and
   AUXADC_RQST1 |= 0x40, which mainline mt6359_auxadc_reset() omits; the
   reset may also clear bootloader-initialized IMP0/IMP1 configuration
   bits while mt6358_start_imp_conv() only sets DCM_CON (0x1260 |= 0x3)
   and IMP1 (0x120a |= BIT(15)).

Since I do not have a mainline MT6358 regmap dump before/after that reset
to verify the root cause directly, I will drop patch 3/3 from v3 and send
only the Tested-by/Reviewed-by RQST0 fix.

Best regards,
Ilia


      reply	other threads:[~2026-11-27  2:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  3:10 [PATCH v2 0/3] iio: adc: mt6359: fix scale divisor, request bits, and MT6358 VBAT ratio Ilia Snezhkov via B4 Relay
2026-11-26  3:10 ` [PATCH v2 1/3] iio: adc: mt6359: divide scale by ADC resolution Ilia Snezhkov via B4 Relay
2026-11-26  7:18   ` Roman Vivchar
2026-11-27  2:19     ` Ilia Snezhkov
2026-11-26  3:10 ` [PATCH v2 2/3] iio: adc: mt6359: fix MT6357 ISENSE/VCDT and MT6358 VCDT request bits Ilia Snezhkov via B4 Relay
2026-11-26  7:32   ` Roman Vivchar
2026-11-27  2:23     ` Ilia Snezhkov
2026-11-26  3:10 ` [PATCH v2 3/3] iio: adc: mt6359: fix MT6358 VBAT impedance resistance ratio Ilia Snezhkov via B4 Relay
2026-11-26  7:35   ` Roman Vivchar
2026-11-27  2:28     ` Ilia Snezhkov [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=179574650424.5055.6452827952792020438@gmail.com \
    --to=iasnezhkov@gmail.com \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=rva333@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