Bug 219551

Summary: SPI not work with new BIOS code of Gemtree.
Product: ACPI Reporter: Jim XU (baojun.xu)
Component: Config-TablesAssignee: acpi_config-tables
Status: NEW ---    
Severity: high CC: brent.lu, juswin.hsueh, letitia.tsai, neo.wong
Priority: P3    
Hardware: Intel   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: zip of logs.
ACPI dump from Windows.
Whole DSDT.DSL in Varcolac (0x103C8B92)
Newest dmesg for irq ignored, and whole DSDT dump.
Firmware from Intel.
Log and DSDT for SI-1 and SI-2.
attachment-12822-0.html

Description Jim XU 2024-12-03 03:54:37 UTC
Created attachment 307310 [details]
zip of logs.

Hi,

We try to porting SPI driver into new platform Gemtree (which driver working fine on Varcolac), found it have problem to add spi device in drivers/platform/x86/serial-multi-instantiate.c.

With re-worked CS, it report irq add failed, even applied patch https://lore.kernel.org/all/20241122094224.226773-1-stanislaw.gruszka@linux.intel.com/
See attached DSDT code dsdt_gemtree_spi-3.txt, and DSDT table file DSDT_gemtree-3, also dmesg log was shared as : dmesg-1203.txt.

And with first version of Gemtree, failed on add gpio for CS. See attached DSDT code dsdt_gemtree_spi-2.txt, and log of dmesg: dmesg-1115-3.txt.

My modification in kernel is in modification-ti.txt, and our spi code was ignored.
Also shared interrupts and status of "grep -H 15 /sys/bus/acpi/devices/*/status".

Best Regards
Jim
Comment 1 juswin.hsueh 2024-12-03 08:22:42 UTC
Hi Jim,

Could you please share the dumps for below? Thank you!

- Windows ACPI dump for passing case for this interrupt pin configuration
- Linux ACPI dump for failing case for this interrupt pin configuration
Comment 2 Jim XU 2024-12-03 12:47:27 UTC
Created attachment 307311 [details]
ACPI dump from Windows.

Hi Juswin,

For Linux, DSDT_Gemtree-3 was attached already.
For Windows, see new attached gemtree_3.bin, we can dump it by acpidump.exe, but failed parser it.
BTW, in Windows, one CS work only.

Best Regards
Jim
Comment 3 juswin.hsueh 2024-12-04 03:04:54 UTC
Thanks a lot Jim for help. Could you please also provide the passing DSDP dump from Varcolac? Big thanks!
Comment 4 Jim XU 2024-12-04 03:09:52 UTC
Created attachment 307316 [details]
Whole DSDT.DSL in Varcolac (0x103C8B92)

Hi, attached is whole DSDT.DSL from Varcolac, it's subsys id is 0x103C8B92.
BTW, the device part has been attached already as dsdt_ti_spi.txt.
Comment 5 juswin.hsueh 2024-12-04 08:13:24 UTC
Hi Jim,

Sorry for one more favor. Is it possible to share these information summary?

[Problem Statement]


[Error or key word that Intel should focus]


[Expected Behavior]


[Intel Platform]
ARL-Hx


[Full dmesg]
Please point out which file name.


[ACPI dump]
Please point out which file name.
Comment 6 Jim XU 2024-12-05 03:40:44 UTC
Created attachment 307323 [details]
Newest dmesg for irq ignored, and whole DSDT dump.

[Problem Statement]
GPIO driver missing with Gemtree platform.

[Error or key word that Intel should focus]
GPIO: looking up 0 -517 (EPROBE_DEFER)

[Expected Behavior]
Got right GPIO for irq, reset...

[Intel Platform]
ARL-Hx, 
"HPQOEM", "ARL",

[Full dmesg]
dmesg-1205.txt(in dmesg-1205.zip)


[ACPI dump]
DSDT_gemtree-3.dsl(in dmesg-1205.zip)
Comment 8 juswin.hsueh 2024-12-05 07:15:01 UTC
Hi Jim,

One more question. As the TI amp works well on Varcolac platform. 
Could you please provide the following? Thank you! 

[Full dmesg on Varcolac]


[TI driver code which works on Varcolac] 
Cuz we only see TI I2C driver on upstream, but no SPI driver.
Comment 9 juswin.hsueh 2024-12-05 07:40:02 UTC
Hi Jim,

Also can you based on HP ARL-Hx Gemtree system to confirm the following and update dmesg log?

 _CRS --> add debug log --> open ACPI debug --> check if really get the correct ACPI resource --> please provide dmesg with debug log enabled


[dmesg with debug log enabled]
Please share the file name
Comment 10 juswin.hsueh 2024-12-05 08:22:21 UTC
From the ACPI dump analysis:

RPL Varcolac GPIO is on _SB.GPI0
GpioInt (Edge, ActiveBoth, Shared, PullUp, 0x0064,
                        "\\_SB.GPI0", 0x00, ResourceConsumer, ,
 
ARL Gemtree GPIO is on \\_SB.PGPI
GpioIo (Shared, PullUp, 0x0064, 0x0000, IoRestrictionInputOnly,
                        "\\_SB.PGPI", 0x00, ResourceConsumer, ,


Not sure if it's expected. Need customer confirmation.
Comment 11 Jim XU 2024-12-06 02:55:34 UTC
Hi All,

If I ignore irq in serial-multi-instantiate.c, spi devices was probed.
But it will failed get reset pin in tas2781-hda-spi device probe.
I also found many information about "GPIO: looking up 0 -517 (EPROBE_DEFER)", may be GPIO driver not work with Gemtree.

I has tried porting my code to linux-gpio-intel-6.12-rc7, result is same.

Best Regards
Jim
Comment 12 Jim XU 2024-12-06 08:09:15 UTC
Hi All,

From dmesg, we can find some error about parser BIOS code in acpi:
ACPI BIOS Error (bug): Failure creating named object [\_SB.PC02.RP09.PXSX.RPXX], AE_ALREADY_EXISTS (20240827/dswload2-326)
fbcon: Taking over console
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20240827/psobject-220)
ACPI BIOS Error (bug): Failure creating named object [\_SB.PC02.RP09.PXSX.VDID], AE_ALREADY_EXISTS (20240827/dsfield-637)
ACPI BIOS Error (bug): Failure creating named object [\_SB.PC02.RP09.PXSX.SVID], AE_ALREADY_EXISTS (20240827/dsfield-637)
ACPI BIOS Error (bug): Failure creating named object [\_SB.PC02.RP09.PXSX.FLDR], AE_ALREADY_EXISTS (20240827/dswload2-326)
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20240827/psobject-220)
ACPI BIOS Error (bug): Failure creating named object [\_SB.PC02.RP09.PXSX.DCAP], AE_ALREADY_EXISTS (20240827/dsfield-637)
ACPI BIOS Error (bug): Failure creating named object [\_SB.PC02.RP09.PXSX.DCTR], AE_ALREADY_EXISTS (20240827/dsfield-637)
ACPI BIOS Error (bug): Failure creating named object [\_SB.PC02.RP09.PXSX.WIST], AE_ALREADY_EXISTS (20240827/dswload2-326)
ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20240827/psobject-220)
ACPI: Skipping parse of AML opcode: Method (0x0014)
ACPI: 34 ACPI AML tables successfully acquired and loaded
ACPI: USB4 _OSC: OS supports USB3+ DisplayPort+ PCIe+ XDomain+
ACPI: USB4 _OSC: OS controls USB3+ DisplayPort+ PCIe+ XDomain+

I'm not sure if it's normal.

Best Regards
Jim
Comment 13 Jim XU 2024-12-09 12:38:59 UTC
Thanks Mika Westerberg.

After add config define:
CONFIG_PINCTRL_METEORPOINT

I can enter our device code, without gpio error.
Debug on going.
Comment 14 Jim XU 2024-12-14 06:22:04 UTC
Created attachment 307357 [details]
Firmware from Intel.

Thanks brent.lu@intel.com, after applied his firmware, SPI read work on both SPI devices.
But it work after 13.6s after bootup, it cause firmware download failed.
We are debuging it now for let our devices sound work.

Thanks for all of your support.
Comment 15 Jim XU 2024-12-14 06:37:13 UTC
Hi All,

Summarize the work around is:
1. Apply below config define in .config:
CONFIG_PINCTRL_METEORPOINT

2. Apply new firmware from below:
https://github.com/thesofproject/sof-bin/releases,

Because suggested SOF not work in my side, may be I have not perform install.sh in right way:
SOF official release:
$ git clone https://urldefense.com/v3/__https://github.com/thesofproject/sof-bin.git__;!!G3vK!RgY0Nb414bX5vSgdLOacU2K_K2aZF_G1ka_6TNBwMec3VHaDTXSTkdnPFm-m6KZe1s16t-Gs7E8wQQ$

3. Replace sof-arl-s.ri in /lib/firmware/intel/sof-ipc4/arl-s/ by attached in previous comment (14).

Best Regards
Jim
Comment 16 Jim XU 2024-12-26 10:07:45 UTC
Created attachment 307407 [details]
Log and DSDT for SI-1 and SI-2.

Hi All,

My code has worked on SI-1.
After porting to SI-2, it not work, logs and DSDT has shared, from log, seem it parser firmware correct, but parser again for sof-audio-pci-intel-mtl, and failed.

Best Regards
Jim
Comment 17 Neo Wong 2024-12-26 10:08:10 UTC
Created attachment 307408 [details]
attachment-12822-0.html

OOO WW52.4 & WW52.5, please expect slow response.

thanks
-neo
Comment 18 Brent Lu 2024-12-26 11:27:01 UTC
Seems to be the key issue. Is the BIOS using production key or pre-production key?

[    7.855289] sof-audio-pci-intel-mtl 0000:80:1f.3: hda_cl_copy_fw: timeout with rom_status_reg (0x163200) read
[    7.856103] sof-audio-pci-intel-mtl 0000:80:1f.3: ------------[ DSP dump start ]------------
[    7.856105] sof-audio-pci-intel-mtl 0000:80:1f.3: Firmware download failed
[    7.856107] sof-audio-pci-intel-mtl 0000:80:1f.3: fw_state: SOF_FW_BOOT_IN_PROGRESS (3)
[    7.856112] sof-audio-pci-intel-mtl 0000:80:1f.3: 0xd000000c: module: ROM_EXT, state: VALIDATE_PUB_KEY, not running
[    7.856120] sof-audio-pci-intel-mtl 0000:80:1f.3: error code: 0x97 (unknown)
[    7.856152] sof-audio-pci-intel-mtl 0000:80:1f.3: ------------[ DSP dump end ]------------
[    7.856162] sof-audio-pci-intel-mtl 0000:80:1f.3: Failed to start DSP
[    7.856164] sof-audio-pci-intel-mtl 0000:80:1f.3: error: failed to boot DSP firmware -110
[    7.858172] sof-audio-pci-intel-mtl 0000:80:1f.3: error: sof_probe_work failed err: -110
Comment 19 Jim XU 2024-12-26 12:35:34 UTC
Sorry, I'm not clearly about production key.
Could it will be found in BIOS code?
Comment 20 juswin.hsueh 2024-12-27 01:02:33 UTC
Hi Jim,

Please double confirm with IEC for your device CPU stepping and bios CSME version to see if it's production key or pre-production. Thanks!!
Comment 21 Jim XU 2024-12-27 07:40:46 UTC
Hi,

With SI-2, needn't replace sof-arl-s.ri by debug version, just use official v2024.09.2, it will work.

Thanks a lot!
Best Regards
Jim