Message ID | 20221112200717.1533622-2-elder@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1412073wru; Sat, 12 Nov 2022 12:09:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mbddk3bXpnE71b94JXB9QXLvpKqH6d7XhJw0BTV32fY74Jhyqk0Ms4IPuqXrUc2gSpxBj X-Received: by 2002:a63:f908:0:b0:475:2f42:7638 with SMTP id h8-20020a63f908000000b004752f427638mr5083689pgi.439.1668283753438; Sat, 12 Nov 2022 12:09:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668283753; cv=none; d=google.com; s=arc-20160816; b=m+5HWcyC79SUWYZ4PNzoa55uuZvm/uyfK1db5GIB8tLNBoPICqQXcEwjc0oepe8hnE /gGi45ygh6R9kktxliWg6rsqVjiogfgzUHe1VJCyolzH0C0BHn6KRCYkvOQW69jTNbyl jNVjOAkXRGF3Bk/I+3hf5JnDqhxw6ysmdOGJjxFLR9sdO36Db7TlenPD8bDnaoBfIq76 UNh0sGhXe13KY62OWah40lTgeRyqbfmqCJ4jOzKn6l5mwQZSnqU8z6iCFIqodN7U3sZe 7KADrJJpKRDt4pkqQil9JGwQuh71gGxerDlq874w0iFZLDHBPVrkC0AUODughkZu+LWr Jbjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aloX78xpt1ZUhhk2B4r0yIdFbVyMyxb0348xtj6qFfc=; b=oR9mBfx647KZM5ZMsk77YZAj6Gf+XyECNqZ1/VRpkfZyCvCDKTyFdqV93mdUmZkhP1 MCbmqaG1XyF3t7T9dRfXcsUhS4eAZl2RAPpqFNZwBgTSlDinDuiJE0+DbWiEwq3Aklwc YRrjH5e9vnULxZY4aAPFfEigDsUqXvxXtN3ROkkotTpHG4Br/6vn6py8UIViIJ5K8uqI WmaoiGY67cXcpd5xwSs+mup0chdJQU+CWiMLFpAduyQ4cndjuw/a8m3iATDCpmcLzNWb /LWmxPshsxdMzBeH5RVBLFJW3THpTRcu9xw30cnwukeqINlQJX/sjovk2g1DETkMBRQk UYmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TT3fdj5l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e128-20020a636986000000b0046b2752dcbcsi6137408pgc.590.2022.11.12.12.08.59; Sat, 12 Nov 2022 12:09:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TT3fdj5l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234922AbiKLUHe (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Sat, 12 Nov 2022 15:07:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234905AbiKLUH0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 12 Nov 2022 15:07:26 -0500 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26ED315A21 for <linux-kernel@vger.kernel.org>; Sat, 12 Nov 2022 12:07:24 -0800 (PST) Received: by mail-io1-xd2c.google.com with SMTP id c7so3028884iof.13 for <linux-kernel@vger.kernel.org>; Sat, 12 Nov 2022 12:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aloX78xpt1ZUhhk2B4r0yIdFbVyMyxb0348xtj6qFfc=; b=TT3fdj5lcRdlBtkMD5vkH+ZZoUO3bL/WA3FBAh0BI7eO+orVVn1dNt7qAlAegJ0Lss UemR8GUQyxIv6pQufwfd6UaPhavZRdvi5PuzA+bLQD8c0BQ6fXIN0qqeIdt6J4ZGj+X2 wisjKxowPvttRKTgiyUy0zTgxcSrpgXShkJdmGUIzojI84JPdhWW8f3LMw5ZZiy+rbgD 5+x7Yzr9FaF8OTiZplpQB9FKZaWoHRgzKN+sPJvtgSwoPK36TE0xHYB3qBjORbGKZj3n j4F4BTi/qO0yIJamHJMEEJDHFLAcxb97dlxm6RtK2OaRVmMV0GFoqx4kgNT0q3PGxS2p xGeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aloX78xpt1ZUhhk2B4r0yIdFbVyMyxb0348xtj6qFfc=; b=UCS5aLrquV8gBpRJUv5yxhdE6jBwv6tSb/xOjF3FQA9j0KUIn+3L110ijBAFtIjzx7 t/RjafJrEkO+ybe1EbITeC01ubMyLYNYQ+RceAhhTgAbOngIFH4O5KPBtDAM7Vh3v89s HI7w4zEicuw5SoY+bt2Ow1Yg9Sx1F208nmodwEdeIzEia/6ozq4DFrMQlmcMVeVLPebp RmZ9sYOfzPCVbxPtPgKoqM5tizlu/MhTlHHoaGNF3KQfNhhj0rIlTQKk5NSGvQKj5EMj G5QZ/JsflHLT2FntDJEmBtYBoEZo3cPWNdo/bPVLUNHgFKQKfYiWK/nIsVlWQ4JAKME8 NnTw== X-Gm-Message-State: ANoB5pn0sOVEWzmv4DPNr8AzVNmja+V+raW4FJbSqLiyAFOnzTYgAzDi +gbRPEWLTHUgX7IA8u1zECNo2A== X-Received: by 2002:a6b:6318:0:b0:6ca:6cbb:cb83 with SMTP id p24-20020a6b6318000000b006ca6cbbcb83mr3221089iog.44.1668283643477; Sat, 12 Nov 2022 12:07:23 -0800 (PST) Received: from presto.localdomain ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id j28-20020a02cb1c000000b00363dee286edsm2036870jap.60.2022.11.12.12.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Nov 2022 12:07:22 -0800 (PST) From: Alex Elder <elder@linaro.org> To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, agross@kernel.org, elder@kernel.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 1/5] dt-bindings: net: qcom,ipa: deprecate modem-init Date: Sat, 12 Nov 2022 14:07:13 -0600 Message-Id: <20221112200717.1533622-2-elder@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221112200717.1533622-1-elder@linaro.org> References: <20221112200717.1533622-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749322304912748163?= X-GMAIL-MSGID: =?utf-8?q?1749322304912748163?= |
Series |
net: ipa: change GSI firmware load specification
|
|
Commit Message
Alex Elder
Nov. 12, 2022, 8:07 p.m. UTC
GSI firmware for IPA must be loaded during initialization, either by
the AP or by the modem. The loader is currently specified based on
whether the Boolean modem-init property is present.
Instead, use a new property with an enumerated value to indicate
explicitly how GSI firmware gets loaded. With this in place, a
third approach can be added in an upcoming patch.
The new qcom,gsi-loader property has two defined values:
- self: The AP loads GSI firmware
- modem: The modem loads GSI firmware
The modem-init property must still be supported, but is now marked
deprecated.
Signed-off-by: Alex Elder <elder@linaro.org>
---
.../devicetree/bindings/net/qcom,ipa.yaml | 59 +++++++++++++++----
1 file changed, 46 insertions(+), 13 deletions(-)
Comments
On 12/11/2022 21:07, Alex Elder wrote: > GSI firmware for IPA must be loaded during initialization, either by > the AP or by the modem. The loader is currently specified based on > whether the Boolean modem-init property is present. > > Instead, use a new property with an enumerated value to indicate > explicitly how GSI firmware gets loaded. With this in place, a > third approach can be added in an upcoming patch. > > The new qcom,gsi-loader property has two defined values: > - self: The AP loads GSI firmware > - modem: The modem loads GSI firmware > The modem-init property must still be supported, but is now marked > deprecated. > > Signed-off-by: Alex Elder <elder@linaro.org> > --- > .../devicetree/bindings/net/qcom,ipa.yaml | 59 +++++++++++++++---- > 1 file changed, 46 insertions(+), 13 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml > index e752b76192df0..0dfd6c721e045 100644 > --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml > +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml > @@ -124,12 +124,22 @@ properties: > - const: ipa-clock-enabled-valid > - const: ipa-clock-enabled > > + qcom,gsi-loader: > + enum: > + - self > + - modem > + description: > + This indicates how GSI firmware should be loaded. If the AP loads s/This indicates/Indicate/ (or any other grammar without describing DT syntax but hardware/system) > + and validates GSI firmware, this property has value "self". If the > + modem does this, this property has value "modem". > + > modem-init: > + deprecated: true > type: boolean > description: > - If present, it indicates that the modem is responsible for > - performing early IPA initialization, including loading and > - validating firwmare used by the GSI. > + This is the older (deprecated) way of indicating how GSI firmware > + should be loaded. If present, the modem loads GSI firmware; if > + absent, the AP loads GSI firmware. > > memory-region: > maxItems: 1 > @@ -155,15 +165,36 @@ required: > - interconnects > - qcom,smem-states > > -# If modem-init is not present, the AP loads GSI firmware, and > -# memory-region must be specified > -if: > - not: > - required: > - - modem-init > -then: > - required: > - - memory-region > +allOf: > + # If qcom,gsi-loader is present, modem-init must not be present > + - if: > + required: > + - qcom,gsi-loader > + then: > + properties: > + modem-init: false This is ok, but will not allow you to keep deprecated property in DTS for the transition period. We talked about this that you need to keep both or wait few cycles before applying DTS cleanups. > + > + # If qcom,gsi-loader is "self", the AP loads GSI firmware, and > + # memory-region must be specified > + if: > + properties: > + qcom,gsi-loader: > + contains: > + const: self > + then: > + required: > + - memory-region > + else: > + # If qcom,gsi-loader is not present, we use deprecated behavior. > + # If modem-init is not present, the AP loads GSI firmware, and > + # memory-region must be specified. > + if: > + not: > + required: > + - modem-init > + then: > + required: > + - memory-region > > additionalProperties: false > > @@ -196,7 +227,9 @@ examples: > ipa@1e40000 { > compatible = "qcom,sdm845-ipa"; > > - modem-init; > + qcom,gsi-loader = "self"; > + memory-region = <&ipa_fw_mem>; > + firmware-name = "qcom/sc7180-trogdor/modem-nolte/mba.mbn"; Isn't this example based on sdm845? > > iommus = <&apps_smmu 0x720 0x3>; > reg = <0x1e40000 0x7000>, Best regards, Krzysztof
On 11/14/22 03:56, Krzysztof Kozlowski wrote: > On 12/11/2022 21:07, Alex Elder wrote: >> GSI firmware for IPA must be loaded during initialization, either by >> the AP or by the modem. The loader is currently specified based on >> whether the Boolean modem-init property is present. >> >> Instead, use a new property with an enumerated value to indicate >> explicitly how GSI firmware gets loaded. With this in place, a >> third approach can be added in an upcoming patch. >> >> The new qcom,gsi-loader property has two defined values: >> - self: The AP loads GSI firmware >> - modem: The modem loads GSI firmware >> The modem-init property must still be supported, but is now marked >> deprecated. >> >> Signed-off-by: Alex Elder <elder@linaro.org> >> --- >> .../devicetree/bindings/net/qcom,ipa.yaml | 59 +++++++++++++++---- >> 1 file changed, 46 insertions(+), 13 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml >> index e752b76192df0..0dfd6c721e045 100644 >> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml >> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml >> @@ -124,12 +124,22 @@ properties: >> - const: ipa-clock-enabled-valid >> - const: ipa-clock-enabled >> >> + qcom,gsi-loader: >> + enum: >> + - self >> + - modem >> + description: >> + This indicates how GSI firmware should be loaded. If the AP loads > > s/This indicates/Indicate/ > (or any other grammar without describing DT syntax but hardware/system) OK. >> + and validates GSI firmware, this property has value "self". If the >> + modem does this, this property has value "modem". >> + >> modem-init: >> + deprecated: true >> type: boolean >> description: >> - If present, it indicates that the modem is responsible for >> - performing early IPA initialization, including loading and >> - validating firwmare used by the GSI. >> + This is the older (deprecated) way of indicating how GSI firmware >> + should be loaded. If present, the modem loads GSI firmware; if >> + absent, the AP loads GSI firmware. >> >> memory-region: >> maxItems: 1 >> @@ -155,15 +165,36 @@ required: >> - interconnects >> - qcom,smem-states >> >> -# If modem-init is not present, the AP loads GSI firmware, and >> -# memory-region must be specified >> -if: >> - not: >> - required: >> - - modem-init >> -then: >> - required: >> - - memory-region >> +allOf: >> + # If qcom,gsi-loader is present, modem-init must not be present >> + - if: >> + required: >> + - qcom,gsi-loader >> + then: >> + properties: >> + modem-init: false > > This is ok, but will not allow you to keep deprecated property in DTS > for the transition period. We talked about this that you need to keep > both or wait few cycles before applying DTS cleanups. My intention is expressed in the comment. Is it because of the "if .... required ... qcom,gsi-loader"? Should it be "if ... properties ... qcom,gsi-loader"? I believe I tested the deprecated cases also, but will do it again. If I coded it wrong I'd like to fix it (even if "it works"). >> + >> + # If qcom,gsi-loader is "self", the AP loads GSI firmware, and >> + # memory-region must be specified >> + if: >> + properties: >> + qcom,gsi-loader: >> + contains: >> + const: self >> + then: >> + required: >> + - memory-region >> + else: >> + # If qcom,gsi-loader is not present, we use deprecated behavior. >> + # If modem-init is not present, the AP loads GSI firmware, and >> + # memory-region must be specified. >> + if: >> + not: >> + required: >> + - modem-init >> + then: >> + required: >> + - memory-region >> >> additionalProperties: false >> >> @@ -196,7 +227,9 @@ examples: >> ipa@1e40000 { >> compatible = "qcom,sdm845-ipa"; >> >> - modem-init; >> + qcom,gsi-loader = "self"; >> + memory-region = <&ipa_fw_mem>; >> + firmware-name = "qcom/sc7180-trogdor/modem-nolte/mba.mbn"; > > Isn't this example based on sdm845? Yes, you're right. I'll update it. I just wanted to supply an example that actually showed using all these properties. I'll make the whole example be for sc7180. Thank you. -Alex > >> >> iommus = <&apps_smmu 0x720 0x3>; >> reg = <0x1e40000 0x7000>, > > Best regards, > Krzysztof >
On 14/11/2022 18:48, Alex Elder wrote: > On 11/14/22 03:56, Krzysztof Kozlowski wrote: >> On 12/11/2022 21:07, Alex Elder wrote: >>> GSI firmware for IPA must be loaded during initialization, either by >>> the AP or by the modem. The loader is currently specified based on >>> whether the Boolean modem-init property is present. >>> >>> Instead, use a new property with an enumerated value to indicate >>> explicitly how GSI firmware gets loaded. With this in place, a >>> third approach can be added in an upcoming patch. >>> >>> The new qcom,gsi-loader property has two defined values: >>> - self: The AP loads GSI firmware >>> - modem: The modem loads GSI firmware >>> The modem-init property must still be supported, but is now marked >>> deprecated. >>> >>> Signed-off-by: Alex Elder <elder@linaro.org> >>> --- >>> .../devicetree/bindings/net/qcom,ipa.yaml | 59 +++++++++++++++---- >>> 1 file changed, 46 insertions(+), 13 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml >>> index e752b76192df0..0dfd6c721e045 100644 >>> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml >>> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml >>> @@ -124,12 +124,22 @@ properties: >>> - const: ipa-clock-enabled-valid >>> - const: ipa-clock-enabled >>> >>> + qcom,gsi-loader: >>> + enum: >>> + - self >>> + - modem >>> + description: >>> + This indicates how GSI firmware should be loaded. If the AP loads >> >> s/This indicates/Indicate/ >> (or any other grammar without describing DT syntax but hardware/system) > > OK. > >>> + and validates GSI firmware, this property has value "self". If the >>> + modem does this, this property has value "modem". >>> + >>> modem-init: >>> + deprecated: true >>> type: boolean >>> description: >>> - If present, it indicates that the modem is responsible for >>> - performing early IPA initialization, including loading and >>> - validating firwmare used by the GSI. >>> + This is the older (deprecated) way of indicating how GSI firmware >>> + should be loaded. If present, the modem loads GSI firmware; if >>> + absent, the AP loads GSI firmware. >>> >>> memory-region: >>> maxItems: 1 >>> @@ -155,15 +165,36 @@ required: >>> - interconnects >>> - qcom,smem-states >>> >>> -# If modem-init is not present, the AP loads GSI firmware, and >>> -# memory-region must be specified >>> -if: >>> - not: >>> - required: >>> - - modem-init >>> -then: >>> - required: >>> - - memory-region >>> +allOf: >>> + # If qcom,gsi-loader is present, modem-init must not be present >>> + - if: >>> + required: >>> + - qcom,gsi-loader >>> + then: >>> + properties: >>> + modem-init: false >> >> This is ok, but will not allow you to keep deprecated property in DTS >> for the transition period. We talked about this that you need to keep >> both or wait few cycles before applying DTS cleanups. > > My intention is expressed in the comment. Is it because of the > "if .... required ... qcom,gsi-loader"? > > Should it be "if ... properties ... qcom,gsi-loader"? You disallow modem-init here, so it cannot be present in DTS if gsi-loader is present. Therefore the deprecated case like this: qcom,gsi-loader = "modem" modem-init; is not allowed by the schema. As I said, it is fine, but your DTS should wait a cycle. Best regards, Krzysztof
On 11/15/22 01:59, Krzysztof Kozlowski wrote: > On 14/11/2022 18:48, Alex Elder wrote: >> On 11/14/22 03:56, Krzysztof Kozlowski wrote: >>> On 12/11/2022 21:07, Alex Elder wrote: >>>> GSI firmware for IPA must be loaded during initialization, either by >>>> the AP or by the modem. The loader is currently specified based on >>>> whether the Boolean modem-init property is present. >>>> >>>> Instead, use a new property with an enumerated value to indicate >>>> explicitly how GSI firmware gets loaded. With this in place, a >>>> third approach can be added in an upcoming patch. >>>> >>>> The new qcom,gsi-loader property has two defined values: >>>> - self: The AP loads GSI firmware >>>> - modem: The modem loads GSI firmware >>>> The modem-init property must still be supported, but is now marked >>>> deprecated. >>>> >>>> Signed-off-by: Alex Elder <elder@linaro.org> >>>> --- >>>> .../devicetree/bindings/net/qcom,ipa.yaml | 59 +++++++++++++++---- >>>> 1 file changed, 46 insertions(+), 13 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml >>>> index e752b76192df0..0dfd6c721e045 100644 >>>> --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml >>>> +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml >>>> @@ -124,12 +124,22 @@ properties: >>>> - const: ipa-clock-enabled-valid >>>> - const: ipa-clock-enabled >>>> >>>> + qcom,gsi-loader: >>>> + enum: >>>> + - self >>>> + - modem >>>> + description: >>>> + This indicates how GSI firmware should be loaded. If the AP loads >>> >>> s/This indicates/Indicate/ >>> (or any other grammar without describing DT syntax but hardware/system) >> >> OK. >> >>>> + and validates GSI firmware, this property has value "self". If the >>>> + modem does this, this property has value "modem". >>>> + >>>> modem-init: >>>> + deprecated: true >>>> type: boolean >>>> description: >>>> - If present, it indicates that the modem is responsible for >>>> - performing early IPA initialization, including loading and >>>> - validating firwmare used by the GSI. >>>> + This is the older (deprecated) way of indicating how GSI firmware >>>> + should be loaded. If present, the modem loads GSI firmware; if >>>> + absent, the AP loads GSI firmware. >>>> >>>> memory-region: >>>> maxItems: 1 >>>> @@ -155,15 +165,36 @@ required: >>>> - interconnects >>>> - qcom,smem-states >>>> >>>> -# If modem-init is not present, the AP loads GSI firmware, and >>>> -# memory-region must be specified >>>> -if: >>>> - not: >>>> - required: >>>> - - modem-init >>>> -then: >>>> - required: >>>> - - memory-region >>>> +allOf: >>>> + # If qcom,gsi-loader is present, modem-init must not be present >>>> + - if: >>>> + required: >>>> + - qcom,gsi-loader >>>> + then: >>>> + properties: >>>> + modem-init: false >>> >>> This is ok, but will not allow you to keep deprecated property in DTS >>> for the transition period. We talked about this that you need to keep >>> both or wait few cycles before applying DTS cleanups. >> >> My intention is expressed in the comment. Is it because of the >> "if .... required ... qcom,gsi-loader"? >> >> Should it be "if ... properties ... qcom,gsi-loader"? > > You disallow modem-init here, so it cannot be present in DTS if > gsi-loader is present. Therefore the deprecated case like this: > qcom,gsi-loader = "modem" > modem-init; > is not allowed by the schema. > > As I said, it is fine, but your DTS should wait a cycle. OK, then this is exactly as I intended. I am planning to wait until Linux v6.2-rc1 is published before I post the DTS updates that implement this change. It is not technically necessary until IPA v5.0 is fully supported, and I don't have confidence all of that will accepted before then. If I did it "your way" first I could get it done now, but then I'd want to do another round later to make it this way. I will still send an updated series shortly, to address your other comment about wording in the description. But I will not be changing this part. Thanks for the explanation Krzysztof. -Alex > > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml index e752b76192df0..0dfd6c721e045 100644 --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml @@ -124,12 +124,22 @@ properties: - const: ipa-clock-enabled-valid - const: ipa-clock-enabled + qcom,gsi-loader: + enum: + - self + - modem + description: + This indicates how GSI firmware should be loaded. If the AP loads + and validates GSI firmware, this property has value "self". If the + modem does this, this property has value "modem". + modem-init: + deprecated: true type: boolean description: - If present, it indicates that the modem is responsible for - performing early IPA initialization, including loading and - validating firwmare used by the GSI. + This is the older (deprecated) way of indicating how GSI firmware + should be loaded. If present, the modem loads GSI firmware; if + absent, the AP loads GSI firmware. memory-region: maxItems: 1 @@ -155,15 +165,36 @@ required: - interconnects - qcom,smem-states -# If modem-init is not present, the AP loads GSI firmware, and -# memory-region must be specified -if: - not: - required: - - modem-init -then: - required: - - memory-region +allOf: + # If qcom,gsi-loader is present, modem-init must not be present + - if: + required: + - qcom,gsi-loader + then: + properties: + modem-init: false + + # If qcom,gsi-loader is "self", the AP loads GSI firmware, and + # memory-region must be specified + if: + properties: + qcom,gsi-loader: + contains: + const: self + then: + required: + - memory-region + else: + # If qcom,gsi-loader is not present, we use deprecated behavior. + # If modem-init is not present, the AP loads GSI firmware, and + # memory-region must be specified. + if: + not: + required: + - modem-init + then: + required: + - memory-region additionalProperties: false @@ -196,7 +227,9 @@ examples: ipa@1e40000 { compatible = "qcom,sdm845-ipa"; - modem-init; + qcom,gsi-loader = "self"; + memory-region = <&ipa_fw_mem>; + firmware-name = "qcom/sc7180-trogdor/modem-nolte/mba.mbn"; iommus = <&apps_smmu 0x720 0x3>; reg = <0x1e40000 0x7000>,