Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3284680rwl; Sun, 2 Apr 2023 04:37:45 -0700 (PDT) X-Google-Smtp-Source: AKy350a6IWn8GqJuk+QC44hTA4IWe0YNkC+pFMNB0wXHOavMTfemY+7rqca95VMi8mlJ0dzTSPTe X-Received: by 2002:aa7:dc1a:0:b0:502:7767:3c73 with SMTP id b26-20020aa7dc1a000000b0050277673c73mr8419034edu.22.1680435465459; Sun, 02 Apr 2023 04:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680435465; cv=none; d=google.com; s=arc-20160816; b=q/t9qGy3QfPqa2wLm+iN1N+zazr97aMh9fRPDnufbGIFk/AzKw6nm0mX40yfnnKxmz LLSVnw0uxx45FSmV2ykqTPfcBDQW7fCJoBCATsC+bnLtSBNPWxF1mzBAaX8tG/ffhk+D iMh7H9uCYHU1fmCEn3NO0V1fi7TNDdrZVGBjNsr2VUqiJ0D0ndcWJotrQbGzBNa1IQzY 3MDOju/PZ5VjhzFXHo+O1xsmxpB32fGZD8vyBRz64co1gHjyMnb/G+JYS4RU1wD4saDw GrhcALeZPiy7TlnUgPU4/AQriFwg3zSIGT6eEDHFFC0zMa5W14UwsDBlCR2s/Y4tkf4e xVMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=boY93jyd6+T4l8iYNZlZE0N095pRX4NnlYNcBxMegqE=; b=bquFr7syK3KCcleONrqObycs8cafS9PBuhUPdfLRXxb/J2b37TZKv26MKPLr0rcX2P po0d2z1n3Ca6VDCSZ5aHnt4aTSQAhIuNSG5swX1Dgr28WN63XBuMQK05sYtDaRZ82QHT Lhb3ai3Vq2fv1HVRsLVN0TuvZa/KpM/vYIOAGeBfMsELXkZskMgc7iqnPcwVUX+nTiBB 0pAwDNxBqEiIu1KcICGcK46BahH2/WKOHZunP6MiTyZcoq+YkzV/qINekhFX9BiQYMGH 4SpMs/tnMM59ba0bQ1dfousEr2O8jwecrHYwqdhkTTVod9T39H0B0n3UQgaDG0vUJufD S05w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KJF9SsfW; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020aa7d8ce000000b00501daae80cfsi5515019eds.546.2023.04.02.04.37.19; Sun, 02 Apr 2023 04:37:45 -0700 (PDT) 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=KJF9SsfW; 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 S230363AbjDBKrI (ORCPT + 99 others); Sun, 2 Apr 2023 06:47:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230141AbjDBKrH (ORCPT ); Sun, 2 Apr 2023 06:47:07 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C794113E2 for ; Sun, 2 Apr 2023 03:47:04 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id r11so106562792edd.5 for ; Sun, 02 Apr 2023 03:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680432423; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=boY93jyd6+T4l8iYNZlZE0N095pRX4NnlYNcBxMegqE=; b=KJF9SsfWvwvyR4Yw5C5V1+mHelTyrF51rvwVQmy4cS34/YnHeIMNzaqun0xl6GDRdi yCD7Nxe7hxn7VJgirW/NXE9dHznT7Q4+fQq2Lrp+ZET8RipTCo/T+L8x7zqJN+m/lDh9 cZDJjGN5Q7c8bb5MzjB78EtPkDrxHezKhnJPw4d4ZNrsLyWGqZj4D2nf8OSWYTWOTHrY uL7y6P8t3S//PuVzPNZERT9zxrfHouWnW80Yf+LkQM4jLAitXRfilQSjvegdz8c9tle/ vKbV8EzMR0n9zSGiX6dptsHQVHJG2nPPYST7+x/N3QFgjovOM+wp/Z5FmHInkWg0snZ+ YGFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680432423; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=boY93jyd6+T4l8iYNZlZE0N095pRX4NnlYNcBxMegqE=; b=BE34IFX6hGh26ZE2TGRmgrDvfm6gm/FmWEWK55CcIGiWImR7sx3m7ncaQVoR+0L19+ F/zz/xF7+414O8qlaoJe2Zz9s1hY9F6WDdrgnYzasOo9hF/NFNH6r59P5XO3FG+7bGmx 48OalMNX1t3zJHJn2FJIcMx5Zm99SrJk8sshQ2mCjOpxf8wGBGjJrTdUULNG53ZXGYwe ZpiBdi2eSYyWfM3PlOA5znH0oZv4LIADNZF9pERbULOh/dRkaUqKmzGLQAJs7JbmfcGA aTadH1t6rxzVC57L39gjqzQcLl3h9MFkOTAcRJYwIXJKcqSKovci9MAAJFBRFMcnIEHH h8gQ== X-Gm-Message-State: AAQBX9eg7XlO/jE7S2kHkjluTNAYbbbsfRk5a6ebyXXXFYu9VbwMzrhJ 6SCg3SnPQh/vIEueOwfvGom3ww== X-Received: by 2002:aa7:d885:0:b0:4fd:2155:74ef with SMTP id u5-20020aa7d885000000b004fd215574efmr32584061edq.19.1680432423031; Sun, 02 Apr 2023 03:47:03 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:7f7f:6a30:7a20:94d5? ([2a02:810d:15c0:828:7f7f:6a30:7a20:94d5]) by smtp.gmail.com with ESMTPSA id u26-20020a50a41a000000b004fb95f51f54sm3142513edb.12.2023.04.02.03.47.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Apr 2023 03:47:02 -0700 (PDT) Message-ID: <8a22aea9-5027-e8a4-db80-ce79f3830e10@linaro.org> Date: Sun, 2 Apr 2023 12:47:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [Patch v4 01/10] dt-bindings: memory: tegra: add bpmp ref in tegra234-mc node Content-Language: en-US To: Sumit Gupta , Thierry Reding Cc: treding@nvidia.com, dmitry.osipenko@collabora.com, viresh.kumar@linaro.org, rafael@kernel.org, jonathanh@nvidia.com, robh+dt@kernel.org, lpieralisi@kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, mmaddireddy@nvidia.com, kw@linux.com, bhelgaas@google.com, vidyas@nvidia.com, sanjayc@nvidia.com, ksitaraman@nvidia.com, ishah@nvidia.com, bbasu@nvidia.com References: <20230327161426.32639-1-sumitg@nvidia.com> <20230327161426.32639-2-sumitg@nvidia.com> <787f656a-223d-5eed-e311-9cc7a6c46452@linaro.org> <79d8044f-ce68-463e-66f7-8755e253bc99@linaro.org> <0b393600-3f08-c2e8-9b02-664c6a984de1@nvidia.com> From: Krzysztof Kozlowski In-Reply-To: <0b393600-3f08-c2e8-9b02-664c6a984de1@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: X-Mailing-List: linux-kernel@vger.kernel.org On 29/03/2023 19:12, Sumit Gupta wrote: > > > On 28/03/23 18:18, Thierry Reding wrote: >> On Tue, Mar 28, 2023 at 01:22:26PM +0200, Krzysztof Kozlowski wrote: >>> On 28/03/2023 12:48, Thierry Reding wrote: >>>> On Tue, Mar 28, 2023 at 09:23:04AM +0200, Krzysztof Kozlowski wrote: >>>>> On 27/03/2023 18:14, Sumit Gupta wrote: >>>>>> For Tegra234, add the "nvidia,bpmp" property within the Memory >>>>>> Controller (MC) node to reference BPMP node. This is needed in >>>>>> the MC driver to pass the client info to the BPMP-FW when memory >>>>>> interconnect support is available. >>>>>> >>>>>> Signed-off-by: Sumit Gupta >>>>>> --- >>>>>> .../bindings/memory-controllers/nvidia,tegra186-mc.yaml | 7 +++++++ >>>>>> 1 file changed, 7 insertions(+) >>>>>> >>>>>> diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml >>>>>> index 935d63d181d9..398d27bb2373 100644 >>>>>> --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml >>>>>> +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-mc.yaml >>>>>> @@ -58,6 +58,10 @@ properties: >>>>>> "#interconnect-cells": >>>>>> const: 1 >>>>>> >>>>>> + nvidia,bpmp: >>>>>> + $ref: /schemas/types.yaml#/definitions/phandle >>>>>> + description: phandle of the node representing the BPMP >>>>> >>>>> Why do you need this multiple times? Both in parent and all external-mc >>>>> children? >>>> >>>> We've had nvidia,bpmp in the external memory controller node since >>>> basically the beginning because we've always needed it there. For newer >>>> chips we now also need it for the memory controller. >>>> >>>> Ideally I think we would only have this in the MC and have the EMC >>>> driver reference it via the EMC's parent (i.e. MC), but that would break >>>> backwards-compatibility. Reaching into the EMC's DT node from the MC was >>>> another option that we discussed internally, but it didn't look right >>>> given how this is also needed by the MC. >>>> >>>> One thing we could potentially do is deprecate the nvidia,bpmp phandle >>>> in the EMC and only keep it as a fallback in the drivers in case the >>>> parent MC doesn't find it's own in the DT. >>> >>> Yes, deprecation would answer to my question. >> >> Okay, great. Sumit, you can resolve this by adding a "deprecated: true" >> to the EMC's nvidia,bpmp property schema. In the driver we can then try >> to look at the MC's ->bpmp and if it exists reuse that. If it doesn't >> exist, we can keep the existing lookup as a fallback for device trees >> that haven't been updated yet. > > We can't use MC's->bpmp in the EMC driver's probe as it will be NULL. > This is because MC driver uses "arch_initcall" and gets probed earlier > than BPMP. We can do this in another way as below change. This way we > can use the existing "nvidia,bpmp" property from EMC node and don't need > to move it to the MC node. Please share if this change sounds OK. Then rather it sounds like time to fix these orderings/arch_initcall/missing defer. Best regards, Krzysztof