Devicetree
 help / color / mirror / Atom feed
From: Hans de Goede <johannes.goede@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Srinivas Kandagatla <srini@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	Abel Vesa <abel.vesa@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-acpi@vger.kernel.org
Subject: Re: [RFC 00/12] RFC: Devicetree-ACPI hybrid mode
Date: Mon, 29 Jun 2026 12:07:07 +0200	[thread overview]
Message-ID: <9e47c991-0d7c-413f-86a9-33c5322fa85d@oss.qualcomm.com> (raw)
In-Reply-To: <akHTOUvHXooq7ykT@baldur>

Hi Bjorn,

On 29-Jun-26 4:27 AM, Bjorn Andersson wrote:
> On Tue, Jun 23, 2026 at 04:52:13PM +0200, Hans de Goede wrote:
>> Hi All,
>>
>> Currently as soon as the kernel boots with a populated DT provided then
>> the arch/arm64 code sets acpi_disabled=1 and the complete ACPI subsystem
>> gets disabled. On WoA Snapdragon laptops where the factory Windows OS
>> actually boots using these tables this is not necessarily desirable.
>>
>> It might still be interesting to at least parse the ACPI tables and make
>> the ACPI fwnodes available for device-drivers to use. I call this DT-ACPI
>> hybrid mode.
>>
>> This mainly is an experiment for now and possibly a method for accelerating
>> the ongoing effort to run Linux on currently available Snapdragon laptops.
>>
>> On current laptops Linux cannot boot using ACPI due to some information
>> missing from the ACPI tables. People are working on changing this so that
>> for future WoA Snapdragon laptops Linux can boot using ACPI only without
>> requiring Devicetree.
>>
>>
>> There are a couple of scenarios where DT-ACPI hybrid mode is useful:
>>
>> a) This leads to a populated /sys/firmware/acpi/tables allowing one to run
>> acpidump, which is useful to grab info from the ACPI tables when e.g.
>> creating a DT for a new laptop model.
> 
> This depends on the laptop in question sufficiently following the
> reference design, such that you actually have a good enough base DT to
> find those i2c-hid devices...

I agree that even just for i2c-hid devices this series seems to be something
which will not "just work" for all models because vendors seem to just
pick a random i2c bus for the HID devices.

Not sure why you replied this to item "a)" of my enumeration of why the
hybrid mode stuff may be useful. I think this comment of yours belongs
under "c)" ?   "a)" is just about populating /sys/firmware/acpi and
/sys/bus/acpi/devices without any other functional changes.

This difference is important because unlike the rest of the series
I would like to get "a)" upstream eventually (maybe even soon) because
it is a useful debugging tool when writing devicetrees for new models.
 > E.g. on the Glymur-based Asus Zenbook A14 that I recently brought up,
> keyboard sits on a previously unused I2C bus - something I wouldn't know
> without first acpidumping.

Ack.

>> As a bonus /sys/firmware/acpi/bgrt
>> is also populated allowing the boot-splash to show the vendor logo.
>>
>> b) It might be useful for device-drivers to be able to access ACPI data
>> for the device even when running in DT mode. E.g. Srini Kandagatla first
>> got me thinking about this because he wants to use the ACPI MIPI SDCA
>> tables for audio codec routing when booting Linux on Windows Qualcomm X2
>> (Glymur) laptops.
>>
> 
> As I argued during last year's Plumbers, I'm strongly against this, for
> anything but prototyping/experimentation.
> 
> Specifically something like the MIPI SDCA tables, are we going to define
> an ABI across DT/ACPI such that we now require the hybrid system in
> order to build a Glymur-based DT-based product?

I think re-using MIPI SDCA tables rather then having to manually recreate
the same info for each laptop model in DT is actually a good idea. This should
make bringing up sound on Glymur laptops much easier.

I know you worry about a theoretical embedded devicetree only use-case of
Glymur in which case we will need to create DT-bindings for audio then since
there won't be MIPI SCDA tables there.

But your suggested solution to this seems to be to do the work to create
the DT bindings now *and* then also add a lot of work on top to create
the very much non trivial dts bits for each laptop model.

So what you're suggesting is more work now + more work per laptop model
to avoid doing the same amount of work (but then not per model) later
in case an embedded Glymur use-case which is DT only pops up.

As such I agree with Srini that re-using the SCDA tables seems like
a good idea for the Windows laptops use-case.

Just another random thought which popped up in my mind for "b)",
it might be interesting to use the ACPI I2C-HID _DSM to get
the "hid-descr-addr" in case where there are 2 alternative touchpad/
touchscreen sources which share there I2C client address, since we
currently rely on different sources having different I2C addresses
and then I2C-HID silently failing to probe the non existing one.

Actually checking the _STA method for second sources for some components
might be an interesting use-case for the second-source case in general.

>> c) It is also possible to go truely hybrid and use ACPI to instantiate
>> some of the kernel device objects representing the hardware. For example
>> the last patch in this RFC series switches to using ACPI instantiation for
>> the I2C clients for the keyboard and touchpad on the Snapdragon X1E Lenovo
>> ThinkPad T14s gen 6.
>>
> 
> Which introduces the very shortcomings that are a key part of why we
> don't just run off ACPI in the first place today.
> >> d) This may help identify shortcomings in the current ACPI tables which
>> need to be fixed to allow future laptop generations to use ACPI only.
>>
> 
> This is worth looking further at.
> 
>>
>> Upstreaming of these patches (to upstream or not to upstream?).
>>
>> 1. The first couple of patches in this series mainly implement a) + b) from
>> above. This seems like something genuinely useful to have; and except for
>> missing DT-bindings for hybrid mode this seems mostly ready to go upstream.
>>
>> 2. I see c) as a way to slowly evolve support for current Snapdragon laptops
>> to use more and more info from ACPI and get closer to a point where we only
>> need a single DT describing the SoC and any info related to laptop model
>> specific bits outside of the SoC can be read from the ACPI tables.
>>
>> As mentioned above work is being done to have Linux boot on future laptop
>> generations using ACPI only, so all this applies to currently available
>> Snapdragon laptop generations only.
>>
>> The question is what to do wrt upstreaming patches necessary for c) though
>> (patches 7-12) are we going to allow new Devicetree files for not yet
>> supported laptop models to partially rely on ACPI?
>>
>> The current demo ACPI usage in this RFC series just instantiates I2C-HID
>> devices from ACPI. More interesting would be to hookup the embedded
>> controller (EC) handling in the ACPI tables instead of having to write
>> a special EC driver for each laptop model separately. For the EC parts
>> I believe that it might be worthwhile to implement c).
>>
> 
> Wiring up the EC is the one use case that I can think of where the
> hybrid mode would be really interesting, as a hack around the need to
> write custom device drivers for each one.

Ack, I have experimenting with trying to hookup the T14s EC through ACPI
on my DT-ACPI hybrid project TODO list, not sure when I'll get around
to this.

I agree with you that that likely is the most interesting use-case and
any further discussion on if we want hybrid support other then "a)" above
upstream should wait to see how the EC experiment goes.

Regards,

Hans



  reply	other threads:[~2026-06-29 10:07 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <pskkNka1-QtLVb1tcyyUSjNNeMAWUUOLyvn0XSpq55AyeqXnEjOWDCXF1pWVAufJEya52NTx6ZCXz5dMHcMlyQ==@protonmail.internalid>
2026-06-23 14:52 ` [RFC 00/12] RFC: Devicetree-ACPI hybrid mode Hans de Goede
2026-06-23 14:52   ` [RFC 01/12] ACPI: Introduce DT-ACPI " Hans de Goede
2026-06-23 14:52   ` [RFC 02/12] arm64: acpi: Cleanup acpi=[on|off|force] handling Hans de Goede
2026-06-23 14:52   ` [RFC 03/12] arm64: acpi: add acpi=hybrid support Hans de Goede
2026-06-23 14:52   ` [RFC 04/12] ACPI: Add helpers for dealing with ACPI fwnode as secondary fwnode Hans de Goede
2026-06-23 14:52   ` [RFC 05/12] ACPI: glue: Implement setting secondary-fwnode for DT-ACPI hybrid mode Hans de Goede
2026-06-23 14:52   ` [RFC 06/12] ACPI: scan: Retry acpi_device_notify() in " Hans de Goede
2026-06-23 14:52   ` [RFC 07/12] ACPI: Make device_match_acpi_handle() also check the secondary fwnode Hans de Goede
2026-06-23 14:52   ` [RFC 08/12] irqchip/gic-v3: Always call acpi_set_irq_model() Hans de Goede
2026-06-23 14:52   ` [RFC 09/12] pinctrl: qcom: Add support for WoA ACPI tables virtual TLMM pin numbers Hans de Goede
2026-06-29  1:59     ` Bjorn Andersson
2026-06-29 10:30       ` Hans de Goede
2026-06-23 14:52   ` [RFC 10/12] i2c: acpi: Also register ACPI i2c_clients for adapters with a secondary ACPI fwnode Hans de Goede
2026-06-23 14:52   ` [RFC 11/12] i2c: qcom-geni: Fall back to i2c_acpi_find_bus_speed() Hans de Goede
2026-06-23 14:52   ` [RFC 12/12] arm64: dts: qcom: x1e78100-thinkpad-t14s: Move keyb and touchpad to ACPI enumeration Hans de Goede
2026-06-29  1:43     ` Bjorn Andersson
2026-06-29 10:19       ` Hans de Goede
2026-06-25 10:18   ` [RFC 00/12] RFC: Devicetree-ACPI hybrid mode Konrad Dybcio
2026-06-26 14:33   ` Bryan O'Donoghue
2026-06-26 14:43     ` Bryan O'Donoghue
2026-06-29  1:34       ` Bjorn Andersson
2026-06-29  8:41         ` Bryan O'Donoghue
2026-06-26 15:52   ` Sudeep Holla
2026-06-26 20:57     ` Dmitry Baryshkov
2026-06-27 14:12       ` Sudeep Holla
2026-06-28 19:23         ` Dmitry Baryshkov
2026-06-29  8:22           ` Sudeep Holla
2026-06-29  2:27   ` Bjorn Andersson
2026-06-29 10:07     ` Hans de Goede [this message]
2026-06-29 11:48   ` Hanjun Guo

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=9e47c991-0d7c-413f-86a9-33c5322fa85d@oss.qualcomm.com \
    --to=johannes.goede@oss.qualcomm.com \
    --cc=abel.vesa@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=rafael@kernel.org \
    --cc=srini@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