From: Ulf Hansson <ulf.hansson@linaro.org> To: Bough Chen <haibo.chen@nxp.com> Cc: Adrian Hunter <adrian.hunter@intel.com>, Shawn Guo <shawnguo@kernel.org>, Rob Herring <robh+dt@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Sascha Hauer <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, linux-mmc <linux-mmc@vger.kernel.org>, dl-linux-imx <linux-imx@nxp.com>, DTML <devicetree@vger.kernel.org>, Linux ARM <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add fsl,sdio-async-interrupt-enabled binding Date: Tue, 17 Aug 2021 09:37:00 +0200 [thread overview] Message-ID: <CAPDyKFqv9R4R8u9vQLkDMFQy3C-+=B-_g4drktq9ncHhzX3pSw@mail.gmail.com> (raw) In-Reply-To: <VI1PR04MB529432136DB9F5FEB5F5E98090FE9@VI1PR04MB5294.eurprd04.prod.outlook.com> On Tue, 17 Aug 2021 at 08:41, Bough Chen <haibo.chen@nxp.com> wrote: > > > -----Original Message----- > > From: Ulf Hansson [mailto:ulf.hansson@linaro.org] > > Sent: 2021年8月16日 21:43 > > To: Bough Chen <haibo.chen@nxp.com> > > Cc: Adrian Hunter <adrian.hunter@intel.com>; Shawn Guo > > <shawnguo@kernel.org>; Rob Herring <robh+dt@kernel.org>; Sascha Hauer > > <s.hauer@pengutronix.de>; Sascha Hauer <kernel@pengutronix.de>; Fabio > > Estevam <festevam@gmail.com>; linux-mmc <linux-mmc@vger.kernel.org>; > > dl-linux-imx <linux-imx@nxp.com>; DTML <devicetree@vger.kernel.org>; Linux > > ARM <linux-arm-kernel@lists.infradead.org> > > Subject: Re: [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add > > fsl,sdio-async-interrupt-enabled binding > > > > On Mon, 16 Aug 2021 at 15:00, <haibo.chen@nxp.com> wrote: > > > > > > From: Haibo Chen <haibo.chen@nxp.com> > > > > > > Add a new fsl,sdio-async-interrupt-enabled binding for sdio devices > > > which enable the async interrupt function. When get this property, > > > driver will avoid to use DAT[1] for hardware auto tuning check. > > > > > > Signed-off-by: Haibo Chen <haibo.chen@nxp.com> > > > --- > > > .../devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 10 > > ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > index b5baf439fbac..8a9f1775b0e2 100644 > > > --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > @@ -122,6 +122,16 @@ properties: > > > - const: state_200mhz > > > - const: sleep > > > > > > + fsl,sdio-async-interrupt-enabled: > > > + description: | > > > + Recommend for SDIO cards that enables SDIO async interrupt for > > SDR104 and SDR50 > > > + operating modes. SDIO async interrupt uses DAT[1] to signal the > > card's interrupt. > > > + uSDHC tuning mechanism must use DAT[0] and CMD signals to avoid > > a possible > > > + conflict and incorrect delay line calculated by the uSDHC auto tuning > > mechanism. > > > + Enabling this device tree property is only recommended for layouts > > that are > > > + matching the SD interface length. > > > + type: boolean > > > > We already have a common mmc property, "cap-sdio-irq", that tells whether > > the controller supports SDIO irqs (which is delivered on DAT1). > > > > Can't you use this instead? > > > Hi Ulf, > > Thanks for your quick reply! > > According to our WiFi team reply, the sdio-irq has two types. Sync interrupt and Async interrupt. > When WiFi send out the interrupt signal during the interrupt period, if it sync with clock pad(just as > when send out data), then this is sync interrupt. When this interrupt not sync with clock, it is async > interrupt. Async interrupt has a better overall performance than sync interrupt. The async interrupt is what we refer to as SDIO irqs, which is being delivered on DAT1. > > Logically, auto tuning circuit should only take care of the data and cmd line, and ignore interrupt signal. > But unfortunately current i.mx-usdhc IP do not ignore interrupt signal. So it detect the interrupt signal, > and take this signal as a data signal, and adjust the delay cell accordingly. For sync interrupt, due to it > sync with clock, so no affect, but for async interrupt, it will involve wrong delay cell change randomly. Okay. > > I involve a new property here, because in sdhci.c, we default use this "cap-sdio-irq" for all sdio/sd/mmc. I guess it's the similar variant of the controller for all slots then. It can be debated whether the proper thing is to set "cap-sdio-irq" only for the SDIO card slot. I think so, (and it's already being used like that) if there is an embedded SDIO card attached, because cap-sdio-irq would not make sense otherwise. > I need one property which can use only for sdio device, and only when sdio device enable async-interrupt. If you really need a new DT property (let's discuss that more in patch 4/6), I suggest you add something along the lines of a "broken-auto-tuning" DT property instead, because that is in principle what this should be about, isn't it? Kind regards Uffe
WARNING: multiple messages have this Message-ID (diff)
From: Ulf Hansson <ulf.hansson@linaro.org> To: Bough Chen <haibo.chen@nxp.com> Cc: Adrian Hunter <adrian.hunter@intel.com>, Shawn Guo <shawnguo@kernel.org>, Rob Herring <robh+dt@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Sascha Hauer <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, linux-mmc <linux-mmc@vger.kernel.org>, dl-linux-imx <linux-imx@nxp.com>, DTML <devicetree@vger.kernel.org>, Linux ARM <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add fsl,sdio-async-interrupt-enabled binding Date: Tue, 17 Aug 2021 09:37:00 +0200 [thread overview] Message-ID: <CAPDyKFqv9R4R8u9vQLkDMFQy3C-+=B-_g4drktq9ncHhzX3pSw@mail.gmail.com> (raw) In-Reply-To: <VI1PR04MB529432136DB9F5FEB5F5E98090FE9@VI1PR04MB5294.eurprd04.prod.outlook.com> On Tue, 17 Aug 2021 at 08:41, Bough Chen <haibo.chen@nxp.com> wrote: > > > -----Original Message----- > > From: Ulf Hansson [mailto:ulf.hansson@linaro.org] > > Sent: 2021年8月16日 21:43 > > To: Bough Chen <haibo.chen@nxp.com> > > Cc: Adrian Hunter <adrian.hunter@intel.com>; Shawn Guo > > <shawnguo@kernel.org>; Rob Herring <robh+dt@kernel.org>; Sascha Hauer > > <s.hauer@pengutronix.de>; Sascha Hauer <kernel@pengutronix.de>; Fabio > > Estevam <festevam@gmail.com>; linux-mmc <linux-mmc@vger.kernel.org>; > > dl-linux-imx <linux-imx@nxp.com>; DTML <devicetree@vger.kernel.org>; Linux > > ARM <linux-arm-kernel@lists.infradead.org> > > Subject: Re: [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add > > fsl,sdio-async-interrupt-enabled binding > > > > On Mon, 16 Aug 2021 at 15:00, <haibo.chen@nxp.com> wrote: > > > > > > From: Haibo Chen <haibo.chen@nxp.com> > > > > > > Add a new fsl,sdio-async-interrupt-enabled binding for sdio devices > > > which enable the async interrupt function. When get this property, > > > driver will avoid to use DAT[1] for hardware auto tuning check. > > > > > > Signed-off-by: Haibo Chen <haibo.chen@nxp.com> > > > --- > > > .../devicetree/bindings/mmc/fsl-imx-esdhc.yaml | 10 > > ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > index b5baf439fbac..8a9f1775b0e2 100644 > > > --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > > > @@ -122,6 +122,16 @@ properties: > > > - const: state_200mhz > > > - const: sleep > > > > > > + fsl,sdio-async-interrupt-enabled: > > > + description: | > > > + Recommend for SDIO cards that enables SDIO async interrupt for > > SDR104 and SDR50 > > > + operating modes. SDIO async interrupt uses DAT[1] to signal the > > card's interrupt. > > > + uSDHC tuning mechanism must use DAT[0] and CMD signals to avoid > > a possible > > > + conflict and incorrect delay line calculated by the uSDHC auto tuning > > mechanism. > > > + Enabling this device tree property is only recommended for layouts > > that are > > > + matching the SD interface length. > > > + type: boolean > > > > We already have a common mmc property, "cap-sdio-irq", that tells whether > > the controller supports SDIO irqs (which is delivered on DAT1). > > > > Can't you use this instead? > > > Hi Ulf, > > Thanks for your quick reply! > > According to our WiFi team reply, the sdio-irq has two types. Sync interrupt and Async interrupt. > When WiFi send out the interrupt signal during the interrupt period, if it sync with clock pad(just as > when send out data), then this is sync interrupt. When this interrupt not sync with clock, it is async > interrupt. Async interrupt has a better overall performance than sync interrupt. The async interrupt is what we refer to as SDIO irqs, which is being delivered on DAT1. > > Logically, auto tuning circuit should only take care of the data and cmd line, and ignore interrupt signal. > But unfortunately current i.mx-usdhc IP do not ignore interrupt signal. So it detect the interrupt signal, > and take this signal as a data signal, and adjust the delay cell accordingly. For sync interrupt, due to it > sync with clock, so no affect, but for async interrupt, it will involve wrong delay cell change randomly. Okay. > > I involve a new property here, because in sdhci.c, we default use this "cap-sdio-irq" for all sdio/sd/mmc. I guess it's the similar variant of the controller for all slots then. It can be debated whether the proper thing is to set "cap-sdio-irq" only for the SDIO card slot. I think so, (and it's already being used like that) if there is an embedded SDIO card attached, because cap-sdio-irq would not make sense otherwise. > I need one property which can use only for sdio device, and only when sdio device enable async-interrupt. If you really need a new DT property (let's discuss that more in patch 4/6), I suggest you add something along the lines of a "broken-auto-tuning" DT property instead, because that is in principle what this should be about, isn't it? Kind regards Uffe _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-08-17 7:37 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-16 12:38 [PATCH 1/6] mmc: sdhci-esdhc-imx: remove redundant code for manual tuning haibo.chen 2021-08-16 12:38 ` haibo.chen 2021-08-16 12:38 ` [PATCH 2/6] mmc: sdhci-eadhc-imx: select the correct mode for auto tuning haibo.chen 2021-08-16 12:38 ` haibo.chen 2021-08-16 12:38 ` [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add fsl,sdio-async-interrupt-enabled binding haibo.chen 2021-08-16 12:38 ` [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add fsl, sdio-async-interrupt-enabled binding haibo.chen 2021-08-16 13:43 ` [PATCH 3/6] dt-bindings: mmc: fsl-imx-esdhc: add fsl,sdio-async-interrupt-enabled binding Ulf Hansson 2021-08-16 13:43 ` Ulf Hansson 2021-08-17 6:41 ` Bough Chen 2021-08-17 6:41 ` Bough Chen 2021-08-17 7:37 ` Ulf Hansson [this message] 2021-08-17 7:37 ` Ulf Hansson 2021-08-16 12:38 ` [PATCH 4/6] mmc: host: sdhci-esdhc-imx.c: correct the auto-tuning setting for sdio device haibo.chen 2021-08-16 12:38 ` haibo.chen 2021-08-16 13:53 ` Ulf Hansson 2021-08-16 13:53 ` Ulf Hansson 2021-08-17 6:57 ` Bough Chen 2021-08-17 6:57 ` Bough Chen 2021-08-17 8:00 ` Ulf Hansson 2021-08-17 8:00 ` Ulf Hansson 2021-08-17 12:29 ` Bough Chen 2021-08-17 12:29 ` Bough Chen 2021-08-16 12:38 ` [PATCH 5/6] arm64: dts: imx8mm-evk: add sdio wifi support haibo.chen 2021-08-16 12:38 ` haibo.chen 2021-08-16 12:38 ` [PATCH 6/6] arm64: dts: imx8mn-evk: " haibo.chen 2021-08-16 12:38 ` haibo.chen 2021-08-24 13:52 ` [PATCH 1/6] mmc: sdhci-esdhc-imx: remove redundant code for manual tuning Ulf Hansson 2021-08-24 13:52 ` Ulf Hansson 2021-08-25 2:16 ` Bough Chen 2021-08-25 2:16 ` Bough Chen 2021-08-25 9:22 ` Ulf Hansson 2021-08-25 9:22 ` Ulf Hansson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAPDyKFqv9R4R8u9vQLkDMFQy3C-+=B-_g4drktq9ncHhzX3pSw@mail.gmail.com' \ --to=ulf.hansson@linaro.org \ --cc=adrian.hunter@intel.com \ --cc=devicetree@vger.kernel.org \ --cc=festevam@gmail.com \ --cc=haibo.chen@nxp.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-mmc@vger.kernel.org \ --cc=robh+dt@kernel.org \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.