From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Konstantin Aladyshev <aladyshev22@gmail.com>
Cc: Florian Eckert <fe@dev.tdt.de>,
linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: Adding I2C devices to the SMBus (PIIX4) via the ACPI SSDT overlay method
Date: Fri, 8 Nov 2024 14:47:00 +0200 [thread overview]
Message-ID: <Zy4IRAeLvoku4LfL@smile.fi.intel.com> (raw)
In-Reply-To: <CACSj6VW7WKv5tiAkLCvSujENJvXq1Mc7_7vtkQsRSz3JGY0i3Q@mail.gmail.com>
On Fri, Nov 08, 2024 at 02:48:44PM +0300, Konstantin Aladyshev wrote:
> Thanks for the help!
> $ cat /sys/bus/acpi/devices/device\:25/path
These cat:s you made are mostly useless in this case. And you should look for
the real device folders in sysfs and firmware_node links there.
...
> However I was using the at24 device only as an example.
> My real target device is jc42
> (https://github.com/torvalds/linux/blob/906bd684e4b1e517dd424a354744c5b0aebef8af/drivers/hwmon/jc42.c#L600).
> Does it mean that jc42 driver doesn't support ACPI binding?
Kinda. I just sent a patch, please test and provide your Tested-by if it helps.
...
> Just in case here is my SSDT:
> ```
> DefinitionBlock ("jc42.aml", "SSDT", 5, "", "JC42", 1)
> {
> External (_SB_.PCI0.SMBS, DeviceObj)
>
> Scope (\_SB_.PCI0.SMBS)
> {
> Device (SMB0) {
> Name (_ADR, 0)
> }
> Device (SMB1) {
> Name (_ADR, 1)
> }
> Device (SMB2) {
> Name (_ADR, 2)
> }
> }
>
> Scope (\_SB.PCI0.SMBS)
While this works, we expect Scope to be under the respective host controller, i.e.
Scope (\_SB.PCI0.SMBS.SMB0)
in your case.
> {
> Device (JC42) {
> Name (_HID, "PRP0001")
> Name (_DDN, "JC42 Temperature sensor")
> Name (_CRS, ResourceTemplate () {
> I2cSerialBusV2 (
> 0x001c, // I2C Slave Address
> ControllerInitiated,
> 400000, // Bus speed
> AddressingMode7Bit,
> "\\_SB.PCI0.SMBS.SMB0", // Link to ACPI I2C host
> controller
> 0
> )
> })
>
> Name (_DSD, Package () {
> ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> Package () {
> Package () { "compatible", Package() {
> "jedec,jc-42.4-temp" } },
> }
> })
> }
> }
> }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-11-08 12:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 15:51 Adding I2C devices to the SMBus (PIIX4) via the ACPI SSDT overlay method Konstantin Aladyshev
2024-11-08 8:26 ` Andy Shevchenko
2024-11-08 8:29 ` Andy Shevchenko
2024-11-08 8:46 ` Andy Shevchenko
2024-11-08 9:27 ` Florian Eckert
2024-11-08 11:23 ` Andy Shevchenko
2024-11-08 11:48 ` Konstantin Aladyshev
2024-11-08 12:47 ` Andy Shevchenko [this message]
2024-11-11 12:09 ` Konstantin Aladyshev
2024-11-11 12:48 ` 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=Zy4IRAeLvoku4LfL@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=aladyshev22@gmail.com \
--cc=fe@dev.tdt.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@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