Soquartz-cm4io emmc with usb host
#1
Hello all,

I'am trying to use a soquartz module on a cm4-io board, with a emmc chip on it (mmcblk1). I'am able to install, manjaro, armbian, pleb. I'am able to boot on the emmc, but the usb port won't work except when I have a sdcard inserted in my cm4io board.

Is there a way to get usb working without sd card?

Here's some informations:
Without sdcard:
Quote:lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


With sdcard:
Quote:lsusb
Bus 001 Device 013: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



Here's the udev event on card insertion:
Quote:udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[6269.749066] add      /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa (mmc)
KERNEL[6269.753961] add      /devices/virtual/bdi/179:0 (bdi)
UDEV  [6269.769249] add      /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa (mmc)
KERNEL[6269.771594] add      /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0 (block)
KERNEL[6269.772159] add      /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1 (block)
UDEV  [6269.772502] add      /devices/virtual/bdi/179:0 (bdi)
KERNEL[6269.772893] bind    /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa (mmc)
UDEV  [6269.901933] add      /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0 (block)
KERNEL[6269.934898] add      /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
KERNEL[6269.969263] change  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
KERNEL[6269.969411] add      /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
KERNEL[6270.033728] bind    /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
KERNEL[6270.034182] unbind  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
KERNEL[6270.034503] remove  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
KERNEL[6270.034771] change  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
UDEV  [6270.056507] add      /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1 (block)
UDEV  [6270.059122] bind    /devices/platform/fe2b0000.mmc/mmc_host/mmc0/mmc0:aaaa (mmc)
KERNEL[6270.129216] change  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
KERNEL[6270.129397] add      /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
KERNEL[6270.193638] bind    /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
KERNEL[6270.193788] bind    /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
UDEV  [6270.197201] add      /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
UDEV  [6270.201544] change  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
UDEV  [6270.205151] add      /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
UDEV  [6270.208560] bind    /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
UDEV  [6270.211622] unbind  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
UDEV  [6270.213159] remove  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
UDEV  [6270.217478] change  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
UDEV  [6270.221733] change  /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)
UDEV  [6270.225214] add      /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
UDEV  [6270.228709] bind    /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1/1-1:1.0 (usb)
UDEV  [6270.232849] bind    /devices/platform/fcc00000.usb/xhci-hcd.9.auto/usb1/1-1 (usb)


Thank you in advance for your answers and solutions.

Best Regards.
  Reply
#2
Hi,

thanks for reporting this, this could be a problem in the upstream device tree relating to regulators. I'll look into it further when I get the time.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#3
Thanks for the reply, I will be happy to make more tests if you need, when you will be ready.

To increase my knowledge, is there a place to learn how device tree work and understand how it's used with the soquartz module?
  Reply
#4
A good resource is https://elinux.org/Device_Tree_Usage

The device trees live in the Linux kernel tree in arch/arm64/boot/dts. The SOQuartz specific stuff is in arch/arm64/boot/dts/rockchip/rk3566-soquartz.dtsi. This file is included by arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dts which is the CM4 I/O board device tree for the SOQuartz.

You can build the device trees inside the Linux kernel tree with make dtbs (if you have a suitable .config, on Plebian you can grab a suitable config from /boot/config-*). This will produce a arch/arm64/boot/dts/rockchip/rk3566-soquartz-cm4.dtb (device tree blob). You'll need device-tree-compiler installed for this.

To then use it, at least on Plebian, you can drop a file in /etc/u-boot-menu/conf.d/ titled something like 99-customdtb.conf with the contents
Code:
U_BOOT_FDT="/path/to/your/dtb/file/here.dtb"
replacing the path with yours of course. Then run u-boot-update as root to regenerate the /boot/extlinux/extlinux.conf file.

On other distributions, you can likely edit the /boot/extlinux/extlinux.conf file directly (the FDT line specifically) to set a device tree, just make sure it's in a location that's accessible to u-boot (somewhere in /boot is usually a good idea if it's a separate partition)

Upstream kernel development for rockchip devices is done through the linux-rockchip mailing list. Commits need to be signed off (git commit -s), should be formatted with git format-patch and should be submitted with git send-email. A good way to know the prefix to use in a commit message is to run git log -- file you're changing here. There's plenty of documentation out there on how to submit patches, so I don't want to make this post too long explaining a process most people probably won't go through.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#5
Thank you for your bug report, I've identified the issue tonight and submitted a patch upstream to fix it.

Once upstream reviews and applies  it, it should trickle down to distributions eventually with the next stable kernel release.

Until then you can manually apply it to your git kernel tree with git am, and then use the dtb file with the steps outlined in the previous post.

Occasional Linux Kernel Contributor, Avid Wiki Updater, Ask Me About Quartz64
Open Hardware Quartz64 Model A TOSLink Adapter
Pi-bus GPIO Extender For ROCKPro64 And Quartz64 Model A
Plebian GNU/Linux
  Reply
#6
Thanks a lot!

I will try to apply it manually this week, if I have enough time. So thank for the patch and also all of the explanations.
  Reply
#7
I finally took some time today. The way to proceed is really straight forward. I confirm, It work as expected. 

Your help and learning was very appreciated. Thanks again.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SOQuartz Model A baseboard Real-Time Clock stormwyrm 1 551 11-19-2023, 01:04 AM
Last Post: stormwyrm
  SOQuartz with Waveshare CM4 fan heatsink stormwyrm 1 505 11-18-2023, 01:35 PM
Last Post: stormwyrm
  SOQuartz BLADE 3D server rack screws agriffith2134 1 699 08-14-2023, 02:23 PM
Last Post: agriffith2134
  eMMC endurance O1ez 2 1,705 09-27-2022, 04:43 AM
Last Post: O1ez
  DeskPi Super6C CM4 board with the SOQuartz adamfowleruk 5 4,328 08-09-2022, 03:22 PM
Last Post: tizilogic
  SOQuartz ATX Baseboard nixcamic 0 1,583 02-05-2022, 11:55 PM
Last Post: nixcamic
  Lamenting the fact that only 2 lanes of LVDS are exposed on SOQuartz evankrall 0 1,465 12-13-2021, 01:07 PM
Last Post: evankrall

Forum Jump:


Users browsing this thread: 1 Guest(s)