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 F2486C6FD1E for ; Wed, 8 Mar 2023 17:23:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229935AbjCHRXL (ORCPT ); Wed, 8 Mar 2023 12:23:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbjCHRWh (ORCPT ); Wed, 8 Mar 2023 12:22:37 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE3819E04E for ; Wed, 8 Mar 2023 09:22:02 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id k10so44780511edk.13 for ; Wed, 08 Mar 2023 09:22:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1678296121; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hsGEGxw9AVT6aiNTbZuxSoV2ZbIfCVaNJk3phufpAqU=; b=Nxy5heThrkP3rf3FnL8goTEGyWVqPTAHZ7Jh1MYZfLW+NhKHCCnhcToemmlzyfFnJc BLpBHXd3p7UiIaAmg24J1yfXSmxXsKrBuz5BGDpvoRdethsK/44RyGZ6qxaqualPSa3Q 1lFrp0NZLJdjc/8/CN+NJT86hvR+uKTp/VSRY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678296121; 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=hsGEGxw9AVT6aiNTbZuxSoV2ZbIfCVaNJk3phufpAqU=; b=eXaVoUT4DAHFGMpsISnYBNYevzc+cl72t2iXP7BtokWXxb+RNoajsTqqHiVaoBcZRY ppjoaApYR/iFzK4JOwVGWHaOgFsg1Ei0AxY21n2R53edEqml1zGVi4aBvlDlPyMW8ns4 dEtXgNWdIfmR9VzmKJKQCwlP7lNpVnJvG63FJJNQYWj74vO8hKpNOhyZ1PdWMyDYvIx6 x2fQ7h7foIoC1SeDoNpSxAsiok1uO1LCy16LKmSQTIclGU7Ia0LFgTOijqTQNql2kjI6 LccdatEe5Vxhh6kf5btPSduaI12+lsvMz52/Q7OTpX696JnxcBASk0MwHqfz4wlxs6DC DuMw== X-Gm-Message-State: AO0yUKVHWSDij99IE6s2QbZbv6X22Va5/dzjK/igUOqKv3wRTerPUgom fB5FrBDTII8gWaHkYGcPOrrXXTHgD7hzQm/gD3aMVA== X-Google-Smtp-Source: AK7set93f7sWYOkA8O22C1d8xzXdck+7na8pWL6R6m6wWyFeCeukDOAP/XVS0wpsNcL7NkfaaplVz551FgmxeRq0igQ= X-Received: by 2002:a17:906:1411:b0:8b1:b795:110a with SMTP id p17-20020a170906141100b008b1b795110amr9659244ejc.13.1678296121270; Wed, 08 Mar 2023 09:22:01 -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: Wed, 8 Mar 2023 09:21:32 -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="0000000000002959df05f666c496" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --0000000000002959df05f666c496 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 8, 2023 at 4:48=E2=80=AFAM Marc Gonzalez wrote: > > On 08/03/2023 00:15, Franky Lin wrote: > > > On Tue, Mar 7, 2023 at 6:40=E2=80=AFAM Marc Gonzalez wrote: > > > >> 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. > > Disclosure: My knowledge of SDIO device enumeration is 0. > > When the host sends the equivalent of an "identify yourself" message > on the SDIO bus, doesn't the reply come from the WiFi device? > Why would the device reply 0xaae7 instead of 0xaae8? > > In other words, who is replying 0xaae7? The enumeration response is done by the HW sdio core on the chip. No software involved. Regards, - Franky --0000000000002959df05f666c496 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 e6EKaaNaNZUy30q3ArEf30ZDpXyfCtiXnupjSK8WU2cK4qsEtj09JS4+mhi0CTCrCnXAzum3tgcH cHRg0prcSzzEUDQWoFxyuqwiwhHu3sPQNmFOMwIDAQABo4IB2jCCAdYwDgYDVR0PAQH/BAQDAgGG MGAGA1UdJQRZMFcGCCsGAQUFBwMCBggrBgEFBQcDBAYKKwYBBAGCNxQCAgYKKwYBBAGCNwoDBAYJ KwYBBAGCNxUGBgorBgEEAYI3CgMMBggrBgEFBQcDB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