From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Chen-Yu Tsai <wenst@chromium.org>, mathieu.poirier@linaro.org
Cc: linux-remoteproc@vger.kernel.org, arnd@arndb.de,
andersson@kernel.org, matthias.bgg@gmail.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH v2] remoteproc: mtk_scp: Construct FW path if firmware-name not present
Date: Wed, 29 Oct 2025 12:05:33 +0100 [thread overview]
Message-ID: <9f5a3dc5-d0f8-4172-a4b4-867919612a2d@collabora.com> (raw)
In-Reply-To: <CAGXv+5Gs5_j5L3+HT7K-XYwVG6S8ZGhHZkEcS0HpdkcjRQq2oQ@mail.gmail.com>
Il 29/10/25 10:14, Chen-Yu Tsai ha scritto:
> On Wed, Oct 15, 2025 at 4:41 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> After a reply on the mailing lists [1] it emerged that the DT
>> property "firmware-name" should not be relied on because of
>> possible issues with firmware versions.
>> For MediaTek SCP, there has never been any firmware version vs
>> driver version desync issue but, regardless, the firmwares are
>> always using the same name and they're always located in a path
>> with a specific pattern.
>>
>> Instead of unconditionally always relying on the firmware-name
>> devicetree property to get a path to the SCP FW file, drivers
>> should construct a name based on what firmware it knows and
>> what hardware it is running on.
>>
>> In order to do that, add a `scp_get_default_fw_path()` function
>> that constructs the path and filename based on two of the infos
>> that the driver can get:
>> 1. The compatible string with the highest priority (so, the
>> first one at index 0); and
>> 2. The type of SCP HW - single-core or multi-core.
>>
>> This means that the default firmware path is generated as:
>> - Single core SCP: mediatek/(soc_model)/scp.img
>> for example: mediatek/mt8183/scp.img;
>>
>> - Multi core SCP: mediatek/(soc_model)/scp_c(core_number).img
>> for example: mediatek/mt8188/scp_c0.img for Core 0, and
>> mediatek/mt8188/scp_c1.img for Core 1.
>
> I know this patch has been applied, but this scheme doesn't actually
> follow what is already in the linux-firmware repository.
>
> For all the supported platforms, the first core, even for multi core SCP,
> already have their firmware uploaded as just "scp.img". Multicore SCP
> is seen in MT8195 and MT8188.
The only one that is affected is MT8188, which needs a rename or a symlink in
linux-firmware.
MT8195 is not affected by this change, because the SCP is used as single-core,
hence this code will look for scp.img and not for scp_c0.img.
>
> I guess I can send a followup patch?
The only followup patch that I deem to be necessary is one adding a symlink
or renaming for MT8188's SCP and nothing else.
Please remember that some of those SoCs (including MT8195) allow the SCP to be
configured as *either* single-core *or* dual-core - and usually firmwares for
single-core configurations are not compatible with dual-core ones, because of
the SRAM carveout/usage.
Cheers,
Angelo
>
>
> ChenYu
next prev parent reply other threads:[~2025-10-29 11:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-15 8:41 AngeloGioacchino Del Regno
2025-10-15 13:41 ` Arnd Bergmann
2025-10-15 13:49 ` AngeloGioacchino Del Regno
2025-10-20 15:18 ` Mathieu Poirier
2025-10-29 9:14 ` Chen-Yu Tsai
2025-10-29 11:05 ` AngeloGioacchino Del Regno [this message]
2025-10-30 8:21 ` Chen-Yu Tsai
2025-10-30 9:10 ` Arnd Bergmann
2025-10-30 9:29 ` AngeloGioacchino Del Regno
2026-01-07 11:12 ` Macpaul Lin (林智斌)
2025-10-30 9:33 ` AngeloGioacchino Del Regno
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=9f5a3dc5-d0f8-4172-a4b4-867919612a2d@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=matthias.bgg@gmail.com \
--cc=wenst@chromium.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
all inboxes | Powered by JetHome®