devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nickolay Goppen <setotau@mainlining.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht, linux@mainlining.org,
	Chenna Kesava Raju <chennak@qti.qualcomm.com>,
	Bharath Kumar <bkumar@qti.qualcomm.com>
Subject: Re: [PATCH v2 1/3] arm64: dts: qcom: sdm630/660: Add CDSP-related nodes
Date: Mon, 24 Nov 2025 18:02:29 +0300	[thread overview]
Message-ID: <bacb6293-a4e3-4d23-8a1f-cf42f221ba4b@mainlining.org> (raw)
In-Reply-To: <f0c41563-dcd1-4cf9-8b73-fb9fedd52710@mainlining.org>


23.11.2025 13:51, Nickolay Goppen пишет:
>
> 21.11.2025 15:09, Dmitry Baryshkov пишет:
>> On Fri, Nov 21, 2025 at 01:41:21PM +0530, Ekansh Gupta wrote:
>>>
>>> On 11/20/2025 5:17 PM, Konrad Dybcio wrote:
>>>> On 11/20/25 11:54 AM, Ekansh Gupta wrote:
>>>>> On 11/20/2025 1:27 PM, Nickolay Goppen wrote:
>>>>>> 20.11.2025 07:55, Ekansh Gupta пишет:
>>>>>>> On 11/20/2025 1:58 AM, Srinivas Kandagatla wrote:
>>>>>>>> On 11/12/25 1:52 PM, Konrad Dybcio wrote:
>>>>>>>>> On 11/10/25 6:41 PM, Srinivas Kandagatla wrote:
>>>>>>>>>> On 11/3/25 12:52 PM, Konrad Dybcio wrote:
>>>>>>>>>>> On 10/31/25 12:30 PM, Nickolay Goppen wrote:
>>>>>>>>>>>> 24.10.2025 16:58, Nickolay Goppen пишет:
>>>>>>>>>>>>> 24.10.2025 11:28, Konrad Dybcio пишет:
>>>>>>>>>>>>>> On 10/23/25 9:51 PM, Nickolay Goppen wrote:
>>>>>>>>>>>>>>> In order to enable CDSP support for SDM660 SoC:
>>>>>>>>>>>>>>>     * add shared memory p2p nodes for CDSP
>>>>>>>>>>>>>>>     * add CDSP-specific smmu node
>>>>>>>>>>>>>>>     * add CDSP peripheral image loader node
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Memory region for CDSP in SDM660 occupies the same spot as
>>>>>>>>>>>>>>> TZ buffer mem defined in sdm630.dtsi (which does not 
>>>>>>>>>>>>>>> have CDSP).
>>>>>>>>>>>>>>> In sdm660.dtsi replace buffer_mem inherited from SDM630 
>>>>>>>>>>>>>>> with
>>>>>>>>>>>>>>> cdsp_region, which is also larger in size.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> SDM636 also doesn't have CDSP, so remove inherited from 
>>>>>>>>>>>>>>> sdm660.dtsi
>>>>>>>>>>>>>>> related nodes and add buffer_mem back.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Signed-off-by: Nickolay Goppen <setotau@mainlining.org>
>>>>>>>>>>>>>>> ---
>>>>>>>>>>>>>> [...]
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> + label = "turing";
>>>>>>>>>>>>>> "cdsp"
>>>>>>>>>>>>> Ok, I'll change this in the next revision.
>>>>>>>>>>>>>>> + mboxes = <&apcs_glb 29>;
>>>>>>>>>>>>>>> +            qcom,remote-pid = <5>;
>>>>>>>>>>>>>>> +
>>>>>>>>>>>>>>> +            fastrpc {
>>>>>>>>>>>>>>> +                compatible = "qcom,fastrpc";
>>>>>>>>>>>>>>> +                qcom,glink-channels = 
>>>>>>>>>>>>>>> "fastrpcglink-apps-dsp";
>>>>>>>>>>>>>>> +                label = "cdsp";
>>>>>>>>>>>>>>> + qcom,non-secure-domain;
>>>>>>>>>>>>>> This shouldn't matter, both a secure and a non-secure 
>>>>>>>>>>>>>> device is
>>>>>>>>>>>>>> created for CDSP
>>>>>>>>>>>>> I've added this property, because it is used in other 
>>>>>>>>>>>>> SoC's, such as SDM845 and SM6115 for both ADSP and CDSP
>>>>>>>>>>>> Is this property not neccessary anymore?
>>>>>>>>>>> +Srini?
>>>>>>>>>> That is true, we do not require this for CDSP, as CDSP allows 
>>>>>>>>>> both
>>>>>>>>>> unsigned and signed loading, we create both secured and 
>>>>>>>>>> non-secure node
>>>>>>>>>> by default. May be we can provide that clarity in yaml 
>>>>>>>>>> bindings so that
>>>>>>>>>> it gets caught during dtb checks.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> However in ADSP case, we only support singed modules, due to 
>>>>>>>>>> historical
>>>>>>>>>> reasons how this driver evolved over years, we have this flag 
>>>>>>>>>> to allow
>>>>>>>>>> compatiblity for such users.
>>>>>>>>> Does that mean that we can only load signed modules on the 
>>>>>>>>> ADSP, but
>>>>>>>>> the driver behavior was previously such that unsigned modules 
>>>>>>>>> were
>>>>>>>>> allowed (which was presumably fine on devboards, but not on fused
>>>>>>>>> devices)?
>>>>>>>> Yes, its true that we allowed full access to adsp device nodes 
>>>>>>>> when we
>>>>>>>> first started upstreaming fastrpc driver.
>>>>>>>>
>>>>>>>> irrespective of the board only signed modules are supported on 
>>>>>>>> the ADSP.
>>>>>>>> I think there was one version of SoC i think 8016 or some older 
>>>>>>>> one
>>>>>>>> which had adsp with hvx which can load unsigned modules for 
>>>>>>>> compute
>>>>>>>> usecase only.
>>>>>>>>
>>>>>>>> I have added @Ekansh for more clarity.
>>>>>>>>
>>>>>>>> --srini
>>>>>>> For all the available platforms, ADSP supports only signed 
>>>>>>> modules. Unsigned
>>>>>>> modules(as well as signed) are supported by CDSP and GDSP 
>>>>>>> subsystems.
>>>>>>>
>>>>>>> qcom,non-secure-domain property marks the corresponding DSP as 
>>>>>>> non-secure DSP.
>>>>>>> The implications of adding this property would be the following:
>>>>>>> on ADSP, SDSP, MDSP:
>>>>>>> - Only non-secure device node(/dev/fastrpc-Xdsp) is created.
>>>>>>> - Non-secure device node can be used for signed DSP PD offload.
>>>>>>>
>>>>>>> on CDSP, GDSP:
>>>>>>> - Both secure(/dev/fastrpc-Xdsp-secure) and 
>>>>>>> non-secure(/dev/fastrpc-Xdsp) devices
>>>>>>>     are created, regardless of this property.
>>>>>>> - Both the nodes can be used for signed and unsigned DSP PD 
>>>>>>> offload.
>>>>>>>
>>>>>>> Note: If the property is not added for CDSP/GDSP, only secure 
>>>>>>> device node can
>>>>>>> be used for signed PD offload, if non-secure device is used, the 
>>>>>>> request gets
>>>>>>> rejected[1].
>>>>>>>
>>>>>>> [1] 
>>>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/misc/fastrpc.c#n1245
>>>>>>>
>>>>>>> //Ekansh
>>>>>> Does this mean that the qcom,non-secure-domain property should be 
>>>>>> dropped from both nodes?
>>>>> I checked again and found that unsigned module support for CDSP is
>>>>> not available on this platform. Given this, the safest approach would
>>>>> be to add the property for both ADSP and CDSP, ensuring that all
>>>>> created device nodes can be used for signed PD offload. I can provide
>>>> The property allows *unsigned* PD offload though
>>> I don't think I can directly relate this property to unsigned PD 
>>> offload. This is just
>>> defining what type of device node will be created and whether the 
>>> channel is secure
>>> or not. There is a possibility of making unsigned PD request(on 
>>> CDSP/GDSP) irrespective
>>> of whether this property is added or not. If DSP does not support 
>>> unsigned offload, it
>>> should return failures for such requests.
>> Which part of the hardware and/or firmware interface does it define? If
>> it simply declared Linux behaviour, it is incorrect and probably should
>> be dropped.
> I still don't understand, do I need this property or not?

I've began testing the FastRPC on CDSP and the command

sudo fastrpc_test -d 3 -U 1 -t linux -a v68
has caused the following errors:

[   60.810545] arm-smmu 5180000.iommu: Unhandled context fault: 
fsr=0x402, iova=0xfffff000, fsynr=0x1, cbfrsynra=0x6, cb=3
[   60.810588] arm-smmu 5180000.iommu: FSR    = 00000402 [Format=2 TF], 
SID=0x6
[   60.810603] arm-smmu 5180000.iommu: FSYNR0 = 00000001 [S1CBNDX=0 PLVL=1]
[   60.815657] qcom_q6v5_pas 1a300000.remoteproc: fatal error received: 
:0:EX:kernel:0:frpck_0_0:77:PC=c0117de0
[   60.815684] remoteproc remoteproc2: crash detected in cdsp: type 
fatal error
[   60.815738] remoteproc remoteproc2: handling crash #1 in cdsp
[   60.815754] remoteproc remoteproc2: recovering cdsp
[   60.819267] (NULL device *): Error: dsp information is incorrect err: -32


>>>>> a more definitive recommendation once I know the specific use cases
>>>>> you plan to run.
>>>> Why would the usecase affect this?
>>> I'm saying this as per past discussions where some application was 
>>> relying on non-secure
>>> device node on some old platform(on postmarketOS)[1] and having this 
>>> property in place.
>>> So if similar usecase is being enabled here, the property might be 
>>> required[1].
>> DT files are not usecase-based.
>>
>>> [1] https://lkml.org/lkml/2024/8/15/117
>
-- 
Best regards,
Nickolay


  reply	other threads:[~2025-11-24 15:02 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 19:51 [PATCH v2 0/3] arm64: dts: qcom: Add support for SDM660 CDSP and ADSP FastRPC Nickolay Goppen
2025-10-23 19:51 ` [PATCH v2 1/3] arm64: dts: qcom: sdm630/660: Add CDSP-related nodes Nickolay Goppen
2025-10-24  8:28   ` Konrad Dybcio
2025-10-24 13:58     ` Nickolay Goppen
2025-10-31 11:30       ` Nickolay Goppen
2025-11-03 12:52         ` Konrad Dybcio
2025-11-10 17:41           ` Srinivas Kandagatla
2025-11-12 13:52             ` Konrad Dybcio
2025-11-19 20:28               ` Srinivas Kandagatla
2025-11-20  4:55                 ` Ekansh Gupta
2025-11-20  7:57                   ` Nickolay Goppen
2025-11-20 10:54                     ` Ekansh Gupta
2025-11-20 11:22                       ` Nickolay Goppen
2025-11-21  7:58                         ` Ekansh Gupta
2025-11-21 12:06                           ` Dmitry Baryshkov
2025-11-24 15:25                             ` Ekansh Gupta
2025-11-20 11:47                       ` Konrad Dybcio
2025-11-21  8:11                         ` Ekansh Gupta
2025-11-21  8:18                           ` Nickolay Goppen
2025-11-21  8:42                             ` Ekansh Gupta
2025-11-21 12:11                             ` Dmitry Baryshkov
2025-11-21 12:13                               ` Nickolay Goppen
2025-11-21 12:09                           ` Dmitry Baryshkov
2025-11-23 10:51                             ` Nickolay Goppen
2025-11-24 15:02                               ` Nickolay Goppen [this message]
2025-11-24 15:29                                 ` Ekansh Gupta
2025-11-24 16:33                                   ` Nickolay Goppen
2025-12-02 17:09                                 ` Nickolay Goppen
2025-12-08  7:49                                   ` Nickolay Goppen
2025-12-17 13:37                                     ` Konrad Dybcio
2025-12-17 15:42                                       ` Nickolay Goppen
2025-11-26 14:00                             ` Nickolay Goppen
2025-11-26 20:32                               ` Nickolay Goppen
2025-11-27  6:26                               ` Ekansh Gupta
2025-11-21 12:07                   ` Dmitry Baryshkov
2025-12-11 12:24   ` Nickolay Goppen
2025-12-11 14:30     ` Nickolay Goppen
2025-12-17 13:33       ` Konrad Dybcio
2025-10-23 19:52 ` [PATCH v2 2/3] arm64: dts: qcom: sdm630: Add missing vote clock and GDSC to lpass_smmu Nickolay Goppen
2025-10-24  8:16   ` Konrad Dybcio
2025-10-23 19:52 ` [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add FastRPC nodes to ADSP Nickolay Goppen
2025-10-24  8:26   ` Konrad Dybcio
2025-11-08 22:22     ` Nickolay Goppen
2025-11-08 22:35       ` Nickolay Goppen

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=bacb6293-a4e3-4d23-8a1f-cf42f221ba4b@mainlining.org \
    --to=setotau@mainlining.org \
    --cc=andersson@kernel.org \
    --cc=bkumar@qti.qualcomm.com \
    --cc=chennak@qti.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=ekansh.gupta@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@mainlining.org \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@oss.qualcomm.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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;
as well as URLs for NNTP newsgroup(s).