From: Lee Jones <lee.jones@linaro.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Chen-Yu Tsai <wens@csie.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Clamshell <clamfly@163.com>
Subject: Re: [PATCH v2] mfd: axp20x: Update AXP288 volatile ranges
Date: Fri, 16 Jul 2021 08:54:39 +0100 [thread overview]
Message-ID: <YPE7Py9dZqagg9o1@google.com> (raw)
In-Reply-To: <20210629171239.6618-1-hdegoede@redhat.com>
On Tue, 29 Jun 2021, Hans de Goede wrote:
> On Cherry Trail devices with an AXP288 PMIC the external SD-card slot
> used the AXP's DLDO2 as card-voltage and either DLDO3 or GPIO1LDO
> (GPIO1 pin in low noise LDO mode) as signal-voltage.
>
> These regulators are turned on/off and in case of the signal-voltage
> also have their output-voltage changed by the _PS0 and _PS3 power-
> management ACPI methods on the MMC-controllers ACPI fwnode as well as
> by the _DSM ACPI method for changing the signal voltage.
>
> The AML code implementing these methods is directly accessing the
> PMIC through ACPI I2C OpRegion accesses, instead of using the special
> PMIC OpRegion handled by drivers/acpi/pmic/intel_pmic_xpower.c .
>
> This means that the contents of the involved PMIC registers can change
> without the change being made through the regmap interface, so regmap
> should not cache the contents of these registers.
>
> Mark the regulator power on/off, the regulator voltage control and the
> GPIO1 control registers as volatile, to avoid regmap caching them.
>
> Specifically this fixes an issue on some models where the i915 driver
> toggles another LDO using the same on/off register on/off through
> MIPI sequences (through intel_soc_pmic_exec_mipi_pmic_seq_element())
> which then writes back a cached on/off register-value where the
> card-voltage is off causing the external sdcard slot to stop working
> when the screen goes blank, or comes back on again.
>
> The regulator register-range now marked volatile also includes the
> buck regulator control registers. This is done on purpose these are
> normally not touched by the AML code, but they are updated directly
> by the SoC's PUNIT which means that they may also change without going
> through regmap.
>
> Note the AXP288 PMIC is only used on Bay- and Cherry-Trail platforms,
> so even though this is an ACPI specific problem there is no need to
> make the new volatile ranges conditional since these platforms always
> use ACPI.
>
> Fixes: dc91c3b6fe66 ("mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile")
> Fixes: cd53216625a0 ("mfd: axp20x: Fix axp288 volatile ranges")
> Reported-and-tested-by: Clamshell <clamfly@163.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2021-07-16 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 17:12 [PATCH v2] mfd: axp20x: Update AXP288 volatile ranges Hans de Goede
2021-06-30 15:22 ` Chen-Yu Tsai
2021-07-16 7:54 ` Lee Jones [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=YPE7Py9dZqagg9o1@google.com \
--to=lee.jones@linaro.org \
--cc=clamfly@163.com \
--cc=hdegoede@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.