Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp528902rwb; Tue, 29 Nov 2022 01:48:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5re0OHu2XpXW7nr/VWvnQ1RgjZuylA7b583n6YtOjD4zrBvQWmbfx33n9F70a9cOgrfbLi X-Received: by 2002:a17:906:3c4b:b0:7c0:805d:1440 with SMTP id i11-20020a1709063c4b00b007c0805d1440mr4315138ejg.16.1669715331860; Tue, 29 Nov 2022 01:48:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669715331; cv=none; d=google.com; s=arc-20160816; b=aUYoNmW4hCyRh/x8GWS4XgT/WqPhbhcPzWxrsamgmQ+Cn/PWim5eB+WfDkGO/atiCr LX3cShOSu/3t8f9om8leue1EUlA5UNLE28rXDFp31Aaf778aZ0h9EA+wY7fnI7j9DUyW 4FhLMYhAJtPl12LpPby89yNSlwD4maXv0y6GAn0Q//lRuZrEIb7t0V6yhqzPksxcrfTL ResLnG0ixrmHk5klI9PWlV5QlI/WCszEpraUuQj4XVmIN9rf5cg7WawyjV+kZZ/YLgp1 f9IFuOqbXh8+Qzpu7PlUtmNhA8ViAJ5peKrEtufUXaBt8G5Z9GJGYQerDW3guATC4jhX GToQ== 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 :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature; bh=sg3QtzQpHzzTX1eXKZgkNmLpSXL6VNlIdOuizJonHpU=; b=es06a86XpkLYkPxUsHiopQ2hKoDgJ7X05dbzFKI5iY2vSWvNE8aALCW2AsQXKwwStu rajcVoANGYP4UpAX5+JM/YLx3PQ+jy/LRO8wMtI96NEqUdZ/naJX+DswSXr2kGOHIx5Y GfPXx7X+CZ+1/Nw4Z9J66KAQ69nU22HQ0t5yzcz251CxQgaqKxegUmItqC1dcsuQgLsn niOJkUj9PC4Lkk9KzlA+11caFbV9z4CkA7BBGjPw9ExQHPDsyxacpjKpbh49cqxPi3nt Ot+4YqX/AUtld0iaRMUCSJ6PLkjdW7ny54Ljszgm2Nud7yqdvXIIltEzaS4/Iz42E+lb FcEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cmkt77kY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 i4-20020a170906250400b007ba915548e5si9099154ejb.952.2022.11.29.01.48.31; Tue, 29 Nov 2022 01:48:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=Cmkt77kY; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-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 S230200AbiK2JTq (ORCPT + 67 others); Tue, 29 Nov 2022 04:19:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230005AbiK2JTo (ORCPT ); Tue, 29 Nov 2022 04:19:44 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7FF45475F for ; Tue, 29 Nov 2022 01:19:43 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id z24so16091667ljn.4 for ; Tue, 29 Nov 2022 01:19:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=sg3QtzQpHzzTX1eXKZgkNmLpSXL6VNlIdOuizJonHpU=; b=Cmkt77kYzu0zzeTsUBSsKkObosk1j28KU1I5QCjKJBdQdEIf5nDh2ZlCuWESVYD4ox 7u+DwtiqzpDRKqxxozeN7c/TAWS8RTkfj+7FfP1otA+zoNg5+QVN1wfgVYy0NyTSsDvX qtUldOJwcZAUxuFoCUB/z7HOihJsk+L1orPOKiin9LQCeJ2f3T6ylMo8Picdil+Rats9 PxdllGY2z9L8R8q86g5y4KTnoI5KsVkr0gM45tZ7sIL+/pQViAQQbIch/SH0kxnH5e0A hMH/CvoSpKPxrMvNwq2G18fGzUpDc4ewP/fxvzecHgUJ9QJOv17wgjjAehmU6SSSVJLa 5w3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sg3QtzQpHzzTX1eXKZgkNmLpSXL6VNlIdOuizJonHpU=; b=bX3rXKhJ5XGg6R1UdFz0ytweoIUwvY7GhA9No+h4Kv8cdengTJ3JGamnEwKk8uqK8G ArF1yCBjqjMImgqPFkj6vxTaHfkgOB/4eg6YJcaZl6LzuWIkazmgEOrfa6Rm4dMNjaWp CAtM0t+8BrOPJu2IdvOtjiU2v3Cz4NEwPqsSb83Se9vdUh4MlhBZ2DYpOWto0q+VyBGE jOrEeBPmJEnPiudoBglIEooyK07RIuuGi0sVm4AMnWw4x+YRSmplukBTw0j5zdx6OoBm gaOOcaE91pNXS2Gi/2j5KbV/NkQS0I10ATm8MoKHCprIqIuz55ovTtnQ4+ieZKcr5PsF CKOw== X-Gm-Message-State: ANoB5pmtmabkKQzQxdgSS7Pcikc2c/zdEc9AdmFVGjOTCBKthsPz0LQv +7GAQ83bQsA1QUQGVM7M8/NluA== X-Received: by 2002:a05:651c:c89:b0:26f:bd61:ac4f with SMTP id bz9-20020a05651c0c8900b0026fbd61ac4fmr13311910ljb.396.1669713581897; Tue, 29 Nov 2022 01:19:41 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id be13-20020a056512250d00b004947a12232bsm2095956lfb.275.2022.11.29.01.19.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Nov 2022 01:19:41 -0800 (PST) Message-ID: <79c1c64b-7072-3e30-78a7-5e3379d3d65f@linaro.org> Date: Tue, 29 Nov 2022 10:19:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 From: Krzysztof Kozlowski Subject: Re: [PATCH v2] brcmfmac: Add support for BCM43596 PCIe Wi-Fi To: Konrad Dybcio , Linus Walleij , Kalle Valo Cc: =?UTF-8?Q?Alvin_=c5=a0ipraga?= , Hector Martin , "~postmarketos/upstreaming@lists.sr.ht" <~postmarketos/upstreaming@lists.sr.ht>, "martin.botka@somainline.org" , "angelogioacchino.delregno@somainline.org" , "marijn.suijten@somainline.org" , "jamipkettunen@somainline.org" , Arend van Spriel , Franky Lin , Hante Meuleman , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Marek Vasut , "Zhao, Jiaqing" , "Russell King (Oracle)" , Soon Tak Lee , "linux-wireless@vger.kernel.org" , "brcm80211-dev-list.pdl@broadcom.com" , "SHA-cyfmac-dev-list@infineon.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Rob Herring References: <20220921001630.56765-1-konrad.dybcio@somainline.org> <83b90478-3974-28e6-cf13-35fc4f62e0db@marcan.st> <13b8c67c-399c-d1a6-4929-61aea27aa57d@somainline.org> <0e65a8b2-0827-af1e-602c-76d9450e3d11@marcan.st> <7fd077c5-83f8-02e2-03c1-900a47f05dc1@somainline.org> <20220922133056.eo26da4npkg6bpf2@bang-olufsen.dk> <87sfke32pc.fsf@kernel.org> <4592f87a-bb61-1c28-13f0-d041a6e7d3bf@linaro.org> <87fse76yig.fsf@kernel.org> <87bkov6x1q.fsf@kernel.org> <28991d2d-d917-af47-4f5f-4e8183569bb1@linaro.org> Content-Language: en-US In-Reply-To: <28991d2d-d917-af47-4f5f-4e8183569bb1@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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-wireless@vger.kernel.org On 28/11/2022 15:40, Konrad Dybcio wrote: > > > On 26.11.2022 22:45, Linus Walleij wrote: >> On Fri, Nov 25, 2022 at 1:25 PM Kalle Valo wrote: >>> Konrad Dybcio writes: >>> >>>> On 25.11.2022 12:53, Kalle Valo wrote: >>>>> Konrad Dybcio writes: >>>>> >>>>>> On 21.11.2022 14:56, Linus Walleij wrote: >>>>>>> On Fri, Nov 18, 2022 at 5:47 PM Konrad Dybcio wrote: >>>>>>> >>>>>>>> I can think of a couple of hacky ways to force use of 43596 fw, but I >>>>>>>> don't think any would be really upstreamable.. >>>>>>> >>>>>>> If it is only known to affect the Sony Xperias mentioned then >>>>>>> a thing such as: >>>>>>> >>>>>>> if (of_machine_is_compatible("sony,xyz") || >>>>>>> of_machine_is_compatible("sony,zzz")... ) { >>>>>>> // Enforce FW version >>>>>>> } >>>>>>> >>>>>>> would be completely acceptable in my book. It hammers the >>>>>>> problem from the top instead of trying to figure out itsy witsy >>>>>>> details about firmware revisions. >>>>>>> >>>>>>> Yours, >>>>>>> Linus Walleij >>>>>> >>>>>> Actually, I think I came up with a better approach by pulling a page >>>>>> out of Asahi folks' book - please take a look and tell me what you >>>>>> think about this: >>>>>> >>>>>> [1] >>>>>> https://github.com/SoMainline/linux/commit/4b6fccc995cd79109b0dae4e4ab2e48db97695e7 >>>>>> [2] >>>>>> https://github.com/SoMainline/linux/commit/e3ea1dc739634f734104f37fdbed046873921af7 >> >> Something in this direction works too. >> >> The upside is that it tells all operating systems how to deal >> with the firmware for this hardware. >> >>>>> Instead of a directory path ("brcm/brcmfmac43596-pcie") why not provide >>>>> just the chipset name ("brcmfmac43596-pcie")? IMHO it's unnecessary to >>>>> have directory names in Device Tree. >>>> >>>> I think it's common practice to include a full $FIRMWARE_DIR-relative >>>> path when specifying firmware in DT, though here I left out the board >>>> name bit as that's assigned dynamically anyway. That said, if you don't >>>> like it, I can change it. >>> >>> It's just that I have understood that Device Tree is supposed to >>> describe hardware and to me a firmware directory "brcm/" is a software >>> property, not a hardware property. But this is really for the Device >>> Tree maintainers to decide, they know this best :) >> >> I would personally just minimize the amount of information >> put into the device tree to be exactly what is needed to find >> the right firmware. >> >> brcm,firmware-compatible = "43596"; >> >> since the code already knows how to conjure the rest of the string. >> >> But check with Rob/Krzysztof. >> >> Yours, >> Linus Walleij > > Krzysztof, Rob [added to CC] - can I have your opinions? I just got here bunch of quotes and no original message, so my response probably won't be complete. Devicetree also describes the system integration properties because we need to know how the things are glued together. We have firmware-name property which is a form of path. The "directories" in the firmware-name are actually good because they allow to create a hierarchy based on a vendor/SoC/model/board. I don't think it is worth adding new properties replacing firmware-name. Best regards, Krzysztof