lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aWT4vcBzG6UnaqOF@lore-desk>
Date: Mon, 12 Jan 2026 14:35:57 +0100
From: Lorenzo Bianconi <lorenzo@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next 2/2] net: airoha: npu: Add the capability to
 read firmware names from dts

> On Mon, Jan 12, 2026 at 11:00:08AM +0100, Lorenzo Bianconi wrote:
> > Introduce the capability to read the firmware binary names from device-tree
> > using the firmware-name property if available.
> > This is a preliminary patch to enable NPU offloading for MT7996 (Eagle)
> > chipset since it requires a different binary with respect to the one
> > used for MT7992 on the EN7581 SoC.
> 
> When i look at
> 
> airoha_npu.c
> 
> i see:
> 
> #define NPU_EN7581_FIRMWARE_DATA                "airoha/en7581_npu_data.bin"
> #define NPU_EN7581_FIRMWARE_RV32                "airoha/en7581_npu_rv32.bin"
> #define NPU_AN7583_FIRMWARE_DATA                "airoha/an7583_npu_data.bin"
> #define NPU_AN7583_FIRMWARE_RV32                "airoha/an7583_npu_rv32.bin"
> 
> static const struct airoha_npu_soc_data en7581_npu_soc_data = {
>         .fw_rv32 = {
>                 .name = NPU_EN7581_FIRMWARE_RV32,
>                 .max_size = NPU_EN7581_FIRMWARE_RV32_MAX_SIZE,
>         },
>         .fw_data = {
>                 .name = NPU_EN7581_FIRMWARE_DATA,
>                 .max_size = NPU_EN7581_FIRMWARE_DATA_MAX_SIZE,
>         },
> };
> 
> static const struct airoha_npu_soc_data an7583_npu_soc_data = {
>         .fw_rv32 = {
>                 .name = NPU_AN7583_FIRMWARE_RV32,
>                 .max_size = NPU_EN7581_FIRMWARE_RV32_MAX_SIZE,
>         },
>         .fw_data = {
>                 .name = NPU_AN7583_FIRMWARE_DATA,
>                 .max_size = NPU_EN7581_FIRMWARE_DATA_MAX_SIZE,
>         },
> };
> 
> static const struct of_device_id of_airoha_npu_match[] = {
>         { .compatible = "airoha,en7581-npu", .data = &en7581_npu_soc_data },
>         { .compatible = "airoha,an7583-npu", .data = &an7583_npu_soc_data },
>         { /* sentinel */ }
> };
> 
> Why cannot this scheme be extended with another compatible?

yes, that is another possibility I was thinking of but then I found
"firwmare-name" property was quite a common approach.
Something like:

static const struct of_device_id of_airoha_npu_match[] = {
	...
	{ .compatible = "airoha,en7581-npu-7996", .data = &en7581_7996_npu_soc_data },
	...
};

What do you think?

Regards,
Lorenzo

> 
>     Andrew

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ