Skip to content

[Snapdragon Dev Kit] The PCIe x16 slot on the X Elite motherboard is disabled. #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
allokey opened this issue Jan 31, 2025 · 15 comments

Comments

@allokey
Copy link

allokey commented Jan 31, 2025

Bringing up the SnapDragon Dev Kit for Windows with Linux
I connected an NVIDIA 4090 via the onboard PCIe x16 slot and an external power supply, but the PCIe x8 lanes are not activated, preventing GPU detection. Additionally, the graphics driver is incompatible with the current kernel. Are there any solutions to these issues?

@jglathe
Copy link
Owner

jglathe commented Jan 31, 2025

AFAIK the PCIe slot in the dev kit (clearly visible in the layout) is not wired up. I honestly don't know which PCIe port that would be, it will be missing in the x1e80100.dtsi, too.

@allokey
Copy link
Author

allokey commented Jan 31, 2025

Image
PCIe and HDMI have always been part of the design. They were temporarily omitted from production due to manufacturing process constraints (PCIe) and lack of hot-plug capability (HDMI), though in practice, these components can be manually surface-mounted onto the board.

@jglathe
Copy link
Owner

jglathe commented Jan 31, 2025

This is nice and interesting info. However, does this slot work on Windows? Would be the first thing to check. From there on, there is still the issue of the pcie port being defined in the dtb and in the x1e80100.dtsi.

@jglathe
Copy link
Owner

jglathe commented Jan 31, 2025

The sources are open (except maybe for the 4090). Current top of branch is jg/6.13-7. The kernel packages I build and publish are here. The config I use is in arch/arm64/config/ubuntu_x1e_defconfig. And in the annotations.

@allokey
Copy link
Author

allokey commented Feb 1, 2025

This is nice and interesting info. However, does this slot work on Windows? Would be the first thing to check. From there on, there is still the issue of the pcie port being defined in the dtb and in the x1e80100.dtsi.

Yes, PCIe gen4 x8 and HDMI are available under Windows system. Also, I saw information about a 'V7 patch'. However, NVIDIA does not have Windows on ARM GPU drivers.

@jglathe
Copy link
Owner

jglathe commented Feb 1, 2025

Huh. Okay I checked, that patch appears to be applied and from the date (and a re-try to apply it) it is already in my tree. I have defined pcie3 in the DevKit dtb, however I would expect to need some control gpios for enabling it. I also defined mdss_dp3 for the hdmi port. Usually you need a connector definition, too, but its worth a try. Regarding nVidia drivers, I will take a look at the config, maybe somethings missing. Do you have other cards to check the slot? I will post the build and tree with the tag 6.13-8.

@allokey
Copy link
Author

allokey commented Feb 1, 2025

Okay,"I saw an article in @geerlingguy blog about 'AMD Radeon PRO W7700 running on Raspberry Pi'. I don't have an AMD graphics card here, but I can buy one, though shipping will take a few days. When I get the AMD graphics card, I will try it again.

@jglathe
Copy link
Owner

jglathe commented Feb 1, 2025

First bootup with pcie3 enabled shows some hardware not coming completely up:

Image

I will try and guess the reset and enable GPIOs A good data source would be better, though.

The HDMI port might work now, it is mdss_dp3.

x1e001de-devkit.dtb.txt

I will upload 6.13-8 when I have the missing GPIOs.

@jglathe jglathe changed the title The PCIe x16 slot on the X Elite motherboard is disabled. [Snapdragon Dev Kit] The PCIe x16 slot on the X Elite motherboard is disabled. Feb 1, 2025
@Mis012
Copy link

Mis012 commented Feb 2, 2025

@jglathe: my guess would be

	perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>;
	wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>;

obviously could be anything but those are probably the "default" ones

@jglathe
Copy link
Owner

jglathe commented Feb 2, 2025

Oh I got lucky: https://lore.kernel.org/linux-arm-msm/[email protected]/

So that's settled. But, with pcie3 and mdss_dp3 enabled, I get errors (don't have the hardware attached):

  • pcie3 phy doesn't come up
  • mdss_dp3 throws errors

This could be because the hardware isn't there, maybe @allokey knows a little more. Anyway, to have both cases covered, I have added a separate dts file for the fully populated variant. I will upload the latest build (still 6.13-8) later on.

@allokey
Copy link
Author

allokey commented Feb 3, 2025

Alright, let me try it out.

@jglathe
Copy link
Owner

jglathe commented Feb 3, 2025

x1e001de-devkit_pcie3_hdmi.dtb.txt

The build is up, source too.

@allokey
Copy link
Author

allokey commented Feb 3, 2025

x1e001de-devkit_pcie3_hdmi.dtb.txt

The build is up, source too.

OK. I'll try installing it first, let's start with NVIDIA.

@allokey
Copy link
Author

allokey commented Feb 3, 2025

This boot1.txt contains the complete boot log. I will proceed as follows:

  1. Check the connection between the PC power supply and the graphics card.

  2. Since HDMI is not functioning, I need to inspect the firmware.

@jglathe
Copy link
Owner

jglathe commented Feb 5, 2025

Hi @allokey , thank you for the extensive log. Activation doesn't look right, looks to me like we're missing some regulators to get the phy's up. Maybe a look into the Surface pro (11?) might help, since it has the SD card reader connected via PCIe3. Although Microsoft is so odd with hardware... worth a try.

jglathe pushed a commit that referenced this issue Feb 28, 2025
'commit 18bcb4a ("mtd: spi-nor: sst: Factor out common write operation
to `sst_nor_write_data()`")' introduced a bug where only one byte of data
is written, regardless of the number of bytes passed to
sst_nor_write_data(), causing a kernel crash during the write operation.
Ensure the correct number of bytes are written as passed to
sst_nor_write_data().

Call trace:
[   57.400180] ------------[ cut here ]------------
[   57.404842] While writing 2 byte written 1 bytes
[   57.409493] WARNING: CPU: 0 PID: 737 at drivers/mtd/spi-nor/sst.c:187 sst_nor_write_data+0x6c/0x74
[   57.418464] Modules linked in:
[   57.421517] CPU: 0 UID: 0 PID: 737 Comm: mtd_debug Not tainted 6.12.0-g5ad04afd91f9 #30
[   57.429517] Hardware name: Xilinx Versal A2197 Processor board revA - x-prc-02 revA (DT)
[   57.437600] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   57.444557] pc : sst_nor_write_data+0x6c/0x74
[   57.448911] lr : sst_nor_write_data+0x6c/0x74
[   57.453264] sp : ffff80008232bb40
[   57.456570] x29: ffff80008232bb40 x28: 0000000000010000 x27: 0000000000000001
[   57.463708] x26: 000000000000ffff x25: 0000000000000000 x24: 0000000000000000
[   57.470843] x23: 0000000000010000 x22: ffff80008232bbf0 x21: ffff000816230000
[   57.477978] x20: ffff0008056c0080 x19: 0000000000000002 x18: 0000000000000006
[   57.485112] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80008232b580
[   57.492246] x14: 0000000000000000 x13: ffff8000816d1530 x12: 00000000000004a4
[   57.499380] x11: 000000000000018c x10: ffff8000816fd530 x9 : ffff8000816d1530
[   57.506515] x8 : 00000000fffff7ff x7 : ffff8000816fd530 x6 : 0000000000000001
[   57.513649] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[   57.520782] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0008049b0000
[   57.527916] Call trace:
[   57.530354]  sst_nor_write_data+0x6c/0x74
[   57.534361]  sst_nor_write+0xb4/0x18c
[   57.538019]  mtd_write_oob_std+0x7c/0x88
[   57.541941]  mtd_write_oob+0x70/0xbc
[   57.545511]  mtd_write+0x68/0xa8
[   57.548733]  mtdchar_write+0x10c/0x290
[   57.552477]  vfs_write+0xb4/0x3a8
[   57.555791]  ksys_write+0x74/0x10c
[   57.559189]  __arm64_sys_write+0x1c/0x28
[   57.563109]  invoke_syscall+0x54/0x11c
[   57.566856]  el0_svc_common.constprop.0+0xc0/0xe0
[   57.571557]  do_el0_svc+0x1c/0x28
[   57.574868]  el0_svc+0x30/0xcc
[   57.577921]  el0t_64_sync_handler+0x120/0x12c
[   57.582276]  el0t_64_sync+0x190/0x194
[   57.585933] ---[ end trace 0000000000000000 ]---

Cc: [email protected]
Fixes: 18bcb4a ("mtd: spi-nor: sst: Factor out common write operation to `sst_nor_write_data()`")
Signed-off-by: Amit Kumar Mahapatra <[email protected]>
Reviewed-by: Pratyush Yadav <[email protected]>
Reviewed-by: Tudor Ambarus <[email protected]>
Reviewed-by: Bence Csókás <[email protected]>
[[email protected]: add Cc stable tag]
Signed-off-by: Pratyush Yadav <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
jglathe pushed a commit that referenced this issue Mar 3, 2025
'commit 18bcb4a ("mtd: spi-nor: sst: Factor out common write operation
to `sst_nor_write_data()`")' introduced a bug where only one byte of data
is written, regardless of the number of bytes passed to
sst_nor_write_data(), causing a kernel crash during the write operation.
Ensure the correct number of bytes are written as passed to
sst_nor_write_data().

Call trace:
[   57.400180] ------------[ cut here ]------------
[   57.404842] While writing 2 byte written 1 bytes
[   57.409493] WARNING: CPU: 0 PID: 737 at drivers/mtd/spi-nor/sst.c:187 sst_nor_write_data+0x6c/0x74
[   57.418464] Modules linked in:
[   57.421517] CPU: 0 UID: 0 PID: 737 Comm: mtd_debug Not tainted 6.12.0-g5ad04afd91f9 #30
[   57.429517] Hardware name: Xilinx Versal A2197 Processor board revA - x-prc-02 revA (DT)
[   57.437600] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   57.444557] pc : sst_nor_write_data+0x6c/0x74
[   57.448911] lr : sst_nor_write_data+0x6c/0x74
[   57.453264] sp : ffff80008232bb40
[   57.456570] x29: ffff80008232bb40 x28: 0000000000010000 x27: 0000000000000001
[   57.463708] x26: 000000000000ffff x25: 0000000000000000 x24: 0000000000000000
[   57.470843] x23: 0000000000010000 x22: ffff80008232bbf0 x21: ffff000816230000
[   57.477978] x20: ffff0008056c0080 x19: 0000000000000002 x18: 0000000000000006
[   57.485112] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80008232b580
[   57.492246] x14: 0000000000000000 x13: ffff8000816d1530 x12: 00000000000004a4
[   57.499380] x11: 000000000000018c x10: ffff8000816fd530 x9 : ffff8000816d1530
[   57.506515] x8 : 00000000fffff7ff x7 : ffff8000816fd530 x6 : 0000000000000001
[   57.513649] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[   57.520782] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0008049b0000
[   57.527916] Call trace:
[   57.530354]  sst_nor_write_data+0x6c/0x74
[   57.534361]  sst_nor_write+0xb4/0x18c
[   57.538019]  mtd_write_oob_std+0x7c/0x88
[   57.541941]  mtd_write_oob+0x70/0xbc
[   57.545511]  mtd_write+0x68/0xa8
[   57.548733]  mtdchar_write+0x10c/0x290
[   57.552477]  vfs_write+0xb4/0x3a8
[   57.555791]  ksys_write+0x74/0x10c
[   57.559189]  __arm64_sys_write+0x1c/0x28
[   57.563109]  invoke_syscall+0x54/0x11c
[   57.566856]  el0_svc_common.constprop.0+0xc0/0xe0
[   57.571557]  do_el0_svc+0x1c/0x28
[   57.574868]  el0_svc+0x30/0xcc
[   57.577921]  el0t_64_sync_handler+0x120/0x12c
[   57.582276]  el0t_64_sync+0x190/0x194
[   57.585933] ---[ end trace 0000000000000000 ]---

Cc: [email protected]
Fixes: 18bcb4a ("mtd: spi-nor: sst: Factor out common write operation to `sst_nor_write_data()`")
Signed-off-by: Amit Kumar Mahapatra <[email protected]>
Reviewed-by: Pratyush Yadav <[email protected]>
Reviewed-by: Tudor Ambarus <[email protected]>
Reviewed-by: Bence Csókás <[email protected]>
[[email protected]: add Cc stable tag]
Signed-off-by: Pratyush Yadav <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants