Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ben Chuang <benchuanggli@gmail.com>
Cc: Victor Shih <victorshihgli@gmail.com>, <ulf.hansson@linaro.org>,
	<linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<Lucas.Lai@genesyslogic.com.tw>, <HL.Liu@genesyslogic.com.tw>,
	<Greg.tu@genesyslogic.com.tw>, <dlunev@chromium.org>,
	Ben Chuang <ben.chuang@genesyslogic.com.tw>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Victor Shih <victor.shih@genesyslogic.com.tw>,
	<asahi@lists.linux.dev>, Janne Grunau <j@jannau.net>
Subject: Re: [PATCH V23 15/16] mmc: sdhci-pci-gli: enable UHS-II mode for GL9755
Date: Thu, 6 Mar 2025 16:27:53 +0200	[thread overview]
Message-ID: <7fad9ddf-f113-4c07-965a-5c515f1def7b@intel.com> (raw)
In-Reply-To: <CACT4zj9Xgah3Gp-=Ujp-z7hRCmHt_aGnLEchurN00M1LtbjSzQ@mail.gmail.com>

On 5/03/25 02:56, Ben Chuang wrote:
> Hi Janne,
> 
> On Thu, Feb 20, 2025 at 5:32 AM Janne Grunau <j@jannau.net> wrote:
>>
>> Hej,
>>
>> On Fri, Oct 18, 2024 at 06:53:32PM +0800, Victor Shih wrote:
>>> From: Victor Shih <victor.shih@genesyslogic.com.tw>
>>>
>>> Changes are:
>>>  * Disable GL9755 overcurrent interrupt when power on/off on UHS-II.
>>>  * Enable the internal clock when do reset on UHS-II mode.
>>>  * Increase timeout value before detecting UHS-II interface.
>>>  * Add vendor settings fro UHS-II mode.
>>>  * Remove sdhci_gli_enable_internal_clock functon unused clk_ctrl variable.
>>>  * Make a function sdhci_gli_wait_software_reset_done() for gl9755 reset.
>>>  * Remove unnecessary code from sdhci_gl9755_reset().
>>>
>>> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
>>> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
>>> Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
>>> Signed-off-by: Lucas Lai <lucas.lai@genesyslogic.com.tw>
>>> ---
>>>
>>>  drivers/mmc/host/sdhci-pci-gli.c | 235 ++++++++++++++++++++++++++++++-
>>>  1 file changed, 234 insertions(+), 1 deletion(-)
>>
>> This change results in error messages / timeout about UHS2 followed by
>> register dumps with the GL9755 integrated in Apple silicon Macbook Pros
>> and Mac Studio systems. Non UHS-II function of controller does not seem
>> to be affected. Apple advertises the the SDXC slot as UHS-II capable.
>>
>> The only quirk we've experienced with gl9755 on this platform is that 8
>> and 16 bit MMIO reads do not work. Workaround added in commit
>> c064bb5c78c1b ("mmc: sdhci-pci-gli: GL975[50]: Issue 8/16-bit MMIO reads
>> as 32-bit reads.").
>>
>> If you have ideas or patches to try I'm happy to do that. If not we can
>> look into what MacOS does.
>>
>> See kernel log and lspci output below
>>
>> Thanks,
>> Janne
>>
>> [   38.130033] kernel: sdhci: Secure Digital Host Controller Interface driver
>> [   38.130141] kernel: sdhci: Copyright(c) Pierre Ossman
>> [   38.133352] kernel: sdhci-pci 0000:02:00.0: Adding to iommu group 13
>> [   38.160551] kernel: sdhci-pci 0000:02:00.0: SDHCI controller found [17a0:9755] (rev 1)
>> [   38.160655] kernel: sdhci-pci 0000:02:00.0: enabling device (0000 -> 0002)
>> [   38.160750] kernel: mmc0: SDHCI controller on PCI [0000:02:00.0] using ADMA 64-bit
>> [   38.274617] kernel: mmc0: not detect UHS2 interface in 100ms.
>> [   38.274717] kernel: mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
>> [   38.274782] kernel: mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00000005
>> [   38.277391] kernel: mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
>> [   38.277475] kernel: mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
>> [   38.280125] kernel: mmc0: sdhci: Present:   0x20070000 | Host ctl: 0x00000000
>> [   38.280206] kernel: mmc0: sdhci: Power:     0x000000bf | Blk gap:  0x00000000
>> [   38.284511] kernel: mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x0000032f
>> [   38.284592] kernel: mmc0: sdhci: Timeout:   0x00000007 | Int stat: 0x00000000
>> [   38.284636] kernel: mmc0: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00ff0083
>> [   38.287200] kernel: mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
>> [   38.287281] kernel: mmc0: sdhci: Caps:      0x396a3281 | Caps_1:   0x1803057f
>> [   38.291212] kernel: mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x000000c8
>> [   38.291292] kernel: mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
>> [   38.291335] kernel: mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
>> [   38.293513] kernel: mmc0: sdhci: Host ctl2: 0x00009107
>> [   38.293604] kernel: mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000000000000
>> [   38.297842] kernel: mmc0: sdhci_uhs2: ==================== UHS2 ==================
>> [   38.297923] kernel: mmc0: sdhci_uhs2: Blk Size:  0x00000000 | Blk Cnt:  0x00000000
>> [   38.297968] kernel: mmc0: sdhci_uhs2: Cmd:       0x00000000 | Trn mode: 0x00000000
>> [   38.300773] kernel: mmc0: sdhci_uhs2: Int Stat:  0x00000000 | Dev Sel : 0x00000000
>> [   38.300853] kernel: mmc0: sdhci_uhs2: Dev Int Code:  0x00000000
>> [   38.304739] kernel: mmc0: sdhci_uhs2: Reset:     0x00000000 | Timer:    0x000000a7
>> [   38.304811] kernel: mmc0: sdhci_uhs2: ErrInt:    0x00000000 | ErrIntEn: 0x00030000
>> [   38.304856] kernel: mmc0: sdhci_uhs2: ErrSigEn:  0x00030000
>> [   38.307110] kernel: mmc0: sdhci: ============================================
>> [   38.307201] kernel: mmc0: cannot detect UHS2 interface.
>> [   38.310110] kernel: mmc0: failed to initial phy for UHS-II!
>> [   38.424645] kernel: mmc0: not detect UHS2 interface in 100ms.
>> [   38.424731] kernel: mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
>> [   38.424758] kernel: mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00000005
>> [   38.424782] kernel: mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
>> [   38.424840] kernel: mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
>> [   38.427603] kernel: mmc0: sdhci: Present:   0x20070000 | Host ctl: 0x00000000
>> [   38.427659] kernel: mmc0: sdhci: Power:     0x000000bf | Blk gap:  0x00000000
>> [   38.430579] kernel: mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x0000032f
>> [   38.430626] kernel: mmc0: sdhci: Timeout:   0x00000007 | Int stat: 0x00000000
>> [   38.433504] kernel: mmc0: sdhci: Int enab:  0x00ff0083 | Sig enab: 0x00ff0083
>> [   38.433550] kernel: mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
>> [   38.437596] kernel: mmc0: sdhci: Caps:      0x396a3281 | Caps_1:   0x1803057f
>> [   38.437641] kernel: mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x000000c8
>> [   38.437677] kernel: mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
>> [   38.440318] kernel: mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
>> [   38.440345] kernel: mmc0: sdhci: Host ctl2: 0x00009107
>> [   38.444119] kernel: mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000000000000
>> [   38.444161] kernel: mmc0: sdhci_uhs2: ==================== UHS2 ==================
>> [   38.444184] kernel: mmc0: sdhci_uhs2: Blk Size:  0x00000000 | Blk Cnt:  0x00000000
>> [   38.446918] kernel: mmc0: sdhci_uhs2: Cmd:       0x00000000 | Trn mode: 0x00000000
>> [   38.446958] kernel: mmc0: sdhci_uhs2: Int Stat:  0x00000000 | Dev Sel : 0x00000000
>> [   38.450833] kernel: mmc0: sdhci_uhs2: Dev Int Code:  0x00000000
>> [   38.450874] kernel: mmc0: sdhci_uhs2: Reset:     0x00000000 | Timer:    0x000000a7
>> [   38.450907] kernel: mmc0: sdhci_uhs2: ErrInt:    0x00000000 | ErrIntEn: 0x00030000
>> [   38.454625] kernel: mmc0: sdhci_uhs2: ErrSigEn:  0x00030000
>> [   38.454665] kernel: mmc0: sdhci: ============================================
>> [   38.454699] kernel: mmc0: cannot detect UHS2 interface.
>> [   38.456705] kernel: mmc0: failed to initial phy for UHS-II!
>>
> 
> On which UHS-II card does this message appear? Please share the card
> information.
> If it is a UHS-I card, this message is normal.

If it is normal, we should not be producing error messages
and register dumps.  Please change all these messages to be
debug only.  The register dump can go behind DYNAMIC_DEBUG_BRANCH().



  reply	other threads:[~2025-03-06 14:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 10:53 [PATCH V23 00/16] Add support UHS-II for GL9755 and GL9767 Victor Shih
2024-10-18 10:53 ` [PATCH V23 01/16] mmc: core: Support UHS-II card control and access Victor Shih
2024-10-24 10:47   ` Adrian Hunter
2024-10-24 12:41     ` Ulf Hansson
2024-10-18 10:53 ` [PATCH V23 02/16] mmc: sdhci: add UHS-II related definitions in headers Victor Shih
2024-10-18 10:53 ` [PATCH V23 03/16] mmc: sdhci: add UHS-II module and add a kernel configuration Victor Shih
2024-10-29 13:56   ` Geert Uytterhoeven
2024-11-01 10:39     ` Victor Shih
2024-10-18 10:53 ` [PATCH V23 04/16] mmc: sdhci-uhs2: dump UHS-II registers Victor Shih
2024-10-18 10:53 ` [PATCH V23 05/16] mmc: sdhci-uhs2: add reset function Victor Shih
2024-10-18 10:53 ` [PATCH V23 06/16] mmc: sdhci-uhs2: add set_power() to support vdd2 Victor Shih
2024-10-18 10:53 ` [PATCH V23 07/16] mmc: sdhci-uhs2: add set_timeout() Victor Shih
2024-10-18 10:53 ` [PATCH V23 08/16] mmc: sdhci-uhs2: add add_host() and others to set up the driver Victor Shih
2024-10-18 10:53 ` [PATCH V23 09/16] mmc: sdhci-uhs2: add set_ios() Victor Shih
2024-10-18 10:53 ` [PATCH V23 10/16] mmc: sdhci-uhs2: add related functions to initialize the interface Victor Shih
2024-10-18 10:53 ` [PATCH V23 11/16] mmc: sdhci-uhs2: add irq() and others Victor Shih
2024-10-18 10:53 ` [PATCH V23 12/16] mmc: sdhci-uhs2: add request() " Victor Shih
2024-10-18 10:53 ` [PATCH V23 13/16] mmc: sdhci-uhs2: add pre-detect_init hook Victor Shih
2024-10-18 10:53 ` [PATCH V23 14/16] mmc: sdhci-pci: add UHS-II support framework Victor Shih
2024-10-18 10:53 ` [PATCH V23 15/16] mmc: sdhci-pci-gli: enable UHS-II mode for GL9755 Victor Shih
2025-02-19 21:32   ` Janne Grunau
2025-03-05  0:56     ` Ben Chuang
2025-03-06 14:27       ` Adrian Hunter [this message]
2024-10-18 10:53 ` [PATCH V23 16/16] mmc: sdhci-pci-gli: enable UHS-II mode for GL9767 Victor Shih
2024-10-24  8:51 ` [PATCH V23 00/16] Add support UHS-II for GL9755 and GL9767 Adrian Hunter
2024-10-24 12:57 ` Ulf Hansson
2024-10-25  4:00   ` Victor Shih

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=7fad9ddf-f113-4c07-965a-5c515f1def7b@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Greg.tu@genesyslogic.com.tw \
    --cc=HL.Liu@genesyslogic.com.tw \
    --cc=Lucas.Lai@genesyslogic.com.tw \
    --cc=asahi@lists.linux.dev \
    --cc=ben.chuang@genesyslogic.com.tw \
    --cc=benchuanggli@gmail.com \
    --cc=dlunev@chromium.org \
    --cc=j@jannau.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.shih@genesyslogic.com.tw \
    --cc=victorshihgli@gmail.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox