From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB639C43217 for ; Sat, 26 Nov 2022 21:46:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229527AbiKZVps (ORCPT ); Sat, 26 Nov 2022 16:45:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiKZVpq (ORCPT ); Sat, 26 Nov 2022 16:45:46 -0500 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6E8113E8F for ; Sat, 26 Nov 2022 13:45:45 -0800 (PST) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-3c21d6e2f3aso11258037b3.10 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=pVCwAZWUz3VBSmoKQhqH1fSsVd9oIDGFixaGREcz3QuvoHLTs4gVSYujCLHLfTSt7H GIib5oDd5CDJgz/aI/8oTZMQ0OQ6gKwvtomB8qSON1zXYGNzjNHupaB66KdSlij3pQtb KNO1nVfLd7bauzmx86nJC0pAx8KHsy51kGBYhXPHcer80JTQzIP0W+HSkQhvs4wo+bcU Fs3r99fxIx0JZHxe0TTUCqIe1RunJ2B31l5G6PDbRNQui9TtqrAhXIbORuxu8CewjfdA 3/f8/vQGm915cBOCYJQTKrWwvjK0fdYU7RDJBrkFQv9Rmwxg5YlMgcCeLsl7B6wfMIrI vJrQ== X-Gm-Message-State: ANoB5pnRe/laU6Dr0kXR+zTmR9T/YdPigsBCNseoFXOTpCWu3cy1lI0E 8Y6cJMS5GM4lMoTZBMPufJHndStHOMCKqO19hTso+w== X-Google-Smtp-Source: AA0mqf43EmhH/k7KEVgca9O5pYenGVMwt1/G9lr9Kr07O2rgGeziMSyprL3K1L17O8T6R019ZTuW5TwbvWWK86rYXQ4= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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