Skip to content

Backport USB support for sa8775p-ride

Bugzilla: https://bugzilla.redhat.com/2208304

Backport USB support for sa8775p-ride

How to test

  • Apply the MR to main-automotive

  • Apply !2592 (merged) (configs)

  • Build the kernel on an arm64 machine

# make dist-configs
# cp redhat/configs/kernel-automotive-5.14.0-aarch64-debug.config .config
# make INSTALL_MOD_PATH=/root/modules_install -j16 Image.gz modules dtbs
# make INSTALL_MOD_PATH=/root/modules_install -j16 modules_install
  • Create an initramfs containing the necessary modules
dracut --force --install "/usr/bin/lsusb" --drivers="gcc-sa8775p clk-rpmh rpmhpd pinctrl-sa8775p qnoc-sa8775p phy-qcom-qmp-usb phy-qcom-snps-femto-v2 qcom-rpmh-regulator pinctrl-spmi-gpio dwc3 dwc3-qcom spmi-pmic-arb qcom-spmi-pmic" initramfs.img 5.14.0+
  • Create a boot image
# cd ~
# git clone https://android.googlesource.com/platform/system/tools/mkbootimg
# cd centos-stream-9
# ~/mkbootimg/mkbootimg.py --header_version 2 --output boot.img --ramdisk initramfs.img --kernel arch/arm64/boot/Image.gz --dtb arch/arm64/boot/dts/qcom/sa8775p-ride.dtb --pagesize 4096 --kernel_offset 0x80208000 --second_offset 0x81100000 --tags_offset 0x7d00000 --base 0x1208800 --cmdline 'rd.retry=0 console=ttyMSM0,115200,n8 earlycon=qcom_geni,0xa8c000 ignore_loglevel clk_ignore_unused'
  • Copy the boot image to a Ride SX 4 sidekick and flash it using fastboot

  • On the target, lsusb should show the detected USB ports:

Bus 003 Device 001: ID 1d6b:0003 Linux 5.14.0+ xhci-hcd xHCI Host Controller
Bus 002 Device 001: ID 1d6b:0002 Linux 5.14.0+ xhci-hcd xHCI Host Controller
Bus 001 Device 001: ID 1d6b:0002 Linux 5.14.0+ xhci-hcd xHCI Host Controller

Signed-off-by: Adrien Thierry athierry@redhat.com

Edited by Adrien Thierry

Merge request reports