From: Tsuchiya Yuto <kitakar@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Tsuchiya Yuto <kitakar@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Andy Shevchenko <andy@kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/1] ACPI / PMIC: Add i2c address to intel_pmic_bytcrc driver
Date: Tue, 19 Oct 2021 20:56:04 +0900 [thread overview]
Message-ID: <23d641620aebd1aa47fd73d040dec4ad8974d03d.camel@gmail.com> (raw)
In-Reply-To: <3e6428f1-9411-fac6-9172-1dfe6de58c28@redhat.com>
On Mon, 2021-10-18 at 11:16 +0200, Hans de Goede wrote:
> Hi,
>
> On 10/17/21 18:15, Tsuchiya Yuto wrote:
> > On Microsoft Surface 3 (uses Intel's Atom Cherry Trail SoC), executing
> > intel_soc_pmic_exec_mipi_pmic_seq_element() results in the following
> > error message:
> >
> > [ 7196.356682] intel_soc_pmic_exec_mipi_pmic_seq_element: Not implemented
> > [ 7196.356686] intel_soc_pmic_exec_mipi_pmic_seq_element: i2c-addr: 0x6e reg-addr 0x57 value 0x63 mask 0xff
> >
> > Surface 3 uses the PMIC device INT33FD, and the DSDT describes its _HRV
> > value is 0x02 [1]:
> >
> > Scope (PCI0.I2C7)
> > {
> > Device (PMIC)
> > {
> > Name (_ADR, Zero) // _ADR: Address
> > Name (_HID, "INT33FD" /* Intel Baytrail Power Management IC */) // _HID: Hardware ID
> > Name (_CID, "INT33FD" /* Intel Baytrail Power Management IC */) // _CID: Compatible ID
> > Name (_DDN, "CRYSTAL COVE+ AIC") // _DDN: DOS Device Name
> > Name (_HRV, 0x02) // _HRV: Hardware Revision
> > Name (_UID, One) // _UID: Unique ID
> > Name (_DEP, Package (0x01) // _DEP: Dependencies
> > {
> > I2C7
> > })
> > [...]
> >
> > Due to this _HRV value, intel_pmic_bytcrc is used as the PMIC driver.
> > However, the i2c address is currently not defined in this driver.
> > This commit adds the missing i2c address 0x6e to the intel_pmic_bytcrc
> > driver.
> >
> > [1] https://github.com/linux-surface/acpidumps/blob/f8db3d150815aa21530635b7e646eee271e3b8fe/surface_3/dsdt.dsl#L10868
> >
> > References: cc0594c4b0ef ("ACPI / PMIC: Add i2c address for thermal control")
> > Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
>
> I believe that it is very unlikely that a device with a Cherry Trail SoC is actually using
> the Bay Trail version of the PMIC, I would expect that to not necessarily work all that well.
>
> So as Andy said, the right fix here is something like the:
>
> + hrv = 0x03;
>
> Workaround from your cover-letter.
>
> As Andy said we could use a DMI quirk for this, but chances are that the Microsoft Surface
> DSDT is not the only one with the wrong HRV value. So instead it might be better to
> just test for the SoC type as the attached patch does.
>
> Tsuchiya, can you give the attached patch a try.
Thanks!
I tried your attached patch, and I can confirm that it's working as
expected.
Now it's using cht one:
$ ls /sys/devices/pci0000:00/808622C1:05/i2c-5/i2c-INT33FD:00
cht_crystal_cove_pmic crystal_cove_gpio crystal_cove_pwm driver firmware_node modalias name power subsystem uevent
and the function intel_soc_pmic_exec_mipi_pmic_seq_element() is also
working with atomisp driver.
Regards,
Tsuchiya Yuto
next prev parent reply other threads:[~2021-10-19 11:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-17 16:15 [RFC PATCH 0/1] add ccove PMIC i2c address for Microsoft Surface 3 Tsuchiya Yuto
2021-10-17 16:15 ` [RFC PATCH 1/1] ACPI / PMIC: Add i2c address to intel_pmic_bytcrc driver Tsuchiya Yuto
2021-10-17 19:08 ` Andy Shevchenko
2021-10-19 11:45 ` Tsuchiya Yuto
2021-10-18 9:16 ` Hans de Goede
2021-10-18 10:31 ` Andy Shevchenko
2021-10-18 10:38 ` Hans de Goede
2021-10-18 10:46 ` Andy Shevchenko
2021-10-18 14:01 ` Hans de Goede
2021-10-18 10:50 ` Andy Shevchenko
2021-10-19 11:56 ` Tsuchiya Yuto [this message]
2021-10-19 12:05 ` Andy Shevchenko
2021-10-19 12:17 ` Tsuchiya Yuto
2021-10-17 18:53 ` [RFC PATCH 0/1] add ccove PMIC i2c address for Microsoft Surface 3 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=23d641620aebd1aa47fd73d040dec4ad8974d03d.camel@gmail.com \
--to=kitakar@gmail.com \
--cc=andy@kernel.org \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@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