From patchwork Wed Nov 16 07:32:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 20748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a40e:b0:83:7221:86ba with SMTP id ck14csp254737dyb; Tue, 15 Nov 2022 23:33:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf6z/3eFl7OKtjIjFZEObXtl8nYrTX6iM6JSfly89/qRYgjyge3mG7/GWm+OOpr4L8JWLAku X-Received: by 2002:a62:16d0:0:b0:56b:ced4:d3ed with SMTP id 199-20020a6216d0000000b0056bced4d3edmr21992566pfw.34.1668584038710; Tue, 15 Nov 2022 23:33:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668584038; cv=none; d=google.com; s=arc-20160816; b=cSZD9mr/U3xQdraA9cKzq5CFrp9wnr1cCdzRzQDpw7z3ZwNwTg1S5KhcQZY5RPDe+c 6YJixqdSl1sCe/1phRbrZqFiUH34u7WGszgdwPfYvCPuxbsaakWIzRG3aa1e01x9Frlf sGZu12/F9VXuzn5PXFONWlLJEYLd7omDXWpEVAWOO3KzHFQhgx2eLl3w3+AkFocNDS3H geexrA1QhZuARtHL/6ExHsjdVIRdfltU/+ulHaTX93SRjV7pKSPFpWHpJ6/+XjaV4tJ4 aFtijgasC7jMLVdUW5MdH2JbxacgZmXXp3Hdz0Dtug8Zr1PAOjS7vWjXDVsahJjQqtzw 9Ydw== 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=iPPeUQlF89WuMuKsE4L6h0ih48TI+X2n9tqxiV2tD4Q=; b=TJI3rD6Uu0Zys2OcMes9ZyB6U6cRmAAy7Kbgo11zV89THDlZ94l+gijs4AFj9tNO6F iSHdCfTMsLUp3+eBjFllRenizzkM62z9X0CNHyq6fqwqx9EOvn2lbfwV+v9N2Dbbi9Cl ODS0xzeYpF7qLj/KO+WdsBE9HdfqR/Zbn+dV+5Nu767aL1JzdjBPmQ14H17FTJwrufsO hmx1wqRNzshBwJMu6RIXLu4TfeGEpoPAqkLCF2iV0gon2ViOaVtFs1gWgYDiCfTp1cGi G1ZeiI8ERyHvLdxwPik2q2WGY2vrMRvTt0w3qq+9EzOaBQYw8jKTCqwPxo7K9DagtYOK 7aBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ImY4GLY1; 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 s9-20020a170902ea0900b001867d1a71a6si16403544plg.473.2022.11.15.23.33.32; Tue, 15 Nov 2022 23:33:58 -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=ImY4GLY1; 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 S232810AbiKPHdI (ORCPT + 99 others); Wed, 16 Nov 2022 02:33:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232587AbiKPHdF (ORCPT ); Wed, 16 Nov 2022 02:33:05 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5035BF7 for ; Tue, 15 Nov 2022 23:33:04 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id o30so11280219wms.2 for ; Tue, 15 Nov 2022 23:33:04 -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=iPPeUQlF89WuMuKsE4L6h0ih48TI+X2n9tqxiV2tD4Q=; b=ImY4GLY1t/Rm4yER2CBeMhVxYLKVOewt7gDiUzCuRDac1mKXRnEUWXCfS1gwlytz7I VDfuGN4n7HXiRl/9Zbc6+zM84UufF2LthkeMQHDmuG+tSfpe1WJFzuzAizwDjnTxUCNf Ymfx4+iAlaYQu36is8mVx7V2LtE2lYkJotNVGb6+bR75g9/YFyXxD4AeoJfa2RK0j2a/ HbgSrIi1RSTXYlD1h7hl32fv4HPw1h/notcrUL1W0yXX9c0Dol0K3kURGIjr9mKZLLxO CS+CtPWcItnQ+nBh0pRZ9Ok7Mwvz165GboELNavCxm/no/pptFlJBCdJNawb4mN5Z8MF 47BQ== 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=iPPeUQlF89WuMuKsE4L6h0ih48TI+X2n9tqxiV2tD4Q=; b=3KOLj74qN2x0piwzplmt25/iXHjQE+macGQVO4hfuXC9pDKusrgDKN0dS0KatEByz8 rv9OSG4ZqGNWFQhoix+QKzCOnFP4+7FwOBkV4BBB5J6tiDtHSosjGbvrbaf3p0sEnh75 FZlAK6PXXyqfaB5l3y6Za1FxpdPleNigg7eXXG829ftA8wFcR02nSE4bR6XI+miTSlcB F6ie6T41z9McqcH+FSYAUp9Vs+8UIpF8KuPKLoiUY2CGguywr5uZcuurKExFRBPjHxuc Murfm8GE772MriYNRNEjupeVGVUe2zzXoSthsxvazjkxwIJwLstnJTS9np/x+kQ9DBab vb2w== X-Gm-Message-State: ANoB5pnUl4wpxfgU96KlwwayRf0ZR9OsXeP/GfYmM82oD/ILiKRxuc7U xnmw19Y1jZ6jGdxL5whF5H7YsMaortosWG5prqg= X-Received: by 2002:a05:600c:3046:b0:3cf:cb16:f242 with SMTP id n6-20020a05600c304600b003cfcb16f242mr1205354wmh.82.1668583982753; Tue, 15 Nov 2022 23:33:02 -0800 (PST) Received: from zoltan.localdomain ([167.98.215.174]) by smtp.gmail.com with ESMTPSA id g34-20020a05600c4ca200b003cfd4e6400csm1058823wmp.19.2022.11.15.23.33.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 23:33:01 -0800 (PST) From: Alex Elder 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, Krzysztof Kozlowski Subject: [PATCH net-next v3 1/5] dt-bindings: net: qcom,ipa: deprecate modem-init Date: Wed, 16 Nov 2022 01:32:52 -0600 Message-Id: <20221116073257.34010-2-elder@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221116073257.34010-1-elder@linaro.org> References: <20221116073257.34010-1-elder@linaro.org> MIME-Version: 1.0 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=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749637176956429879?= X-GMAIL-MSGID: =?utf-8?q?1749637176956429879?= 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. Update the example so it represents the SC7180 SoC, and provide examples for the qcom,gsi-loader, memory-region, and firmware-name properties. Signed-off-by: Alex Elder Reviewed-by: Krzysztof Kozlowski --- v3: Added Krzysztof's reviewed-by tag. v2: Updated description, switched example completely to SC7180. .../devicetree/bindings/net/qcom,ipa.yaml | 76 ++++++++++++++----- 1 file changed, 55 insertions(+), 21 deletions(-) diff --git a/Documentation/devicetree/bindings/net/qcom,ipa.yaml b/Documentation/devicetree/bindings/net/qcom,ipa.yaml index e752b76192df0..d0f34763b9383 100644 --- a/Documentation/devicetree/bindings/net/qcom,ipa.yaml +++ b/Documentation/devicetree/bindings/net/qcom,ipa.yaml @@ -124,19 +124,29 @@ properties: - const: ipa-clock-enabled-valid - const: ipa-clock-enabled + qcom,gsi-loader: + enum: + - self + - modem + description: + 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 description: If present, a phandle for a reserved memory area that holds the firmware passed to Trust Zone for authentication. Required - when Trust Zone (not the modem) performs early initialization. + when the AP (not the modem) performs early initialization. firmware-name: $ref: /schemas/types.yaml#/definitions/string @@ -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 @@ -194,14 +225,17 @@ examples: }; ipa@1e40000 { - compatible = "qcom,sdm845-ipa"; + compatible = "qcom,sc7180-ipa"; - modem-init; + qcom,gsi-loader = "self"; + memory-region = <&ipa_fw_mem>; + firmware-name = "qcom/sc7180-trogdor/modem/modem.mdt"; - iommus = <&apps_smmu 0x720 0x3>; + iommus = <&apps_smmu 0x440 0x0>, + <&apps_smmu 0x442 0x0>; reg = <0x1e40000 0x7000>, - <0x1e47000 0x2000>, - <0x1e04000 0x2c000>; + <0x1e47000 0x2000>, + <0x1e04000 0x2c000>; reg-names = "ipa-reg", "ipa-shared", "gsi"; @@ -219,9 +253,9 @@ examples: clock-names = "core"; interconnects = - <&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_EBI1>, - <&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_IMEM>, - <&rsc_hlos MASTER_APPSS_PROC &rsc_hlos SLAVE_IPA_CFG>; + <&aggre2_noc MASTER_IPA 0 &mc_virt SLAVE_EBI1 0>, + <&aggre2_noc MASTER_IPA 0 &system_noc SLAVE_IMEM 0>, + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_IPA_CFG 0>; interconnect-names = "memory", "imem", "config";