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 806A5C6FD1C for ; Tue, 14 Mar 2023 11:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbjCNLKM (ORCPT ); Tue, 14 Mar 2023 07:10:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbjCNLJ6 (ORCPT ); Tue, 14 Mar 2023 07:09:58 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E9F07BA05 for ; Tue, 14 Mar 2023 04:09:34 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id j3-20020a17090adc8300b0023d09aea4a6so5648184pjv.5 for ; Tue, 14 Mar 2023 04:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678792172; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AQAiozzsgfoGxDlvyrCg9UpjYhNdzMFc50048gpfD9Y=; b=ANUC4vGZDGeomKUX9RdMwGHm9SlX9igqh9scv2CupwN4JAWrfLcY/+jqP/5/TjSa5B bKRF07o53l6Bqw+U5ADTeu5XopnqxR9c1/NeOqhGvwtmrhqqbUumpjIW93n6xAPZWwrI /P//0k7NoAyPy0sAYwO6rNTHOMU4TNG+ZEhxhYhTq7kRWEoKgplNFI2uZaaxv9SnhrtV YYoJWiH2HAwxicVlofMUuwhZ087g0/WabkvU0QFwpbxoeRlLh7rFMbOwgH+xv+hhv/OK xLfeKSLqBdODK8huo/wOMomMhQ6O036irhU+LGQKtVbEf7gOHSPudI8kUqr9PavPmQRF 2WDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678792172; h=content-transfer-encoding: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=AQAiozzsgfoGxDlvyrCg9UpjYhNdzMFc50048gpfD9Y=; b=fYaBK8JCXpdJxlxkFL0LCxzOXQQMeQNq92lBr3rggepgu4GMToChXYT84UM09e23xB Sv4NsR8ffCC82Zv+WuqGlvafvKXjKKSCI01IdUWwfuN5Rcik+b47KaUujmir/UZj9yUg iiOlYw5T1UxEbSDWxENYo1mEJj3I5oM4C4n6Od6ZBQutjHXiDJM1lwiOPg2JeJhjmEOk ALXYIAVqkFHKgS43CQ3xBaBjl8fQ5j9JRkxDNuabTEv5u3V0AvSA205eLOheYjCdJI/Z putfZkNgXYxvbz1wCj6HEGcRtFw0mRjIlJtPRYdJwWjWpLIB7cUi7akCUZX/A01YjM9C l3fQ== X-Gm-Message-State: AO0yUKVAV5FpPhkF6s6uZSb2VgiWHikJZJZNnIOCyqC7hkkEWSi6RqMh co3o274TRwCAUXbLKGveaZC2y+My5lxxj755NTVGsQ== X-Google-Smtp-Source: AK7set8SoG6+bZSlQ3lAG0t9/aOo3BMF7TfVI/qKa1YUYqwAfpb+sSg8EzKkriYHbUyFmsCPrb2ZqbrscDfcU7B55cA= X-Received: by 2002:a17:902:ba94:b0:19f:2164:9b3b with SMTP id k20-20020a170902ba9400b0019f21649b3bmr4366905pls.13.1678792171819; Tue, 14 Mar 2023 04:09:31 -0700 (PDT) MIME-Version: 1.0 References: <05977cbb-8a8f-0a67-b4bd-b265dbb83280@free.fr> <895a3812-e490-cc40-0f8e-a88e166e8f24@linaro.org> <13676dcc-944f-cf3d-8adf-ee3d4e8fa699@free.fr> <0450e34e-7190-104c-832a-150f15f7c825@free.fr> <3d91a067-c9c3-6d71-11a7-1289ea67f109@free.fr> <6ac1ecb1-eba4-b0a3-579c-afcbe532a474@free.fr> In-Reply-To: From: Ulf Hansson Date: Tue, 14 Mar 2023 12:08:55 +0100 Message-ID: Subject: Re: [RFC PATCH] brcmfmac: add 43751 SDIO ids and initialization To: Marc Gonzalez Cc: Martin Blumenstingl , Neil Armstrong , Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , Eric Dumazet , Pieter-Paul Giesberts , Alexander Prutskov , Joseph chuang , Kevin Hilman , Jerome Brunet , Angus Ainslie , Pierre-Hugues Husson , linux-wireless@vger.kernel.org, linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 14 Mar 2023 at 09:33, Marc Gonzalez wrote= : > > On 14/03/2023 08:27, Ulf Hansson wrote: > > > On Mon, 13 Mar 2023 at 22:42, Marc Gonzalez wrote: > >> > >> On 13/03/2023 21:04, Martin Blumenstingl wrote: > >> > >>> On Mon, Mar 13, 2023 at 6:09=E2=80=AFPM Marc Gonzalez wrote: > >>> [...] > >>>> QUESTION: > >>>> It's not clear to me why we sleep twice for host->ios.power_delay_ms= ? > >>> > >>> I'm not sure but I think host->ios.power_delay_ms is independent from > >>> the post-power-on-delay-ms property of "mmc-pwrseq-simple". > >> > >> They are distinct indeed (the props have the same name & similar purpo= se though). > > > > Correct. > > > >> > >> host->ios.power_delay_ms is set via: > >> > >> drivers/mmc/core/host.c: device_property_read_u32(dev, "post-po= wer-on-delay-ms", > > > > This is a property that may be specified in the host's OF node. See > > Documentation/devicetree/bindings/mmc/mmc-controller.yaml. > > > >> drivers/mmc/core/host.c- &host->ios.po= wer_delay_ms); > > > > Note that the default value is set to 10 ms, in mmc_alloc_host(). So, > > if you need a different value, that can be specified in DT. > > > >> > >> > >> pwrseq->post_power_on_delay_ms is set via: > >> > >> drivers/mmc/core/pwrseq_simple.c: device_property_read_u32(dev, = "post-power-on-delay-ms", > > > > This is a property that may be specified in the pwrseq OF node. See > > Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml. > > > >> drivers/mmc/core/pwrseq_simple.c- &pwrs= eq->post_power_on_delay_ms); > >> > >> > >> However, they are both used to delay mmc_power_up(), > >> and the host delay is used to sleep twice, which I > >> found confusing ;) > > > > It's certainly a bit hairy to follow, but I think you have understood > > things correctly. > > > >> > >> Regards > >> > > > > Looks like you are getting closer to the solution, at least for the > > first step to make sure the SDIO card is getting detected properly. > > Nice! > > What I'm confused about is: > > Why would I specify the delay in the host rather than in the pwrseq? If the delay is to manage vmmc and vqmmc, which is somewhat part of the generic specifications (SD/MMC), then it should be described in the host's node. A pwrseq is something special, which is also platform and device specific (the SDIO device). If the delays correspond to this, it should be part of the pwrseq node. > > I'll have to study mmc_power_up() a bit more ;) :-) Kind regards Uffe