[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <998609e2-0fa4-43e8-9f72-05af40cf62c2@kernel.org>
Date: Fri, 30 Aug 2024 14:57:56 +0200
From: Konrad Dybcio <konradybcio@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>,
Maximilian Luz <luzmaximilian@...il.com>
Cc: Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Marijn Suijten <marijn.suijten@...ainline.org>,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-acpi@...r.kernel.org,
platform-driver-x86@...r.kernel.org, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <quic_kdybcio@...cinc.com>
Subject: Re: [PATCH v3 3/3] platform/surface: Add OF support
On 28.08.2024 9:06 PM, Andy Shevchenko wrote:
> On Wed, Aug 28, 2024 at 8:40 PM Maximilian Luz <luzmaximilian@...il.com> wrote:
>> On 8/28/24 6:56 PM, Andy Shevchenko wrote:
>>> On Wed, Aug 28, 2024 at 12:10 PM Maximilian Luz <luzmaximilian@...il.com> wrote:
>
> ...
>
>>> Yes, and software nodes for DT are quite strange things! Why can't you
>>> simply fix the DT to begin with?
>>
>> For the ARM/DT variants we could do that. But we still have to deal with
>> the x86/ACPI ones here.
>
> So, then fix it there! Currently it's an abuse of software nodes
> inside the Linux kernel.
>
>> So for me it makes more sense to have it unified
>> and just deal with everything in this module.
>
> I understand the desire, but DT is DT and ACPI is ACPI, they are
> different despite having some common APIs in the Linux kernel.
> Moreover, DT has a validation tools and everything, making that being
> a software nodes has at least these disadvantages:
> - no official schema that must be supported and users are known of
> - no validation done
> - bloating of the Linux kernel binary and hence memory footprint
Arguably the last point isn't very strong.. DT also has to store some
strings and pointers to represent devices
>
>> Also, if we consider that at some point we might get ACPI PEP support (I
>> know, far fetched right now): With that, ACPI on ARM might be feasible
>> and then we'd have to manage the same thing in two places...
>
> This (PEP) is something I have no knowledge about. But I think it's
> still orthogonal to the software nodes usage.
The PEP (Power Engine Plugin) unfortunately is the reason we can't have
ACPI-based boot on WoA platforms.. This two-or-three-digit megabyte
Windows driver hardcodes almost everything related to the on-SoC power
management (buses, clocks, etc.) and only uses the bare minimum ACPI it
needs to connect devices to a bus or get notifications on standard events..
>
>> And lastly, the EC subdevices are quite contained and I don't see them
>> interacting with any other components in the DT, so it's more of a
>> stylistic choice where to put them.
>
> They are still part of hardware and DT describes hardware.
Unfortunately the "Surface Aggregator Module" is just a firmware
exposed on some range of MCUs running MSFT's code..
Given how.. peculiarly the "bus" that it hosts """devices""" on is
constructed (5-level-deep hierarchy without it making much sense
beyond maaaybe the first two), it's not really easy to describe in
DT in a way that would be both true to the bigger picture and make
enough sense to convince the DT maintainers, I don't think
Konrad
Powered by blists - more mailing lists