Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp12702006rwb; Sat, 26 Nov 2022 13:49:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf7nDt2Ne5P10kwB6QPEZq0ECigjRh50X2Qq+nNHaPsLHiCmThonR78mm9P4q6W6TWsZN+2t X-Received: by 2002:a17:903:2591:b0:179:e1f6:d24d with SMTP id jb17-20020a170903259100b00179e1f6d24dmr24925960plb.91.1669499396901; Sat, 26 Nov 2022 13:49:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669499396; cv=none; d=google.com; s=arc-20160816; b=UDzahcMzMFKqzgnRpnLbysO+AUyZn7d59wLPaIuzs1Q3E4DQrHSBcT6/ffOSyJNCdC e2GFpNkwBUOhmhEIt42xxQiVdWn5rTGxhg0JTI6whwGP10Ao3EgWCfqd9iTEvKk9mP3G DU6fLpVAHcgOGk06B77GBsDNA/3aftdlZe11ByWM+qBFYVffYdILDIMA27SYk/pNuMHD ZdTa7F5agYluX4d1H6e/gLFAWigsDNRzur11VZQT+UGyyYuRcdamDyTRQLdxb1VGfgpz ASrajOoW/jMJjGcJrs4CTUBDCaPG5AKUALrqBMGFrppLjeVYlGL2omrgf/2DFT9xjaLH Ltmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pRxq+j1N3NePxiJ2JT2MTJet9Uql84OySQTRJfr9N3I=; b=XPtyuJFv7mfozU2OVAYVVIHT8RkHd3d3jL+ceXclvtGc2OficASAzK8oB2+pXt5VVs CWKmTcTQHsZrEDDY7lNXP8ECi3M472B6oFFeJ7R8miCrYVNC+jGx9oP/CAzt1QfducFh mMnT4d3nR4TEQ5N2w9Ba6f9CteV2d268cn4l2dhn3VcA5jJH/ixM7/k62Eu+PitjkSmz kwk0ZSSVhcybI/u843RVCWC9RBzCsp9CGm4MyCA1j2z8CQ9SYnPKjDKXd2CwTCjeeBqN JSpwvKILLx/lDN0l2vvosrlYxHPPACkSwOmqjTje3nn6z1tribl/yBSx5dzafD5c1qXD u8Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vqK+8wvD; 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 s14-20020a17090302ce00b001781cf050b6si7874987plk.14.2022.11.26.13.49.43; Sat, 26 Nov 2022 13:49:56 -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=vqK+8wvD; 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 S229526AbiKZVps (ORCPT + 67 others); Sat, 26 Nov 2022 16:45:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiKZVpr (ORCPT ); Sat, 26 Nov 2022 16:45:47 -0500 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D74B113EA6 for ; Sat, 26 Nov 2022 13:45:45 -0800 (PST) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-3c090251d59so16078027b3.4 for ; Sat, 26 Nov 2022 13:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pRxq+j1N3NePxiJ2JT2MTJet9Uql84OySQTRJfr9N3I=; b=vqK+8wvDlVZobG46JZZmctmyGzHXZF93PNREcIr7XM953PhGW6Pq5q6apgGRbjzUI8 CzaRBcn0sdl+eJzgNeXrm+36UHmK0k4tgJ4ki4PWAsVYJ/AVJXuxokoF9TBU5Y3kWqA3 09FUtIStJCxfbU1zQgC6yOelHFtrD+0k7REJWLcCMnb93N7FeN3odr5ud4EybrvkfoRF P2mtjCMYwCXifoc75QGHoKsXy9RoeybAj8A2Va5e3j/Mo+ZeupJU+EPd9XbjZkYj0Wf7 5IR5FIzDPW1LSzIBCMslfDCMK1uCrfB8K6ktO8Lv3L2LzdeMXrk4MyN/7QbTlyTddCBd 8Suw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pRxq+j1N3NePxiJ2JT2MTJet9Uql84OySQTRJfr9N3I=; b=bVeMfx4FvUK5Ekx68+qSWb+c6pyzLoTh2sXBXryvvsYap+TIMhY4eVAgG5nZnIiYd7 MfMWaHv3udeu6NdfAFoizhXcNMGLF2OOxzz9kmlBunrHJr/RHfa3w+eHHMGeOgQCiDtF vC/6sz0It1NFMi+AulKSRAieUEfMHsnNG1ln7G7pOcMuzdHFCTmZp9Uv4jjJW+RKGWgc hFkzUKUyPPiPOQKQz9tI+xjn+JD2HTo/Riv7zeycZycEtBHDHdLOBM4W9YfBYMTTdSDF xFXpZgY/JuFWr2tekDLKZ+a4i7EftoBySSi+WBW5Qi39FM5WL0cJRHicsKzrO5CcAEIC 3SWw== X-Gm-Message-State: ANoB5pm43HhDoEdS3l1rGbiiHDCD4BlI3eWtfJriKq9bENhVVjIeLnbx SaTrS7S2KmZKz1NPGpRS4+TQvKfAukiJuk2SAZbBZw== X-Received: by 2002:a81:65c1:0:b0:376:f7e2:4b12 with SMTP id z184-20020a8165c1000000b00376f7e24b12mr25287377ywb.0.1669499144991; Sat, 26 Nov 2022 13:45:44 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <87bkov6x1q.fsf@kernel.org> From: Linus Walleij Date: Sat, 26 Nov 2022 22:45:33 +0100 Message-ID: Subject: Re: [PATCH v2] brcmfmac: Add support for BCM43596 PCIe Wi-Fi To: Kalle Valo Cc: Konrad Dybcio , =?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" Content-Type: text/plain; charset="UTF-8" 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: X-Mailing-List: linux-wireless@vger.kernel.org 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