diff options
5 files changed, 53 insertions, 1 deletions
diff --git a/conf/machine/qrb5165-rb5.conf b/conf/machine/qrb5165-rb5.conf index aa0f7d4..8315faa 100644 --- a/conf/machine/qrb5165-rb5.conf +++ b/conf/machine/qrb5165-rb5.conf @@ -14,6 +14,7 @@ SERIAL_CONSOLE ?= "115200 ttyMSM0" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ kernel-modules \ firmware-qcom-rb5 linux-firmware-lt9611uxc \ + lt9611uxc-upgrade \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath11k wireless-regdb-static', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ diff --git a/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade.bb b/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade.bb new file mode 100644 index 0000000..e6ae271 --- /dev/null +++ b/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade.bb @@ -0,0 +1,19 @@ +SUMMARY = "Upgrade Lontium LT9611UXC firmware to the latest image" + +SRC_URI = "file://lt9611uxc.service file://lt9611uxc-upgrade.sh" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +inherit systemd + +RDEPENDS_${PN} += "linux-firmware-lt9611uxc" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/lt9611uxc-upgrade.sh ${D}${bindir} + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/lt9611uxc.service ${D}${systemd_system_unitdir} +} + +SYSTEMD_SERVICE_${PN} = "lt9611uxc.service" diff --git a/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade/lt9611uxc-upgrade.sh b/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade/lt9611uxc-upgrade.sh new file mode 100644 index 0000000..0886980 --- /dev/null +++ b/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade/lt9611uxc-upgrade.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ ! -r /lib/firmware/lt9611uxc_fw.bin ] ; then + echo "LT9611UXC firmware not found" + exit 1 +fi + +if [ ! -d /sys/bus/i2c/drivers/lt9611uxc ] ; then + modprobe lontium-lt9611uxc + sleep 1 +fi + +for f in /sys/bus/i2c/drivers/lt9611uxc/* ; do + [ -L $f ] || continue + version=`cat $f/lt9611uxc_firmware` + if [ "$version" -lt "43" ] ; then + echo > $f/lt9611uxc_firmware + fi +done diff --git a/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade/lt9611uxc.service b/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade/lt9611uxc.service new file mode 100644 index 0000000..c55e8ff --- /dev/null +++ b/recipes-bsp/lt9611uxc-upgrade/lt9611uxc-upgrade/lt9611uxc.service @@ -0,0 +1,11 @@ +[Unit] +Description=Update LT9611UXC Firmware +ConditionOnFirstBoot=true +After=systemd-udev-settle.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/lt9611uxc-upgrade.sh + +[Install] +WantedBy=getty.target diff --git a/recipes-kernel/linux/linux-linaro-qcomlt_5.11.bb b/recipes-kernel/linux/linux-linaro-qcomlt_5.11.bb index 31ebe58..9ff0647 100644 --- a/recipes-kernel/linux/linux-linaro-qcomlt_5.11.bb +++ b/recipes-kernel/linux/linux-linaro-qcomlt_5.11.bb @@ -10,6 +10,6 @@ require recipes-kernel/linux/linux-qcom-bootimg.inc LOCALVERSION ?= "-linaro-lt-qcom" SRCBRANCH = "release/rb5/qcomlt-5.11" -SRCREV = "c53a93b858f8166115bbe728a9a2a39bf7d0a91d" +SRCREV = "84882774d77f1f841b01142219eea531b135655c" COMPATIBLE_MACHINE = "(sm8250)" |