public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
To: alex.vinarskis@gmail.com
Cc: andriy.shevchenko@linux.intel.com, hdegoede@redhat.com,
	lee@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] Fix LPSS clock divider for XPS 9530
Date: Wed, 20 Dec 2023 21:56:19 +0100	[thread overview]
Message-ID: <20231220205621.8575-1-alex.vinarskis@gmail.com> (raw)
In-Reply-To: <20231220073148.19402-1-alex.vinarskis@gmail.com>

Thanks to Andy Shevchenko for the review and suggestions. Fixed
accordingly.

---

Dell XPS 9530 (2023) uses spi-pxa2xx with clock-divider enabled from
intel-lpss with the ratio of 1:32767 (Dell's firmware bug). This caps SPI
controller's speed at very low value of 3051Hz, which makes the interface
practically unusable. Since either spi-pxa2xx or intel-lpss should have
clock divider enabled, not both, and SPI controller can have higher speed
than requested by the device, it is preffered to disable intel-lpss
clock-divider, and let SPI controller handle it.

Fixing this issue directly in Dell firmware by setting lpss divider to 1:1
would've been the ideal solution, but is unlikely to ever happen.

Particular driver already implements customized solution for handling buggy
ACPI tables for select Microsoft devices. This patch series converts it to
a more generic quirk table, and adds a new quirk QUIRK_CLOCK_DIVIDER_UNITY
which forces clock divider to be set to 1:1. In the future, devices with
similar bug (if any) can be easily added to the same pci id lookup table.

Aleksandrs Vinarskis (2):
  mfd: intel-lpss: Switch to generalized quirk table
  mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530

 drivers/mfd/intel-lpss-pci.c | 25 ++++++++++++++++---------
 drivers/mfd/intel-lpss.c     |  9 ++++++++-
 drivers/mfd/intel-lpss.h     | 14 +++++++++++++-
 3 files changed, 37 insertions(+), 11 deletions(-)

-- 
2.40.1


  parent reply	other threads:[~2023-12-20 20:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20  7:31 [PATCH v1 0/2] Fix LPSS clock divider for XPS 9530 Aleksandrs Vinarskis
2023-12-20  7:31 ` [PATCH v1 1/2] mfd: intel-lpss: Switch to generalized quirk table Aleksandrs Vinarskis
2023-12-20 15:08   ` Andy Shevchenko
2023-12-20  7:31 ` [PATCH v1 2/2] mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530 Aleksandrs Vinarskis
2023-12-20 15:12   ` Andy Shevchenko
2023-12-20 20:56 ` Aleksandrs Vinarskis [this message]
2023-12-20 20:56   ` [PATCH v2 1/2] mfd: intel-lpss: Switch to generalized quirk table Aleksandrs Vinarskis
2023-12-21 12:41     ` Andy Shevchenko
2023-12-21 12:46       ` Andy Shevchenko
2023-12-20 20:56   ` [PATCH v2 2/2] mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530 Aleksandrs Vinarskis
2023-12-21 12:42     ` Andy Shevchenko

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=20231220205621.8575-1-alex.vinarskis@gmail.com \
    --to=alex.vinarskis@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.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