From 201053c64becd6c002f23adc0cb33b51f5895841 Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Mon, 6 May 2024 16:21:03 +0300 Subject: [PATCH] bsp: linux-lmp-fslc-imx: make patches version-related Prepare for adding the same patches for other kernel versions. Isolate linux-lmp-fslc-imx patches compatible only with 6.1. Move patches common for multiply versions up to linux-lmp-fslc-imx.inc. Signed-off-by: Oleksandr Suvorov --- .../linux/linux-lmp-fslc-imx.inc | 21 +++++++ ...ts-imx8mm-evk-qca-wifi-enable-suppor.patch | 0 ...rm64-dts-imx8mq-drop-cpu-idle-states.patch | 57 ------------------- ...-dts-imx8mm-evk-use-imx8mm-evkb-for-.patch | 0 ...rch-arm64-dts-imx8mp-enable-I2C5-bus.patch | 0 ...64-dts-imx8mn-evk.dtsi-re-add-blueto.patch | 0 ...p-media-Kconfig-fix-double-VIDEO_DEV.patch | 0 ...p-gpu-drm-cadence-select-hdmi-helper.patch | 0 ...p-hwrng-optee-support-generic-crypto.patch | 0 .../linux/linux-lmp-fslc-imx_6.1.bb | 24 +------- 10 files changed, 24 insertions(+), 78 deletions(-) rename meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/{imx8mm-lpddr4-evk => }/0001-FIO-toup-arm64-dts-imx8mm-evk-qca-wifi-enable-suppor.patch (100%) delete mode 100644 meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-arm64-dts-imx8mq-drop-cpu-idle-states.patch rename meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/{ => 6.1}/0001-FIO-extras-arm64-dts-imx8mm-evk-use-imx8mm-evkb-for-.patch (100%) rename meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/{ => 6.1}/0001-FIO-internal-arch-arm64-dts-imx8mp-enable-I2C5-bus.patch (100%) rename meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/{mx8mn-nxp-bsp => 6.1}/0001-FIO-internal-arm64-dts-imx8mn-evk.dtsi-re-add-blueto.patch (100%) rename meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/{ => 6.1}/0002-FIO-toup-media-Kconfig-fix-double-VIDEO_DEV.patch (100%) rename meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/{ => 6.1}/0003-FIO-toup-gpu-drm-cadence-select-hdmi-helper.patch (100%) rename meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/{ => 6.1}/0004-FIO-toup-hwrng-optee-support-generic-crypto.patch (100%) diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx.inc b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx.inc index 2a2f018e58..7ab9d300b1 100644 --- a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx.inc +++ b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx.inc @@ -13,3 +13,24 @@ SRC_URI = "${KERNEL_REPO};protocol=${KERNEL_REPO_PROTOCOL};branch=${KERNEL_BRANC KMETA = "kernel-meta" include recipes-kernel/linux/linux-lmp.inc + +SRC_URI += " \ + file://0004-FIO-toup-hwrng-optee-support-generic-crypto.patch \ + file://0001-FIO-toimx-of-enable-using-OF_DYNAMIC-without-OF_UNIT.patch \ + file://0002-FIO-toup-media-Kconfig-fix-double-VIDEO_DEV.patch \ + file://0003-FIO-toup-gpu-drm-cadence-select-hdmi-helper.patch \ + file://0004-FIO-toup-media-imx8-select-v4l2_-for-mxc-mipi-csi2_y.patch \ +" + +SRC_URI:append:imx8mp-lpddr4-evk = " \ + ${@bb.utils.contains('MACHINE_FEATURES', 'se05x', 'file://0001-FIO-internal-arch-arm64-dts-imx8mp-enable-I2C5-bus.patch', '', d)} \ +" + +# Add bluetooth support for QCA9377 +SRC_URI:append:imx8mm-lpddr4-evk = " \ + file://0001-FIO-toup-arm64-dts-imx8mm-evk-qca-wifi-enable-suppor.patch \ +" +# Fix bluetooth reset for Murata 1MW +SRC_URI:append:mx8mn-nxp-bsp = " \ + file://0001-FIO-internal-arm64-dts-imx8mn-evk.dtsi-re-add-blueto.patch \ +" diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/imx8mm-lpddr4-evk/0001-FIO-toup-arm64-dts-imx8mm-evk-qca-wifi-enable-suppor.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-FIO-toup-arm64-dts-imx8mm-evk-qca-wifi-enable-suppor.patch similarity index 100% rename from meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/imx8mm-lpddr4-evk/0001-FIO-toup-arm64-dts-imx8mm-evk-qca-wifi-enable-suppor.patch rename to meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-FIO-toup-arm64-dts-imx8mm-evk-qca-wifi-enable-suppor.patch diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-arm64-dts-imx8mq-drop-cpu-idle-states.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-arm64-dts-imx8mq-drop-cpu-idle-states.patch deleted file mode 100644 index c126c949bb..0000000000 --- a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-arm64-dts-imx8mq-drop-cpu-idle-states.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 395e824b55ecbb9329771a107eb7d954bff93bc8 Mon Sep 17 00:00:00 2001 -From: Ricardo Salveti -Date: Wed, 13 Oct 2021 19:43:22 -0300 -Subject: [PATCH 3/3] arm64: dts: imx8mq: drop cpu-idle-states - -This partially reverts commit 30181937c470a5e08c5b94ca416d97fbf7c4293c. - -cpu-idle can only work when the workaround is also available (but can -still have issues based on the upstream thread discussion), so revert as -a way to make the same dts compatible across multiple kernel versions. - -This allows the same 5.10-based device tree to be used for SystemReady. - -Signed-off-by: Ricardo Salveti ---- - arch/arm64/boot/dts/freescale/imx8mq.dtsi | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi -index 62ccb6eeff6a..7d748deb258c 100644 ---- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi -+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi -@@ -108,7 +108,6 @@ A53_0: cpu@0 { - #cooling-cells = <2>; - nvmem-cells = <&cpu_speed_grade>; - nvmem-cell-names = "speed_grade"; -- cpu-idle-states = <&CPU_SLEEP>; - }; - - A53_1: cpu@1 { -@@ -121,7 +120,6 @@ A53_1: cpu@1 { - next-level-cache = <&A53_L2>; - operating-points-v2 = <&a53_opp_table>; - #cooling-cells = <2>; -- cpu-idle-states = <&CPU_SLEEP>; - }; - - A53_2: cpu@2 { -@@ -134,7 +132,6 @@ A53_2: cpu@2 { - next-level-cache = <&A53_L2>; - operating-points-v2 = <&a53_opp_table>; - #cooling-cells = <2>; -- cpu-idle-states = <&CPU_SLEEP>; - }; - - A53_3: cpu@3 { -@@ -147,7 +144,6 @@ A53_3: cpu@3 { - next-level-cache = <&A53_L2>; - operating-points-v2 = <&a53_opp_table>; - #cooling-cells = <2>; -- cpu-idle-states = <&CPU_SLEEP>; - }; - - A53_L2: l2-cache0 { --- -2.25.1 - diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-FIO-extras-arm64-dts-imx8mm-evk-use-imx8mm-evkb-for-.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0001-FIO-extras-arm64-dts-imx8mm-evk-use-imx8mm-evkb-for-.patch similarity index 100% rename from meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-FIO-extras-arm64-dts-imx8mm-evk-use-imx8mm-evkb-for-.patch rename to meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0001-FIO-extras-arm64-dts-imx8mm-evk-use-imx8mm-evkb-for-.patch diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-FIO-internal-arch-arm64-dts-imx8mp-enable-I2C5-bus.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0001-FIO-internal-arch-arm64-dts-imx8mp-enable-I2C5-bus.patch similarity index 100% rename from meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0001-FIO-internal-arch-arm64-dts-imx8mp-enable-I2C5-bus.patch rename to meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0001-FIO-internal-arch-arm64-dts-imx8mp-enable-I2C5-bus.patch diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/mx8mn-nxp-bsp/0001-FIO-internal-arm64-dts-imx8mn-evk.dtsi-re-add-blueto.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0001-FIO-internal-arm64-dts-imx8mn-evk.dtsi-re-add-blueto.patch similarity index 100% rename from meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/mx8mn-nxp-bsp/0001-FIO-internal-arm64-dts-imx8mn-evk.dtsi-re-add-blueto.patch rename to meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0001-FIO-internal-arm64-dts-imx8mn-evk.dtsi-re-add-blueto.patch diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0002-FIO-toup-media-Kconfig-fix-double-VIDEO_DEV.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0002-FIO-toup-media-Kconfig-fix-double-VIDEO_DEV.patch similarity index 100% rename from meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0002-FIO-toup-media-Kconfig-fix-double-VIDEO_DEV.patch rename to meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0002-FIO-toup-media-Kconfig-fix-double-VIDEO_DEV.patch diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0003-FIO-toup-gpu-drm-cadence-select-hdmi-helper.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0003-FIO-toup-gpu-drm-cadence-select-hdmi-helper.patch similarity index 100% rename from meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0003-FIO-toup-gpu-drm-cadence-select-hdmi-helper.patch rename to meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0003-FIO-toup-gpu-drm-cadence-select-hdmi-helper.patch diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0004-FIO-toup-hwrng-optee-support-generic-crypto.patch b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0004-FIO-toup-hwrng-optee-support-generic-crypto.patch similarity index 100% rename from meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/0004-FIO-toup-hwrng-optee-support-generic-crypto.patch rename to meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx/6.1/0004-FIO-toup-hwrng-optee-support-generic-crypto.patch diff --git a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx_6.1.bb b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx_6.1.bb index 41ac72a8d9..e69a2b0c3a 100644 --- a/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx_6.1.bb +++ b/meta-lmp-bsp/recipes-kernel/linux/linux-lmp-fslc-imx_6.1.bb @@ -1,7 +1,9 @@ # We need to extend files paths because the -rt version of this # recipe includes this one and we need to have patches for this # recipe available in -rt recipe. -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" +# Extend files paths with the short kernel version to be able to keep +# different patches with the same names for different kernel versions. +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}/${KSHORT_VER}:${THISDIR}/${PN}:" KERNEL_DEVICETREE_32BIT_COMPATIBILITY_UPDATE = "1" @@ -12,28 +14,8 @@ include recipes-kernel/linux/kmeta-linux-lmp-6.1.y.inc # Use Freescale kernel by default LINUX_VERSION ?= "6.1.70" KERNEL_BRANCH ?= "6.1-2.2.x-imx" - SRCREV_machine = "4e3fc5471376a15279ee5c99e791a7c7b065cbc1" SRC_URI += " \ - file://0004-FIO-toup-hwrng-optee-support-generic-crypto.patch \ file://0001-FIO-extras-arm64-dts-imx8mm-evk-use-imx8mm-evkb-for-.patch \ - file://0001-arm64-dts-imx8mq-drop-cpu-idle-states.patch \ - file://0001-FIO-toimx-of-enable-using-OF_DYNAMIC-without-OF_UNIT.patch \ - file://0002-FIO-toup-media-Kconfig-fix-double-VIDEO_DEV.patch \ - file://0003-FIO-toup-gpu-drm-cadence-select-hdmi-helper.patch \ - file://0004-FIO-toup-media-imx8-select-v4l2_-for-mxc-mipi-csi2_y.patch \ -" - -SRC_URI:append:imx8mp-lpddr4-evk = " \ - ${@bb.utils.contains('MACHINE_FEATURES', 'se05x', 'file://0001-FIO-internal-arch-arm64-dts-imx8mp-enable-I2C5-bus.patch', '', d)} \ -" - -# Add bluetooth support for QCA9377 -SRC_URI:append:imx8mm-lpddr4-evk = " \ - file://0001-FIO-toup-arm64-dts-imx8mm-evk-qca-wifi-enable-suppor.patch \ -" -# Fix bluetooth reset for Murata 1MW -SRC_URI:append:mx8mn-nxp-bsp = " \ - file://0001-FIO-internal-arm64-dts-imx8mn-evk.dtsi-re-add-blueto.patch \ "