diff mbox series

[v4,2/4] platform: Add ARM64 platform directory

Message ID 20240312-aspire1-ec-v4-2-bd8e3eea212f@trvn.ru (mailing list archive)
State Superseded
Headers show
Series platform: arm64: Acer Aspire 1 embedded controller | expand

Commit Message

Nikita Travkin March 12, 2024, 8:42 a.m. UTC
Some ARM64 based laptops and computers require vendor/board specific
drivers for their embedded controllers. Even though usually the most
important functionality of those devices is implemented inside ACPI,
unfortunately Linux doesn't currently have great support for ACPI on
platforms like Qualcomm Snapdragon that are used in most ARM64 laptops
today. Instead Linux relies on Device Tree for Qualcomm based devices
and it's significantly easier to reimplement the EC functionality in
a dedicated driver than to make use of ACPI code.

This commit introduces a new platform/arm64 subdirectory to give a
place to such drivers for EC-like devices.

A new MAINTAINERS entry is added for this directory. Patches to files in
this directory will be taken up by the platform-drivers-x86 team (i.e.
Hans de Goede and Mark Gross).

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
 MAINTAINERS                     |  9 +++++++++
 drivers/platform/Kconfig        |  2 ++
 drivers/platform/Makefile       |  1 +
 drivers/platform/arm64/Kconfig  | 19 +++++++++++++++++++
 drivers/platform/arm64/Makefile |  6 ++++++
 5 files changed, 37 insertions(+)

Comments

Bryan O'Donoghue March 12, 2024, 11:36 a.m. UTC | #1
On 12/03/2024 08:42, Nikita Travkin wrote:
> Some ARM64 based laptops and computers require vendor/board specific
> drivers for their embedded controllers. Even though usually the most
> important functionality of those devices is implemented inside ACPI,
> unfortunately Linux doesn't currently have great support for ACPI on
> platforms like Qualcomm Snapdragon that are used in most ARM64 laptops
> today. Instead Linux relies on Device Tree for Qualcomm based devices
> and it's significantly easier to reimplement the EC functionality in
> a dedicated driver than to make use of ACPI code.
> 
> This commit introduces a new platform/arm64 subdirectory to give a
> place to such drivers for EC-like devices.
> 
> A new MAINTAINERS entry is added for this directory. Patches to files in
> this directory will be taken up by the platform-drivers-x86 team (i.e.
> Hans de Goede and Mark Gross).
> 
> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> ---
>   MAINTAINERS                     |  9 +++++++++
>   drivers/platform/Kconfig        |  2 ++
>   drivers/platform/Makefile       |  1 +
>   drivers/platform/arm64/Kconfig  | 19 +++++++++++++++++++
>   drivers/platform/arm64/Makefile |  6 ++++++
>   5 files changed, 37 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index b43102ca365d..ec8d706a99aa 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3050,6 +3050,15 @@ F:	drivers/mmc/host/sdhci-of-arasan.c
>   N:	zynq
>   N:	xilinx
>   
> +ARM64 PLATFORM DRIVERS
> +M:	Hans de Goede <hdegoede@redhat.com>
> +M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> +L:	platform-driver-x86@vger.kernel.org
> +S:	Maintained
> +Q:	https://patchwork.kernel.org/project/platform-driver-x86/list/
> +T:	git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git

Surely some sort of Arm specific mailing list should be added here ? 
platform-drivers-x86 for arm64 platform drivers standalone, makes little 
sense.

Perhaps for each new SoC class added - you could add the appropriate 
mailing list linux-arm-msm is suspiciously missing from the list even 
though the only driver that will live in this directory after this 
series is a qcom based device.

And if tomorrow someone added a Rockchip based EC controller then you'd 
assume the rockchip mailing list should get a ping.

---
bod
Ilpo Järvinen March 12, 2024, 11:40 a.m. UTC | #2
On Tue, 12 Mar 2024, Nikita Travkin wrote:

> Some ARM64 based laptops and computers require vendor/board specific
> drivers for their embedded controllers. Even though usually the most
> important functionality of those devices is implemented inside ACPI,
> unfortunately Linux doesn't currently have great support for ACPI on
> platforms like Qualcomm Snapdragon that are used in most ARM64 laptops
> today. Instead Linux relies on Device Tree for Qualcomm based devices
> and it's significantly easier to reimplement the EC functionality in
> a dedicated driver than to make use of ACPI code.
> 
> This commit introduces a new platform/arm64 subdirectory to give a
> place to such drivers for EC-like devices.
> 
> A new MAINTAINERS entry is added for this directory. Patches to files in
> this directory will be taken up by the platform-drivers-x86 team (i.e.
> Hans de Goede and Mark Gross).

Mark -> me.

> +ARM64 PLATFORM DRIVERS
> +M:	Hans de Goede <hdegoede@redhat.com>
> +M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> +L:	platform-driver-x86@vger.kernel.org
> +S:	Maintained
> +Q:	https://patchwork.kernel.org/project/platform-driver-x86/list/
> +T:	git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
> +F:	drivers/platform/arm64/

Is some ARM64 person going to pay attention to these patches (you or 
perhaps somebody else)?

It's perfectly fine to have some ARM64 person(s) listed as an additional 
maintainer there even if the patches themselves are routed through Hans 
and me (and pdx86 tree). With Mellanox and Surface platform drivers which 
are also routed through pdx86 tree, we have Hans + me + 3rd person listed 
as maintainers.

(This is not to force anything on anyone but it could be beneficial if 
somebody more familiar with ARM64 is in the loop.)
Ilpo Järvinen March 12, 2024, 11:45 a.m. UTC | #3
On Tue, 12 Mar 2024, Bryan O'Donoghue wrote:

> On 12/03/2024 08:42, Nikita Travkin wrote:
> > Some ARM64 based laptops and computers require vendor/board specific
> > drivers for their embedded controllers. Even though usually the most
> > important functionality of those devices is implemented inside ACPI,
> > unfortunately Linux doesn't currently have great support for ACPI on
> > platforms like Qualcomm Snapdragon that are used in most ARM64 laptops
> > today. Instead Linux relies on Device Tree for Qualcomm based devices
> > and it's significantly easier to reimplement the EC functionality in
> > a dedicated driver than to make use of ACPI code.
> > 
> > This commit introduces a new platform/arm64 subdirectory to give a
> > place to such drivers for EC-like devices.
> > 
> > A new MAINTAINERS entry is added for this directory. Patches to files in
> > this directory will be taken up by the platform-drivers-x86 team (i.e.
> > Hans de Goede and Mark Gross).
> > 
> > Signed-off-by: Nikita Travkin <nikita@trvn.ru>
> > ---
> >   MAINTAINERS                     |  9 +++++++++
> >   drivers/platform/Kconfig        |  2 ++
> >   drivers/platform/Makefile       |  1 +
> >   drivers/platform/arm64/Kconfig  | 19 +++++++++++++++++++
> >   drivers/platform/arm64/Makefile |  6 ++++++
> >   5 files changed, 37 insertions(+)
> > 
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index b43102ca365d..ec8d706a99aa 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -3050,6 +3050,15 @@ F:	drivers/mmc/host/sdhci-of-arasan.c
> >   N:	zynq
> >   N:	xilinx
> >   +ARM64 PLATFORM DRIVERS
> > +M:	Hans de Goede <hdegoede@redhat.com>
> > +M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> > +L:	platform-driver-x86@vger.kernel.org
> > +S:	Maintained
> > +Q:	https://patchwork.kernel.org/project/platform-driver-x86/list/
> > +T:	git
> > git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
> 
> Surely some sort of Arm specific mailing list should be added here ?
> platform-drivers-x86 for arm64 platform drivers standalone, makes little
> sense.
> 
> Perhaps for each new SoC class added - you could add the appropriate mailing
> list linux-arm-msm is suspiciously missing from the list even though the only
> driver that will live in this directory after this series is a qcom based
> device.
> 
> And if tomorrow someone added a Rockchip based EC controller then you'd assume
> the rockchip mailing list should get a ping.

While generic arm mailing list is perhaps lacking too, for specific 
driver related lists it is better to add separate MAINTAINERS entries for 
the particular driver and put L: there.
Nikita Travkin March 12, 2024, 11:55 a.m. UTC | #4
Bryan O'Donoghue писал(а) 12.03.2024 16:36:
> On 12/03/2024 08:42, Nikita Travkin wrote:
>> Some ARM64 based laptops and computers require vendor/board specific
>> drivers for their embedded controllers. Even though usually the most
>> important functionality of those devices is implemented inside ACPI,
>> unfortunately Linux doesn't currently have great support for ACPI on
>> platforms like Qualcomm Snapdragon that are used in most ARM64 laptops
>> today. Instead Linux relies on Device Tree for Qualcomm based devices
>> and it's significantly easier to reimplement the EC functionality in
>> a dedicated driver than to make use of ACPI code.
>>
>> This commit introduces a new platform/arm64 subdirectory to give a
>> place to such drivers for EC-like devices.
>>
>> A new MAINTAINERS entry is added for this directory. Patches to files in
>> this directory will be taken up by the platform-drivers-x86 team (i.e.
>> Hans de Goede and Mark Gross).
>>
>> Signed-off-by: Nikita Travkin <nikita@trvn.ru>
>> ---
>>   MAINTAINERS                     |  9 +++++++++
>>   drivers/platform/Kconfig        |  2 ++
>>   drivers/platform/Makefile       |  1 +
>>   drivers/platform/arm64/Kconfig  | 19 +++++++++++++++++++
>>   drivers/platform/arm64/Makefile |  6 ++++++
>>   5 files changed, 37 insertions(+)
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index b43102ca365d..ec8d706a99aa 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -3050,6 +3050,15 @@ F:	drivers/mmc/host/sdhci-of-arasan.c
>>   N:	zynq
>>   N:	xilinx
>>   +ARM64 PLATFORM DRIVERS
>> +M:	Hans de Goede <hdegoede@redhat.com>
>> +M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>> +L:	platform-driver-x86@vger.kernel.org
>> +S:	Maintained
>> +Q:	https://patchwork.kernel.org/project/platform-driver-x86/list/
>> +T:	git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
> 
> Surely some sort of Arm specific mailing list should be added here ? platform-drivers-x86 for arm64 platform drivers standalone, makes little sense.
> 

We agreed with Hans that pdx86 list/tree can work for EC drivers for
other platforms because many maintainers familiar with ECs through x86
are already there.

> Perhaps for each new SoC class added - you could add the appropriate mailing list linux-arm-msm is suspiciously missing from the list even though the only driver that will live in this directory after this series is a qcom based device.
> 
> And if tomorrow someone added a Rockchip based EC controller then you'd assume the rockchip mailing list should get a ping.

I believe that even though those drivers are "board specific" (Hans
asked to only include EC drivers here, and we have soc/ for other things
anyway) they are not at all "platform"/"soc" specific, so I'm not sure
adding arm lists here is a great idea:

I don't think these drivers would be too specific to the SoC given it's
just an i2c peripheral most of the time, and considering that it seems
there soon will be many WoA devices with socs from many vendors, we would
just have a collection of all the arm platform lists here...

So even if for now, while all existing WoA devices use Snapdragon chips,
we could get away with adding linux-arm-msm, it may end up just spamming
all the platform lists for no reason when the list grows...

I think it's better for the contributors to CC the relevant list for
their board themselves, which is easily done implicitly by adding dts
changes along the way, like in this series.

Of course if you and other people on linux-arm-msm are fine with that
possibility, we could add an extra list there and see if it gets out of
hand.

Nikita

> 
> ---
> bod
Nikita Travkin March 12, 2024, noon UTC | #5
Ilpo Järvinen писал(а) 12.03.2024 16:40:
> On Tue, 12 Mar 2024, Nikita Travkin wrote:
> 
>> Some ARM64 based laptops and computers require vendor/board specific
>> drivers for their embedded controllers. Even though usually the most
>> important functionality of those devices is implemented inside ACPI,
>> unfortunately Linux doesn't currently have great support for ACPI on
>> platforms like Qualcomm Snapdragon that are used in most ARM64 laptops
>> today. Instead Linux relies on Device Tree for Qualcomm based devices
>> and it's significantly easier to reimplement the EC functionality in
>> a dedicated driver than to make use of ACPI code.
>>
>> This commit introduces a new platform/arm64 subdirectory to give a
>> place to such drivers for EC-like devices.
>>
>> A new MAINTAINERS entry is added for this directory. Patches to files in
>> this directory will be taken up by the platform-drivers-x86 team (i.e.
>> Hans de Goede and Mark Gross).
> 
> Mark -> me.

Oops, copied without noticing that, sorry, will reword.

> 
>> +ARM64 PLATFORM DRIVERS
>> +M:	Hans de Goede <hdegoede@redhat.com>
>> +M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>> +L:	platform-driver-x86@vger.kernel.org
>> +S:	Maintained
>> +Q:	https://patchwork.kernel.org/project/platform-driver-x86/list/
>> +T:	git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
>> +F:	drivers/platform/arm64/
> 
> Is some ARM64 person going to pay attention to these patches (you or 
> perhaps somebody else)?
> 
> It's perfectly fine to have some ARM64 person(s) listed as an additional 
> maintainer there even if the patches themselves are routed through Hans 
> and me (and pdx86 tree). With Mellanox and Surface platform drivers which 
> are also routed through pdx86 tree, we have Hans + me + 3rd person listed 
> as maintainers.
> 
> (This is not to force anything on anyone but it could be beneficial if 
> somebody more familiar with ARM64 is in the loop.)

I've just replied to Bryan with my thoughts on this, but if you think
explicit arm list would be good here, we could indeed add linux-arm-msm
for now as Bryan suggested.

Nikita
Bryan O'Donoghue March 12, 2024, 12:03 p.m. UTC | #6
On 12/03/2024 11:40, Ilpo Järvinen wrote:
> On Tue, 12 Mar 2024, Nikita Travkin wrote:
> 
>> Some ARM64 based laptops and computers require vendor/board specific
>> drivers for their embedded controllers. Even though usually the most
>> important functionality of those devices is implemented inside ACPI,
>> unfortunately Linux doesn't currently have great support for ACPI on
>> platforms like Qualcomm Snapdragon that are used in most ARM64 laptops
>> today. Instead Linux relies on Device Tree for Qualcomm based devices
>> and it's significantly easier to reimplement the EC functionality in
>> a dedicated driver than to make use of ACPI code.
>>
>> This commit introduces a new platform/arm64 subdirectory to give a
>> place to such drivers for EC-like devices.
>>
>> A new MAINTAINERS entry is added for this directory. Patches to files in
>> this directory will be taken up by the platform-drivers-x86 team (i.e.
>> Hans de Goede and Mark Gross).
> 
> Mark -> me.
> 
>> +ARM64 PLATFORM DRIVERS
>> +M:	Hans de Goede <hdegoede@redhat.com>
>> +M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
>> +L:	platform-driver-x86@vger.kernel.org
>> +S:	Maintained
>> +Q:	https://patchwork.kernel.org/project/platform-driver-x86/list/
>> +T:	git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
>> +F:	drivers/platform/arm64/
> 
> Is some ARM64 person going to pay attention to these patches (you or
> perhaps somebody else)?
> 
> It's perfectly fine to have some ARM64 person(s) listed as an additional
> maintainer there even if the patches themselves are routed through Hans
> and me (and pdx86 tree). With Mellanox and Surface platform drivers which
> are also routed through pdx86 tree, we have Hans + me + 3rd person listed
> as maintainers.

You can add me as a +R.

Perhaps Dmitry and Konrad would want to be on the list too.

Actually since Dmitry has already done some work on this, I think he 
should be on the review list for this series.

Adding..

> 
> (This is not to force anything on anyone but it could be beneficial if
> somebody more familiar with ARM64 is in the loop.)

---
bod
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index b43102ca365d..ec8d706a99aa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3050,6 +3050,15 @@  F:	drivers/mmc/host/sdhci-of-arasan.c
 N:	zynq
 N:	xilinx
 
+ARM64 PLATFORM DRIVERS
+M:	Hans de Goede <hdegoede@redhat.com>
+M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
+L:	platform-driver-x86@vger.kernel.org
+S:	Maintained
+Q:	https://patchwork.kernel.org/project/platform-driver-x86/list/
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
+F:	drivers/platform/arm64/
+
 ARM64 PORT (AARCH64 ARCHITECTURE)
 M:	Catalin Marinas <catalin.marinas@arm.com>
 M:	Will Deacon <will@kernel.org>
diff --git a/drivers/platform/Kconfig b/drivers/platform/Kconfig
index 868b20361769..81a298517df2 100644
--- a/drivers/platform/Kconfig
+++ b/drivers/platform/Kconfig
@@ -14,3 +14,5 @@  source "drivers/platform/olpc/Kconfig"
 source "drivers/platform/surface/Kconfig"
 
 source "drivers/platform/x86/Kconfig"
+
+source "drivers/platform/arm64/Kconfig"
diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile
index 41640172975a..fbbe4f77aa5d 100644
--- a/drivers/platform/Makefile
+++ b/drivers/platform/Makefile
@@ -11,3 +11,4 @@  obj-$(CONFIG_OLPC_EC)		+= olpc/
 obj-$(CONFIG_GOLDFISH)		+= goldfish/
 obj-$(CONFIG_CHROME_PLATFORMS)	+= chrome/
 obj-$(CONFIG_SURFACE_PLATFORMS)	+= surface/
+obj-$(CONFIG_ARM64)		+= arm64/
diff --git a/drivers/platform/arm64/Kconfig b/drivers/platform/arm64/Kconfig
new file mode 100644
index 000000000000..644b83ede093
--- /dev/null
+++ b/drivers/platform/arm64/Kconfig
@@ -0,0 +1,19 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# EC-like Drivers for aarch64 based devices.
+#
+
+menuconfig ARM64_PLATFORM_DEVICES
+	bool "ARM64 Platform-Specific Device Drivers"
+	depends on ARM64 || COMPILE_TEST
+	default y
+	help
+	  Say Y here to get to see options for platform-specific device drivers
+	  for arm64 based devices, primarily EC-like device drivers.
+	  This option alone does not add any kernel code.
+
+	  If you say N, all options in this submenu will be skipped and disabled.
+
+if ARM64_PLATFORM_DEVICES
+
+endif # ARM64_PLATFORM_DEVICES
diff --git a/drivers/platform/arm64/Makefile b/drivers/platform/arm64/Makefile
new file mode 100644
index 000000000000..f91cdc7155e2
--- /dev/null
+++ b/drivers/platform/arm64/Makefile
@@ -0,0 +1,6 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Makefile for linux/drivers/platform/arm64
+#
+# This dir should only include drivers for EC-like devices.
+#