Skip to content

Backport support for sa8775p reboot mode driver

Backport support for sa8775p reboot mode driver

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

How to test

  • Apply the MR to main-automotive

  • Apply !2611 (merged) (configs)

  • Make sure !2558 (merged) and !2592 (merged) are applied if not already merged (USB support, which also contains PMIC dependencies)

  • 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 --drivers="gcc-sa8775p clk-rpmh rpmhpd pinctrl-sa8775p qnoc-sa8775p spmi-pmic-arb qcom-spmi-pmic nvmem-reboot-mode nvmem_qcom-spmi-sdam" 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'
  • Copy the boot image to a Ride SX 4 sidekick and flash it using fastboot

  • On the target:

    • rebooting using reboot recovery should show KeyPress:0, BootReason:1 in the boot log
    • rebooting using reboot bootloader should reboot into fastboot mode and show KeyPress:0, BootReason:2 in the boot log

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

Edited by Adrien Thierry

Merge request reports