From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH net-next 2/2] net: airoha: npu: Add the capability to read firmware names from dts
Date: Mon, 12 Jan 2026 14:35:57 +0100 [thread overview]
Message-ID: <aWT4vcBzG6UnaqOF@lore-desk> (raw)
In-Reply-To: <f57867a0-a57d-4572-b0ed-b2adb41d9689@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 2249 bytes --]
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-01-12 13:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 10:00 [PATCH net-next 0/2] Add the capability to read firmware binary names from dts for Airoha NPU driver Lorenzo Bianconi
2026-01-12 10:00 ` [PATCH net-next 1/2] dt-bindings: net: airoha: npu: Add firmware-name property Lorenzo Bianconi
2026-01-12 10:00 ` [PATCH net-next 2/2] net: airoha: npu: Add the capability to read firmware names from dts Lorenzo Bianconi
2026-01-12 13:30 ` Andrew Lunn
2026-01-12 13:35 ` Lorenzo Bianconi [this message]
2026-01-12 14:11 ` Andrew Lunn
2026-01-12 14:40 ` Lorenzo Bianconi
2026-01-13 8:11 ` Krzysztof Kozlowski
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=aWT4vcBzG6UnaqOF@lore-desk \
--to=lorenzo@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@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