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 CCD0DC678D5 for ; Tue, 7 Mar 2023 23:15:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229701AbjCGXPt (ORCPT ); Tue, 7 Mar 2023 18:15:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbjCGXPr (ORCPT ); Tue, 7 Mar 2023 18:15:47 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60748A2253 for ; Tue, 7 Mar 2023 15:15:45 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id a25so59120051edb.0 for ; Tue, 07 Mar 2023 15:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1678230944; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AvyDAJZ6bXR3+bCkneSkFX3JjEKBmzTg1APcQut5+/g=; b=EnOltLGevkDWdzaVgVxeDFf+f+SFEyM3vMLjbHBcnOov/1N873YhPGC2++tjkeqJ09 e5v9DV/JbYV4dX4fX+v9szxymXpTH9K1m86sj76XMROLe0NI1gdRaqtkq0pitCsdHLrM siS2hEKmplOZTPueDP7Gdo80kvbbaem3Rot+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678230944; 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=AvyDAJZ6bXR3+bCkneSkFX3JjEKBmzTg1APcQut5+/g=; b=5B2larbyuM6k/guTDHJ7Hawi7VNMHEezOWTd6C5uGCbmqcFlbcYC1Lo7UgzcO8xzH5 drhadDZ6CJR4frokjG0kTeg2ZFWC9pVcBwxikncmDdGXkP3XfOHQjkk5cudEAhSnWg/N jklG5k7dc2wgWdTsbWg0uS9YOhK7gP6/Kd7dmtahze4OI29emIRq59DHznJYjoSdGbJU LdnADyg1TsMYrrc0APHofwRDomgqczPk8mKyUYW+8LN/PMxEh2JJAVC93WQpMJDfx9A3 C+iLRM6pXaxSrp/OU0GX0RAF0DtcMMUOnmRbNaFNnzT3776e/q0i7OdmlCwpqNyVbuy5 I31w== X-Gm-Message-State: AO0yUKVVfT84g2G7n63Q74mnvkt6uLOn6AgoJv5KaeRxlddGaKbBwpHO +Qo5ACKjl8ekd7nyoFQcHLNQEE6OAft0yWnvVUtryg== X-Google-Smtp-Source: AK7set/N5F8fE4yKA3XQ+PsxXjvloLB4RdlQpyV8IotSZcUtwXqCmc1OOPVxv18jQLpAYxhP1G5kjwDIR2mOJVscNB4= X-Received: by 2002:a17:906:a0d8:b0:8b1:3d0d:5333 with SMTP id bh24-20020a170906a0d800b008b13d0d5333mr7267360ejb.13.1678230943730; Tue, 07 Mar 2023 15:15:43 -0800 (PST) MIME-Version: 1.0 References: <05977cbb-8a8f-0a67-b4bd-b265dbb83280@free.fr> <895a3812-e490-cc40-0f8e-a88e166e8f24@linaro.org> <6be2c348-b343-876a-a77f-a8297676de6a@free.fr> In-Reply-To: From: Franky Lin Date: Tue, 7 Mar 2023 15:15:15 -0800 Message-ID: Subject: Re: [RFC PATCH] brcmfmac: add 43751 SDIO ids and initialization To: Marc Gonzalez Cc: Neil Armstrong , Arend van Spriel , Hante Meuleman , Kalle Valo , Eric Dumazet , Ulf Hansson , Pieter-Paul Giesberts , Alexander Prutskov , Joseph chuang , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Angus Ainslie , linux-wireless@vger.kernel.org, linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000046d09c05f65797da" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --00000000000046d09c05f65797da Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 7, 2023 at 6:40=E2=80=AFAM Marc Gonzalez wrote: > > On 06/03/2023 11:41, Marc Gonzalez wrote: > > > On 06/03/2023 11:24, Marc Gonzalez wrote: > > > >> # cat /sys/bus/sdio/devices/mmc2:0001:1/uevent > >> OF_NAME=3Dwifi > >> OF_FULLNAME=3D/soc/sd@ffe03000/wifi@1 > >> OF_COMPATIBLE_0=3Dbrcm,bcm4329-fmac > >> OF_COMPATIBLE_N=3D1 > >> SDIO_CLASS=3D00 > >> SDIO_ID=3D02D0:AAE7 > >> SDIO_REVISION=3D0.0 > >> MODALIAS=3Dsdio:c00v02D0dAAE7 > >> > >> 0xaae7 =3D 43751 > >> > >> Isn't there some overlap between: > >> include/linux/mmc/sdio_ids.h and > >> drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h ? > >> > >> Reference used: commit d2587c57ffd8dc > >> "brcmfmac: add 43752 SDIO ids and initialization" > >> > >> Looking at all the occurrences of 43752 to insert a 43751, > >> could someone comment whether this looks reasonable? > > > > Obviously, the commit message would have to be rewritten > > for a real patch. > > Help. I am thoroughly confused... :( > > > Through the SDIO bus, the WiFi chip reports 0xaae7 (i.e. 43751) > hence the /sys/bus/sdio/devices output above. > > sdio_read_func_cis() -> sdio_read_cis() which sets > func->vendor/func->device to 2d0/aae7 > > > But when brcmf_chip_recognition() calls ci->ops->read32() > i.e. brcmf_sdio_buscore_read32() > [ vs brcmf_sdiod_readl() in brcmf_sdio_probe_attach() ] > > [ 1.177283] brcmfmac: F1 signature read @0x18000000=3D0x1042aae8 > [ 1.182912] found AXI chip: BCM43752/2 > [ 1.186384] BCM43752/2: chip=3Daae8 rev=3D2 type=3D1 > > Here it reports 0xaae8 (i.e. 43752) > > Why the discrepancy? > Can it cause issues? > (Sometimes, the whole SDIO bus doesn't probe at boot. > I am still investigating these intermittent problems.) > > Should I use 43751 or 43752 firmware...? This question should be answered by the Cypress/Infineon folks but unfortunately they have been quiet for a long time. In general we use the id read from 0x18000000 to decide which firmware to load. But be aware that the rev also matters. There are some examples in brcmf_sdio_fwnames table that the different firmware name can be derived from the same chip common id but different rev. However sdio device enumeration happens before firmware download so the intermittent problem you are facing probably is not related to firmware version. Regards, - Franky > > Regards. > > --00000000000046d09c05f65797da Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQZwYJKoZIhvcNAQcCoIIQWDCCEFQCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2+MIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPBQBwrA5+20Wxlk6k1 e6EKa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