Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp413757pxv; Wed, 30 Jun 2021 08:24:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2W+OYI2f5DxXfdOZ6ehZpG0nuZ13diNo2NsW01vxK9S/fpnKQlMXqqy48w0HOKLZqoj/g X-Received: by 2002:a05:6402:20e:: with SMTP id t14mr16328617edv.193.1625066653654; Wed, 30 Jun 2021 08:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625066653; cv=none; d=google.com; s=arc-20160816; b=IT0AELL19IT704RFFJURv3B08D69+G50F1hNzQj327/0PUP2o0tXo6f4eA4/wOfyx8 MwPzocbwOJTkzmq8PO1dOjSowTvdlcdw4oNXth/TDYGCjr2Mi2/6IReDg8ONSVQSOZSS z+FDGEFIGV0dYxFGekIFiqGuYSngl7bwUCR68O9GsVgByuOfmjMhRDygft8TYK7BeK2K 4IiTui52B1Rf2uAU8CnfcpNoThbnMIo+T5tzbcOfduFewfvpaTO9e/OLTMNHe1n5GLe0 1EU/nIjfvbXWpBwDxHY6DOIqOUrIGss/xDd6qXwRgUOjf3dOa5ooOFEo4mOiZA/SI5mk qEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version; bh=aNsbaawHSZdLzNi+kcO4dCrPNqRYibLDyVHy8t4TKZk=; b=Q4UE2SoWF4BTOCVsJ7ixv0Z+LK/eHhIScFYTY+Qe+861RfPHN4srWe3bo1IbK+TDQl 466SAnf7Oo5ibXoPpSDIk5yB//HJDtxq5MH4EdYJ4uZ3wOXz6eq/Xlsb0ufToG28sZAo 6UR55lLlonxjDq1P4eu//JA11ZmiEqcXFYWxrbzzxLXry2vpnT0SAnXfdoY5moHPu3gA ibngyw9I08YJexl5imMPULbWBvi7O1EMMtQ2dASM5kKBfO8UbCdqBnM9lvGdlswuYGpy hhuYtghLyz2yYg5x7cFwJh7sRJ0D4Hdv01Lzz6EXfkuFT4CzKerdB1VHXd0WllY1Sbei 7RvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hu7si20648846ejc.142.2021.06.30.08.23.49; Wed, 30 Jun 2021 08:24:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235737AbhF3PZN (ORCPT + 99 others); Wed, 30 Jun 2021 11:25:13 -0400 Received: from mail-lf1-f43.google.com ([209.85.167.43]:43937 "EHLO mail-lf1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235508AbhF3PZM (ORCPT ); Wed, 30 Jun 2021 11:25:12 -0400 Received: by mail-lf1-f43.google.com with SMTP id a18so5773749lfs.10; Wed, 30 Jun 2021 08:22:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=aNsbaawHSZdLzNi+kcO4dCrPNqRYibLDyVHy8t4TKZk=; b=YAS17x46bmWWiYyzjOq3sriaKSsCuxpeUMiOL70tFkK3toxvnTOBjNAefB0NEb8ui0 Gsy0DanRScaeRkce03LGyfOEdJWpxM6ijnDrtrgh2ElxDShJPux6JldN6hVw0RBwPqp3 AHuxPLXXzj314MzkeUGQswNI655YpzA6owscrRw2xqqaqPMGHN5BWS+bMqddhBxVEP1T E4boMfdGQybAV4iEXJdkbR//v+/aYoQo3D69tg/OwNGmoPMIPVb/X5CUmvU20dyolVze TnBjLGHyuVdSW5sCDPJxYrCWjevef3kAunTnEkK6mZcbQpUKyWy1G0oh1ynyyi/++Gkl +VXw== X-Gm-Message-State: AOAM532hFUSwNUd4Y6SqjiwrzepegkNfvkvBs2UNQCyRzCjSD3LfygK8 PS+vQRluGiq0xe7jP1ukzfi2Gat93H941A== X-Received: by 2002:a19:520b:: with SMTP id m11mr28294950lfb.548.1625066561628; Wed, 30 Jun 2021 08:22:41 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id r81sm1955032lff.249.2021.06.30.08.22.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Jun 2021 08:22:41 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id t17so5915929lfq.0; Wed, 30 Jun 2021 08:22:40 -0700 (PDT) X-Received: by 2002:a19:7414:: with SMTP id v20mr27452708lfe.203.1625066560684; Wed, 30 Jun 2021 08:22:40 -0700 (PDT) MIME-Version: 1.0 References: <20210629171239.6618-1-hdegoede@redhat.com> In-Reply-To: <20210629171239.6618-1-hdegoede@redhat.com> Reply-To: wens@csie.org From: Chen-Yu Tsai Date: Wed, 30 Jun 2021 23:22:29 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] mfd: axp20x: Update AXP288 volatile ranges To: Hans de Goede Cc: Lee Jones , linux-acpi@vger.kernel.org, linux-kernel , Clamshell Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 1:12 AM 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 > Signed-off-by: Hans de Goede Reviewed-by: Chen-Yu Tsai