Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3328655pxj; Tue, 11 May 2021 01:49:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzB90JINzz5UrrAbF5Ics8iiAR2vGXTmE+D9SL94eteRhqi0B4m2TDHJEpISVcpVkxiP46c X-Received: by 2002:a05:6402:3548:: with SMTP id f8mr34390562edd.251.1620722956819; Tue, 11 May 2021 01:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620722956; cv=none; d=google.com; s=arc-20160816; b=HNGvskQWPKAQFGthZkw3b8RSN16ax6WIWfB5F5u34bNZkwvb/Rwx+SMpUERUJNnqex WeBxUVIM8ulG+zvg+BmkPDXbOa08ksEUomkXu21h3286lv02toN343CnjDqZ7DZZJ1Hx /MC7nGThZBxhpHcrRsAtLh86Yi4KJfQ838KH+Cs3sN+QvhV/hBtw912PFsVzyNiOYmx6 oyRou1UjqQeLnktnuigU2/l/FrVxYJ035HOQNSS6t/kOIFtGcREwrKQHm1lmrDSEdmiH FOP5tf0bK7e0z/PCqwNk7JAbsrRRJ6a3GN69pVjohK2bQkRpjEl3EpLWD0OaHPc347C2 W4kQ== 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=c+OybVOZDjffV9fCxk6L7StkiAEN+2vDpamJv6n/cXQ=; b=N3xg/YuyugneB+Icr/Fy8F9m1l+HogaW4bQinA9s8yaIBn9NCCw96fRO9ksubk4Ief uaw5gydutPlqFM0aQieAaV5txdXtFijQ2FKbrcZPB4N4D/pjWHSQ1UEqAQDO0QfmrsKN PqU9dyxprnciItXxeWnh0o5Y4h/tJhyu3rrNNuUq0jMvW9iJMysyDKNgEHRn/K1GDnh7 G+1vrP8UTlcEuQothKrY1NYqSxP6LiezhKsZ68t/8ULPNel/PkM3vBcLSzOT/1pAOv6f Ysw9vE8Tmb/SJdGd0I+BYpetFlQxLtCrdb44ijXQ25ZHIBW3wP0lm4o0P8a3mpdikUR9 P+UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YEw3177W; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si12680106ejc.536.2021.05.11.01.48.51; Tue, 11 May 2021 01:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YEw3177W; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 S230406AbhEKIto (ORCPT + 99 others); Tue, 11 May 2021 04:49:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbhEKIto (ORCPT ); Tue, 11 May 2021 04:49:44 -0400 Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AFEAC061574 for ; Tue, 11 May 2021 01:48:38 -0700 (PDT) Received: by mail-vs1-xe2e.google.com with SMTP id 66so9812099vsk.9 for ; Tue, 11 May 2021 01:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c+OybVOZDjffV9fCxk6L7StkiAEN+2vDpamJv6n/cXQ=; b=YEw3177WZxZnAdlDc+pzXzwD6r4iIZjk/XFlRNuCv5A1n8xmP010LLb4xQkMNWjUc3 BLd9Aa2u6lAkCJReuymYpcvMbCotOvCzz7tFMXlvtWHo+KyIoxLUBerduPEUUZsTbvEF 7Pp0mH50SAyceyfXgVUWhQvcq+vudHJHdZL3cn1qCQufGd/8knLSJWSfm0eQ2Kfvqe+n FgH8QJrbRKsCZkmgRUSmH02B2Szv4T4tSSposmlu3HyQk93po91J8t4xQK/pXj+vtkM8 w38Q1NSw4hMLYVvPg5pqKdrAq0tm/0U88uyvbunfCvYaEFXtn3sngU6mzI8qSOM+nDCH hWoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c+OybVOZDjffV9fCxk6L7StkiAEN+2vDpamJv6n/cXQ=; b=ojLTjCIsjmB81xespSBedGG2TMJAtHHisPBdSPV7SYvUec5k0P3b/P2VdA8XnxRtyw TVeEmUzL52UTVg+80MQG7DyO8HIQ52cQ/CBOL2nGfj0Zn8dJG7tsnABpZir5y4yB9S4R SH3FHvDoawSTvfLR97sJG6hHWYxsp4ueIDAXSo+tE+OqAh8YEycr0TkbsDJ0Zaxr+tV7 pWcgUed8aGfTmNbFsiQZOEY8mkzLtbbENjQiKzhEPFY30NzWSjrdSJFWZaVG3lgdvuuM J+qGfkMbkTbULO9ZPcOOM09/NXYaCYApiY92y0YB3jF0t9Eh++5NGGAyd8069hEGXX4s WeDQ== X-Gm-Message-State: AOAM532s9k/Oqc75eck1MbpGpw0xav4hgBlFbyRg6X7ayLPOxgb/Q36l 9a+9ZQEUbw9KeT9ZORHoruiZx+R/w/0srkhrydvLvg== X-Received: by 2002:a05:6102:505:: with SMTP id l5mr20057935vsa.55.1620722917369; Tue, 11 May 2021 01:48:37 -0700 (PDT) MIME-Version: 1.0 References: <20210509224226.348127-1-linus.walleij@linaro.org> <30a7bbeb-d588-4780-bd6c-d99f72898138@broadcom.com> In-Reply-To: <30a7bbeb-d588-4780-bd6c-d99f72898138@broadcom.com> From: Ulf Hansson Date: Tue, 11 May 2021 10:48:00 +0200 Message-ID: Subject: Re: [PATCH] brcmfmac: Obtain reset GPIO To: Arend van Spriel Cc: Linus Walleij , Arend van Spriel , Franky Lin , Hante Meuleman , Chi-hsien Lin , Wright Feng , Chung-hsien Hsu , linux-wireless Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 10 May 2021 at 11:27, Arend van Spriel wrote: > > > > On 5/10/2021 11:14 AM, Ulf Hansson wrote: > > On Mon, 10 May 2021 at 09:37, Arend Van Spriel > > wrote: > >> > >> + Uffe > >> > >> On 5/10/2021 12:42 AM, Linus Walleij wrote: > >>> This grabs the reset GPIO and holds it de-asserted, if available. > >>> Asserting this signal will make the SDIO card re-enumerate. > >> > >> looks ok to me, but could this also be done through SDIO power sequence > >> stuff? > > > > Yes, it certainly looks like that to me. It should be the mmc > > host/core that manages the power on/off thingy for the SDIO card. > > Thanks, Uffe > > This is not directly power on/off, but a separate "reset" GPIO. However, > checking in pwrseq_simple.c I see: > > struct mmc_pwrseq_simple { > struct mmc_pwrseq pwrseq; > bool clk_enabled; > u32 post_power_on_delay_ms; > u32 power_off_delay_us; > struct clk *ext_clk; > struct gpio_descs *reset_gpios; > }; > > So the term 'reset_gpios' is also used in pwrseq context. I think this boils down to that to allow the mmc core to detect and initialize the SDIO card, it needs to manage potential reset pins as well. In cases when the SDIO func driver may need to execute a reset, the mmc core provides two APIs, mmc_hw|sw_reset(). Does this make sense to you? Kind regards Uffe