Skip to content
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

kirkstone device tree and wifi/bl issue #51

Open
NIKovachev opened this issue Feb 22, 2023 · 18 comments · Fixed by #52
Open

kirkstone device tree and wifi/bl issue #51

NIKovachev opened this issue Feb 22, 2023 · 18 comments · Fixed by #52

Comments

@NIKovachev
Copy link

hi @mirzak,
thanks for sharing your work.

With kirkstone there is no PCI reported:

root@coral-dev:~# lspci
root@coral-dev:~# 

I assume there is a problem with the device tree as we are using one from a different board. i tried to use the old device tree provided with the mendel release but this didn't work due to a bus clock error. As of that I'm unable to enable the wifi aand that makes the device in my case useless. Can you support me please with the pci and the device tree issue?

@mirzak
Copy link
Owner

mirzak commented Feb 22, 2023

Which branch of meta-coral did you use? Have you tried with master?

@kraj has been doing some updates recently, including updates of kernel.

@NIKovachev
Copy link
Author

Hi,
I used wip/kirkstone-upstream. After the changes can I build the master with kirkstone or I need to use older version?

@kraj
Copy link
Contributor

kraj commented Feb 22, 2023

Master works great and that’s what I test regularly with yoe distro I am not sure about kirkstone maybe you can change which kernel to use etc might help

@NIKovachev
Copy link
Author

Thanks @kraj. I need kernel 5.15 at least due to some gstreamer-imx dependencies. That's why i was using kirkstone. Can I get newer kernel with yoe or yocto zeus/warrior and the master branch?

@kraj
Copy link
Contributor

kraj commented Feb 22, 2023

we currently use linux-fslc 6.1 kernel with master. If you want to stick to 5.15 you can change

diff --git a/conf/machine/coral-dev.conf b/conf/machine/coral-dev.conf
index e7ad7cb..6e33bbb 100644
--- a/conf/machine/coral-dev.conf
+++ b/conf/machine/coral-dev.conf
@@ -14,7 +14,7 @@ require conf/machine/include/arm/armv8a/tune-cortexa53.inc
 # inline NEON and FPU code generation
 DEFAULTTUNE:use-mainline-bsp = "cortexa53-crypto"

-PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp = "linux-fslc"
+PREFERRED_PROVIDER_virtual/kernel:use-mainline-bsp = "linux-fslc-lts"
 PREFERRED_PROVIDER_virtual/kernel:use-nxp-bsp = "linux-coral"

 MACHINE_FEATURES += "pci wifi bluetooth bcm43455 bcm4356"

@NIKovachev
Copy link
Author

hi @kraj
I've build the master with yoe dist and worked without issues, the kernel is 6.1 which is fine but the PCI is still missing. Do you have your wifi working and do lspci has output?

root@coral-dev:~# uname -a
Linux coral-dev 6.1.4-fslc+gb3713f4b8251 #1 SMP PREEMPT Mon Jan  9 14:42:19 UTC 2023 aarch64 GNU/Linux
root@coral-dev:~# lspci
root@coral-dev:~# iw list
root@coral-dev:~# 

@kraj
Copy link
Contributor

kraj commented Feb 23, 2023

My needs are ethernet only, infact so I have not tested wifi/bluetooth.

@NIKovachev
Copy link
Author

can you help me please, I'm really stuck with that. I has a look at the device tree and both pci (pcie@33800000, pcie@33c00000) were disabled. I enabled them and now I have the following:

root@coral-dev:~# lspci
root@coral-dev:~# dmesg |grep pci
[    0.000000] Kernel command line: root=/dev/mmcblk1p2 rootfstype=ext4 rw rootwait net.ifnames=0 pci=pcie_bus_perf
[    1.768491] imx6q-pcie 33800000.pcie: error -ENOENT: pcie_bus clock source missing or invalid
[    1.770620] imx6q-pcie 33c00000.pcie: error -ENOENT: pcie_bus clock source missing or invalid
[    1.770645] imx6q-pcie: probe of 33c00000.pcie failed with error -2
[    1.796623] imx6q-pcie: probe of 33800000.pcie failed with error -2
root@coral-dev:~# 

@NIKovachev
Copy link
Author

I tried to use the device tree from mendel but the kernel is not loading at all. The output from the kernel is not readable as well. do you have any ideas what could be the problem?

@kraj
Copy link
Contributor

kraj commented Feb 28, 2023

can you help me please, I'm really stuck with that. I has a look at the device tree and both pci (pcie@33800000, pcie@33c00000) were disabled. I enabled them and now I have the following:

root@coral-dev:~# lspci
root@coral-dev:~# dmesg |grep pci
[    0.000000] Kernel command line: root=/dev/mmcblk1p2 rootfstype=ext4 rw rootwait net.ifnames=0 pci=pcie_bus_perf
[    1.768491] imx6q-pcie 33800000.pcie: error -ENOENT: pcie_bus clock source missing or invalid
[    1.770620] imx6q-pcie 33c00000.pcie: error -ENOENT: pcie_bus clock source missing or invalid
[    1.770645] imx6q-pcie: probe of 33c00000.pcie failed with error -2
[    1.796623] imx6q-pcie: probe of 33800000.pcie failed with error -2
root@coral-dev:~# 

can you post your changes to device tree to enable this ?

@NIKovachev
Copy link
Author

I only changed status = "okay" for pcie@0x33800000 and pcie@0x33c00000. I also tried to get the pci config from the mendel device tree but that didn't work as well.

@NIKovachev
Copy link
Author

I just realise the TPU is attached to the PCI as well so even if I acces the device via ethernet its not really useful.

@mirzak
Copy link
Owner

mirzak commented Mar 6, 2023

The Coral Dev Board is largely based on https://github.com/Freescale/meta-freescale/blob/master/conf/machine/imx8mq-evk.conf. The WiFI part I believe is identical to that board.

So would start with comparing the dtbs of these two.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/freescale/imx8mq-evk.dts?h=v6.1.15

@mirzak
Copy link
Owner

mirzak commented Mar 6, 2023

I have only tested WiFi when I did the initial integration which was based on "zeus". This was still using the downstream Google Coral Linux kernel.

@NIKovachev
Copy link
Author

NIKovachev commented Mar 6, 2023

just had a look at i.MX 8MDQLQ EVK Board Hardware User's Guide https://cache.nxp.com/secured/assets/documents/en/user-guide/IMX8MDQLQEVKHUG.pdf?fileExt=.pdfand I can confirm the wifi setup is with the same.

@mirzak
Copy link
Owner

mirzak commented Mar 10, 2023

Hm, I did not close this :P. It was most likely the comment in #52 that did it in the merge.

@NIKovachev , can you try out the new changes and report back?

@mirzak mirzak reopened this Mar 10, 2023
@NIKovachev
Copy link
Author

sure I was planing to do that. thanks @mirzak @kraj

@HadzajlicJasmin
Copy link

Hi @NIKovachev,
were you able to get WiFi working on linux 6.1 version in the end. We are trying to get it working, without success yet. We get "pcie: Phy link never came up" for pcie0, but pcie1 is working fine and we can see TPU connected.
Thanks in advance.

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

Successfully merging a pull request may close this issue.

4 participants