From f517940989c573097b8647087fd6803b1c771815 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 3 Nov 2023 20:07:34 +0300 Subject: [PATCH 1/6] qcom-armv8a: drop the maxcpus=2 from apq8096-db820c The supported kernels gained the CBF driver, that fixes SMP issues on MSM8996 / APQ8096 platforms. Thus the maxcpus=2 override is not necessary anymore. Signed-off-by: Dmitry Baryshkov --- conf/machine/qcom-armv8a.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/machine/qcom-armv8a.conf b/conf/machine/qcom-armv8a.conf index e91ccc0ff..326dcc4b2 100644 --- a/conf/machine/qcom-armv8a.conf +++ b/conf/machine/qcom-armv8a.conf @@ -29,7 +29,6 @@ QCOM_BOOTIMG_ROOTFS[qrb2210-rb1] ?= "PARTLABEL=userdata" QCOM_BOOTIMG_ROOTFS[qrb4210-rb2] ?= "PARTLABEL=userdata" SD_QCOM_BOOTIMG_ROOTFS[apq8016-sbc] ?= "/dev/mmcblk1p7" KERNEL_CMDLINE_EXTRA[sdm845-db845c] ?= "clk_ignore_unused pd_ignore_unused" -KERNEL_CMDLINE_EXTRA[apq8096-db820c] ?= "maxcpus=2" # Userspace tools MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ From c7b9fb5b26fffaea26febf031395aade3fbd613e Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 3 Nov 2023 20:08:42 +0300 Subject: [PATCH 2/6] linux-qcom-bootimg: declare variable dependency The do_qcom_img_deploy function references several variables (and flags) in a way that is not visible to bitbake. Declare vardeps manually to let bitbake know it and reschedule the function if one of variables changes. Signed-off-by: Dmitry Baryshkov --- recipes-kernel/linux/linux-qcom-bootimg.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-kernel/linux/linux-qcom-bootimg.inc b/recipes-kernel/linux/linux-qcom-bootimg.inc index c321926af..e40d19672 100644 --- a/recipes-kernel/linux/linux-qcom-bootimg.inc +++ b/recipes-kernel/linux/linux-qcom-bootimg.inc @@ -130,6 +130,7 @@ python do_qcom_img_deploy() { } do_qcom_img_deploy[depends] += "skales-native:do_populate_sysroot" +do_qcom_img_deploy[vardeps] = "QCOM_BOOTIMG_PAGE_SIZE QCOM_BOOTIMG_KERNEL_BASE KERNEL_CMDLINE_EXTRA QCOM_BOOTIMG_ROOTFS" addtask qcom_img_deploy after do_populate_sysroot do_packagedata bundle_initramfs before do_deploy From 20293155162aa7a390a6c7a9238e8753a066955f Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 3 Nov 2023 20:19:01 +0300 Subject: [PATCH 3/6] linux-qcom-bootimg: convert to the bbclass In order to improve sharing of the bootimg code, convert it to the BitBake class instead of it being just an include. Signed-off-by: Dmitry Baryshkov --- .../linux-qcom-bootimg.bbclass | 0 recipes-kernel/linux/linux-linaro-qcom.inc | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename recipes-kernel/linux/linux-qcom-bootimg.inc => classes/linux-qcom-bootimg.bbclass (100%) diff --git a/recipes-kernel/linux/linux-qcom-bootimg.inc b/classes/linux-qcom-bootimg.bbclass similarity index 100% rename from recipes-kernel/linux/linux-qcom-bootimg.inc rename to classes/linux-qcom-bootimg.bbclass diff --git a/recipes-kernel/linux/linux-linaro-qcom.inc b/recipes-kernel/linux/linux-linaro-qcom.inc index ce921a4bf..f7c1c9698 100644 --- a/recipes-kernel/linux/linux-linaro-qcom.inc +++ b/recipes-kernel/linux/linux-linaro-qcom.inc @@ -24,7 +24,7 @@ KERNEL_DEFCONFIG:aarch64 ?= "${S}/arch/arm64/configs/defconfig" KERNEL_DEFCONFIG:arm ?= "${S}/arch/arm/configs/qcom_defconfig" KERNEL_CONFIG_FRAGMENTS += "${S}/kernel/configs/distro.config" -require recipes-kernel/linux/linux-qcom-bootimg.inc +inherit linux-qcom-bootimg kernel_conf_variable() { sed -e "/CONFIG_$1[ =]/d;" -i ${B}/.config From f4f1ac64f2bcc17766a4e96a78168eaf61bcdb13 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 3 Nov 2023 20:03:59 +0300 Subject: [PATCH 4/6] linux-yocto: technology preview of RB* / Dragonboard support Provide necessary configuration for the linux-yocto recipe to enable support for Qualcomm Dragonboard 410c, 820c and RB[1235] devices. This is intended as a preview for now, since only the boot-to-rootfs functionality was tested. Some of the platform support patches were not ported, connectivity and sound were not tested, etc. Signed-off-by: Dmitry Baryshkov --- ...cm2290-temporarily-disable-cluster-i.patch | 61 ++++++ ...dts-qcom-qrb2210-rb1-Swap-UART-index.patch | 47 ++++ .../bsp/qcom-armv8a/qcom-armv8a-standard.scc | 28 +++ .../bsp/qcom-armv8a/qcom-armv8a.scc | 23 ++ .../bsp/qcom-armv8a/qcom-extra.cfg | 20 ++ .../bsp/qcom-armv8a/qcom-msm8916.cfg | 34 +++ .../bsp/qcom-armv8a/qcom-msm8916.scc | 4 + .../bsp/qcom-armv8a/qcom-msm8996.cfg | 22 ++ .../bsp/qcom-armv8a/qcom-msm8996.scc | 4 + .../bsp/qcom-armv8a/qcom-qcm2290.cfg | 8 + .../bsp/qcom-armv8a/qcom-qcm2290.scc | 4 + .../linux-yocto/bsp/qcom-armv8a/qcom-rpm.cfg | 11 + .../linux-yocto/bsp/qcom-armv8a/qcom-rpmh.cfg | 9 + .../bsp/qcom-armv8a/qcom-sdm845.cfg | 14 ++ .../bsp/qcom-armv8a/qcom-sdm845.scc | 4 + .../bsp/qcom-armv8a/qcom-sm6115.cfg | 11 + .../bsp/qcom-armv8a/qcom-sm6115.scc | 4 + .../bsp/qcom-armv8a/qcom-sm8250.cfg | 25 +++ .../bsp/qcom-armv8a/qcom-sm8250.scc | 4 + .../linux-yocto/bsp/qcom-armv8a/qcom.cfg | 204 ++++++++++++++++++ recipes-kernel/linux/linux-yocto/qcom.scc | 0 recipes-kernel/linux/linux-yocto_%.bbappend | 13 ++ recipes-kernel/linux/linux-yocto_6.5.bbappend | 4 + 23 files changed, 558 insertions(+) create mode 100644 recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qcm2290-temporarily-disable-cluster-i.patch create mode 100644 recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qrb2210-rb1-Swap-UART-index.patch create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a-standard.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-extra.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpm.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpmh.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.cfg create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.scc create mode 100644 recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom.cfg create mode 100644 recipes-kernel/linux/linux-yocto/qcom.scc create mode 100644 recipes-kernel/linux/linux-yocto_%.bbappend create mode 100644 recipes-kernel/linux/linux-yocto_6.5.bbappend diff --git a/recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qcm2290-temporarily-disable-cluster-i.patch b/recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qcm2290-temporarily-disable-cluster-i.patch new file mode 100644 index 000000000..80ff01e23 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qcm2290-temporarily-disable-cluster-i.patch @@ -0,0 +1,61 @@ +From bf26272a429b9e33ba5e8bc9ada9ec794b5e8610 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Wed, 19 Jul 2023 21:04:47 +0300 +Subject: [PATCH] arm64: dts: qcom: qcm2290: temporarily disable cluster idle + state + +For some reason cluster idle state causes the board to hang after boot. +Disable it to make it work properly. + +Signed-off-by: Dmitry Baryshkov +Upstream-Status: Inappropriate [need to find the issue first] +--- + arch/arm64/boot/dts/qcom/qcm2290.dtsi | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi +index 1d1de156f8f0..d1f0aa828234 100644 +--- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi ++++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi +@@ -170,32 +170,34 @@ psci { + + CPU_PD0: power-domain-cpu0 { + #power-domain-cells = <0>; +- power-domains = <&CLUSTER_PD>; ++ //power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP>; + }; + + CPU_PD1: power-domain-cpu1 { + #power-domain-cells = <0>; +- power-domains = <&CLUSTER_PD>; ++ //power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP>; + }; + + CPU_PD2: power-domain-cpu2 { + #power-domain-cells = <0>; +- power-domains = <&CLUSTER_PD>; ++ //power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP>; + }; + + CPU_PD3: power-domain-cpu3 { + #power-domain-cells = <0>; +- power-domains = <&CLUSTER_PD>; ++ //power-domains = <&CLUSTER_PD>; + domain-idle-states = <&CPU_SLEEP>; + }; + ++#if 0 + CLUSTER_PD: power-domain-cpu-cluster { + #power-domain-cells = <0>; + domain-idle-states = <&CLUSTER_SLEEP>; + }; ++#endif + }; + + reserved_memory: reserved-memory { +-- +2.42.0 + diff --git a/recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qrb2210-rb1-Swap-UART-index.patch b/recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qrb2210-rb1-Swap-UART-index.patch new file mode 100644 index 000000000..6f09a6c29 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/0001-arm64-dts-qcom-qrb2210-rb1-Swap-UART-index.patch @@ -0,0 +1,47 @@ +From 973c015facabcbd320063648010942c51992c1a1 Mon Sep 17 00:00:00 2001 +From: Konrad Dybcio +Date: Wed, 6 Sep 2023 11:24:55 +0200 +Subject: [PATCH] arm64: dts: qcom: qrb2210-rb1: Swap UART index + +Newer RB1 board revisions have a debug UART on QUP0. Sadly, it looks +like even when ordering one in retail, customers receive prototype +boards with "Enginering Sample" written on them. + +Use QUP4 for UART to make all known RB1 boards boot. + +Fixes: e18771961336 ("arm64: dts: qcom: Add initial QTI RB1 device tree") +Signed-off-by: Konrad Dybcio +Reviewed-by: Dmitry Baryshkov +Reported-by: Dmitry Baryshkov +Link: https://lore.kernel.org/r/20230906-topic-rb1_features_sans_icc-v1-1-e92ce6fbde16@linaro.org +Signed-off-by: Bjorn Andersson +Upstream-Status: Backport 6.7-rc1 +--- + arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +index eadba066972e..5cda5b761455 100644 +--- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts ++++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +@@ -13,7 +13,7 @@ / { + compatible = "qcom,qrb2210-rb1", "qcom,qrb2210", "qcom,qcm2290"; + + aliases { +- serial0 = &uart0; ++ serial0 = &uart4; + sdhc1 = &sdhc_1; + sdhc2 = &sdhc_2; + }; +@@ -357,7 +357,7 @@ key_volp_n: key-volp-n-state { + }; + + /* UART connected to the Micro-USB port via a FTDI chip */ +-&uart0 { ++&uart4 { + compatible = "qcom,geni-debug-uart"; + status = "okay"; + }; +-- +2.42.0 + diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a-standard.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a-standard.scc new file mode 100644 index 000000000..995839f7d --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a-standard.scc @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: MIT + +define KMACHINE qcom-armv8a +define KTYPE standard +define KARCH arm64 + +include ktypes/standard/standard.scc nocfg +branch qcom-armv8a + +include qcom-armv8a.scc + +#include features/bluetooth/bluetooth.scc +include features/cgroups/cgroups.scc +include features/transparent-hugepage/transparent-hugepage.cfg +include features/usb-net/usb-net.scc + +include cfg/fs/devtmpfs.scc +include cfg/fs/debugfs.scc +include cfg/fs/ext2.scc +include cfg/fs/ext4.scc +include cfg/fs/vfat.scc + +include cfg/timer/no_hz.scc + +# enable the ability to run 32 bit apps +include arch/arm/32bit-compat.scc + +kconf hardware qcom-extra.cfg diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a.scc new file mode 100644 index 000000000..653d5678d --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-armv8a.scc @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: MIT + +kconf hardware qcom.cfg + +include qcom-msm8916.scc +include qcom-msm8996.scc +include qcom-qcm2290.scc +include qcom-sdm845.scc +include qcom-sm6115.scc +include qcom-sm8250.scc + +include features/i2c/i2c.scc +include features/hrt/hrt.scc +include features/net/net.scc +include features/pci/pci.scc +include features/power/arm.scc +include features/spi/spi.scc +include features/usb/usb-base.scc +include features/leds/leds.scc +include features/pwm/pwm.scc + +include cfg/timer/rtc.scc +include cfg/dmaengine.scc diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-extra.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-extra.cfg new file mode 100644 index 000000000..cf7dbe74d --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-extra.cfg @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: MIT + +CONFIG_BPF_SYSCALL=y +CONFIG_CGROUP_BPF=y + +CONFIG_AUTOFS_FS=y + +CONFIG_TYPEC_MUX_NB7VPQ904M=y +CONFIG_TYPEC_MUX_FSA4480=y +CONFIG_TYPEC_DP_ALTMODE=y + +CONFIG_DRM_LONTIUM_LT9611=y +CONFIG_DRM_LONTIUM_LT9611UXC=y +CONFIG_DRM_I2C_ADV7511=y +CONFIG_DRM_I2C_ADV7511_AUDIO=y +CONFIG_DRM_I2C_ADV7511_CEC=y + +CONFIG_USB_XHCI_PCI_RENESAS=y + +CONFIG_USB_HSIC_USB3503=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.cfg new file mode 100644 index 000000000..4c6aa6a04 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.cfg @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: MIT + +CONFIG_PINCTRL_MSM8916=y + +CONFIG_QCOM_A53PLL=y +CONFIG_QCOM_CLK_APCS_MSM8916=y +CONFIG_MSM_GCC_8916=y + +CONFIG_INTERCONNECT_QCOM_MSM8916=y + +CONFIG_QCOM_IOMMU=y + +CONFIG_PM8916_WATCHDOG=y + +CONFIG_SND_SOC_APQ8016_SBC=m +CONFIG_SND_SOC_MSM8916_WCD_ANALOG=m +CONFIG_SND_SOC_MSM8916_WCD_DIGITAL=m + +CONFIG_EXTCON=y +CONFIG_EXTCON_USB_GPIO=y + +CONFIG_USB_ULPI_BUS=y +CONFIG_PHY_QCOM_USB_HS=y + +CONFIG_QCOM_SPMI_TEMP_ALARM=y +CONFIG_QCOM_SPMI_VADC=y + +CONFIG_QCOM_SMSM=y + +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_CHIPIDEA=y +CONFIG_USB_CHIPIDEA_MSM=y +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.scc new file mode 100644 index 000000000..4b2123795 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8916.scc @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT + +kconf hardware qcom-rpm.cfg +kconf hardware qcom-msm8916.cfg diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.cfg new file mode 100644 index 000000000..c9efb23ea --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.cfg @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT + +CONFIG_PINCTRL_MSM8996=y + +CONFIG_QCOM_CLK_APCC_MSM8996=y +CONFIG_MSM_GCC_8996=y +CONFIG_MSM_MMCC_8996=y +CONFIG_INTERCONNECT_QCOM_MSM8996=y + +CONFIG_PHY_QCOM_QMP_PCIE_8996=y + +CONFIG_SND_SOC_MSM8996=m + +CONFIG_SND_SOC_WCD9335=m + +CONFIG_PHY_QCOM_QUSB2=y + +CONFIG_EXTCON=y +CONFIG_EXTCON_USB_GPIO=y + +CONFIG_QCOM_SPMI_TEMP_ALARM=y +CONFIG_QCOM_SPMI_VADC=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.scc new file mode 100644 index 000000000..ef71826e7 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-msm8996.scc @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT + +kconf hardware qcom-rpm.cfg +kconf hardware qcom-msm8996.cfg diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.cfg new file mode 100644 index 000000000..1ff457d3b --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.cfg @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: MIT + +CONFIG_PINCTRL_QCM2290=y +CONFIG_QCM_GCC_2290=y +CONFIG_QCM_DISPCC_2290=y +CONFIG_INTERCONNECT_QCOM_QCM2290=y + +CONFIG_PHY_QCOM_QUSB2=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.scc new file mode 100644 index 000000000..ab2f06108 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-qcm2290.scc @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT + +kconf hardware qcom-rpm.cfg +kconf hardware qcom-qcm2290.cfg diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpm.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpm.cfg new file mode 100644 index 000000000..7fb102523 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpm.cfg @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: MIT + +CONFIG_RPMSG_QCOM_GLINK_RPM=y +CONFIG_REGULATOR_QCOM_SMD_RPM=y +CONFIG_QCOM_MPM=y +CONFIG_QCOM_SMD_RPM=y +CONFIG_QCOM_RPMPD=y +CONFIG_QCOM_CLK_SMD_RPM=y + +# legacy boards +CONFIG_RPMSG_QCOM_SMD=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpmh.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpmh.cfg new file mode 100644 index 000000000..d71778a47 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-rpmh.cfg @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: MIT + +CONFIG_QCOM_RPMH=y +CONFIG_QCOM_RPMHPD=y +CONFIG_QCOM_COMMAND_DB=y +CONFIG_RPMSG_QCOM_GLINK_SMEM=m +CONFIG_QCOM_AOSS_QMP=y +CONFIG_REGULATOR_QCOM_RPMH=y +CONFIG_QCOM_CLK_RPMH=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.cfg new file mode 100644 index 000000000..99be00413 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.cfg @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: MIT + +CONFIG_PINCTRL_SDM845=y +CONFIG_SDM_CAMCC_845=m +CONFIG_SDM_GCC_845=y +CONFIG_SDM_GPUCC_845=y +CONFIG_SDM_VIDEOCC_845=m +CONFIG_SDM_DISPCC_845=y +CONFIG_INTERCONNECT_QCOM_SDM845=y + +CONFIG_MFD_WCD934X=m +CONFIG_GPIO_WCD934X=m +CONFIG_SND_SOC_WCD934X=m +CONFIG_SND_SOC_SDM845=m diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.scc new file mode 100644 index 000000000..0446f2aab --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sdm845.scc @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT + +kconf hardware qcom-rpmh.cfg +kconf hardware qcom-sdm845.cfg diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.cfg new file mode 100644 index 000000000..d39d6a40b --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.cfg @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: MIT + +CONFIG_PINCTRL_SM6115=y +CONFIG_SM_DISPCC_6115=y +CONFIG_SM_GCC_6115=y +CONFIG_SM_GPUCC_6115=y + +CONFIG_PHY_QCOM_QUSB2=y + +CONFIG_QCOM_SPMI_TEMP_ALARM=y +CONFIG_QCOM_SPMI_ADC5=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.scc new file mode 100644 index 000000000..a7411aabf --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm6115.scc @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT + +kconf hardware qcom-rpm.cfg +kconf hardware qcom-sm6115.cfg diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.cfg new file mode 100644 index 000000000..69c251b80 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.cfg @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: MIT + +CONFIG_PINCTRL_SM8250=y +CONFIG_PINCTRL_SM8250_LPASS_LPI=m +CONFIG_SM_CAMCC_8250=m +CONFIG_SM_DISPCC_8250=y +CONFIG_SM_GCC_8250=y +CONFIG_SM_GPUCC_8250=y +CONFIG_SM_VIDEOCC_8250=m +CONFIG_CLK_GFM_LPASS_SM8250=m +CONFIG_INTERCONNECT_QCOM_SM8250=y + +CONFIG_SND_SOC_WCD938X=m +CONFIG_SND_SOC_WCD938X_SDW=m +CONFIG_SND_SOC_SM8250=m + +CONFIG_TYPEC_TCPM=y +CONFIG_TYPEC_QCOM_PMIC=y + +CONFIG_QCOM_IPCC=y + +CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=y + +CONFIG_QCOM_SPMI_TEMP_ALARM=y +CONFIG_QCOM_SPMI_ADC5=y diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.scc b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.scc new file mode 100644 index 000000000..cbd485dd3 --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom-sm8250.scc @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: MIT + +kconf hardware qcom-rpmh.cfg +kconf hardware qcom-sm8250.cfg diff --git a/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom.cfg b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom.cfg new file mode 100644 index 000000000..a7e0c2f2a --- /dev/null +++ b/recipes-kernel/linux/linux-yocto/bsp/qcom-armv8a/qcom.cfg @@ -0,0 +1,204 @@ +# SPDX-License-Identifier: MIT + +CONFIG_ARCH_QCOM=y +CONFIG_ARM_PSCI_CPUIDLE=y +CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y +CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y +CONFIG_ARM_QCOM_CPUFREQ_HW=y +CONFIG_CMA=y +CONFIG_DMA_CMA=y + +CONFIG_SCHED_MC=y + +CONFIG_QRTR=y +CONFIG_QRTR_SMD=y +CONFIG_QRTR_MHI=m + +CONFIG_BT=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_QCA=y + +CONFIG_COMMON_CLK_QCOM=y + +CONFIG_CRYPTO_DEV_QCE=m +CONFIG_CRYPTO_DEV_QCOM_RNG=y + +CONFIG_HWSPINLOCK=y +CONFIG_HWSPINLOCK_QCOM=y + +CONFIG_INTERCONNECT=y +CONFIG_INTERCONNECT_QCOM=y +CONFIG_INTERCONNECT_QCOM_OSM_L3=y + +CONFIG_MAILBOX=y +CONFIG_QCOM_APCS_IPC=y + +CONFIG_MHI_BUS=m + +CONFIG_NVMEM=y +CONFIG_NVMEM_QCOM_QFPROM=y + +CONFIG_ARM_SMMU=y +CONFIG_ARM_SMMU_QCOM=y + +CONFIG_PCIE_QCOM=y +CONFIG_PCIE_QCOM_EP=m + +CONFIG_PCI_ENDPOINT=y +CONFIG_PCI_ENDPOINT_CONFIGFS=y + +CONFIG_PINCTRL_MSM=y +CONFIG_PINCTRL_LPASS_LPI=m +CONFIG_PINCTRL_QCOM_SPMI_PMIC=y + +CONFIG_QCOM_Q6V5_ADSP=m +CONFIG_QCOM_Q6V5_MSS=m +CONFIG_QCOM_Q6V5_PAS=m +CONFIG_QCOM_SYSMON=m +CONFIG_QCOM_Q6V5_WCSS=m +CONFIG_QCOM_WCNSS_PIL=m + +CONFIG_REMOTEPROC=y + +CONFIG_QCOM_APR=m +CONFIG_QCOM_FASTRPC=m +CONFIG_QCOM_IPA=m +CONFIG_QCOM_SMEM=y +CONFIG_QCOM_ICC_BWMON=y + +CONFIG_SERIAL_DEV_BUS=y + +CONFIG_SOUND=m +CONFIG_SND=m +CONFIG_SND_SOC=m +CONFIG_SND_SOC_QCOM=m +CONFIG_SND_SOC_HDMI_CODEC=m +CONFIG_SOUNDWIRE=m +CONFIG_SOUNDWIRE_QCOM=m + +# CONFIG_MOUSE_PS2 is not set +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_INPUT_MISC=y +CONFIG_INPUT_PM8941_PWRKEY=y +CONFIG_SERIAL_MSM=y +CONFIG_SERIAL_MSM_CONSOLE=y + +CONFIG_QCOM_GENI_SE=y +CONFIG_SERIAL_QCOM_GENI=y +CONFIG_SERIAL_QCOM_GENI_CONSOLE=y +CONFIG_I2C_QCOM_GENI=y +CONFIG_I2C_QUP=y +CONFIG_SPI_QUP=y +CONFIG_SPI_QCOM_GENI=y + +CONFIG_SPMI=y +CONFIG_SPMI_MSM_PMIC_ARB=y +CONFIG_MFD_SPMI_PMIC=y + +CONFIG_POWER_RESET_MSM=y +CONFIG_POWER_RESET_QCOM_PON=y +CONFIG_REBOOT_MODE=y + +CONFIG_IIO=y +CONFIG_QCOM_SPMI_IADC=m + +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_PM_DEVFREQ=y +CONFIG_DEVFREQ_THERMAL=y +CONFIG_QCOM_TSENS=y +CONFIG_QCOM_SPMI_ADC_TM5=m + +CONFIG_WATCHDOG_CORE=y +CONFIG_QCOM_WDT=y + +CONFIG_SLIMBUS=m + +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_QCOM_SPMI=y +CONFIG_REGULATOR_QCOM_USB_VBUS=y + +CONFIG_DRM=y +CONFIG_DRM_MSM=y +CONFIG_DRM_MSM_MDP5=y +CONFIG_DRM_MSM_DPU=y +CONFIG_DRM_MSM_DP=y +CONFIG_DRM_MSM_DSI=y +CONFIG_DRM_MSM_DSI_28NM_PHY=y +CONFIG_DRM_MSM_DSI_20NM_PHY=y +CONFIG_DRM_MSM_DSI_28NM_8960_PHY=y +CONFIG_DRM_MSM_DSI_14NM_PHY=y +CONFIG_DRM_MSM_DSI_10NM_PHY=y +CONFIG_DRM_MSM_DSI_7NM_PHY=y +CONFIG_DRM_MSM_HDMI=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_DISPLAY_CONNECTOR=y + +CONFIG_BACKLIGHT_CLASS_DEVICE=y + +CONFIG_FB=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_LOGO=y + +CONFIG_SND_SOC_WSA881X=m +CONFIG_SND_SOC_WSA883X=m + +CONFIG_SND_SOC_LPASS_WSA_MACRO=m +CONFIG_SND_SOC_LPASS_VA_MACRO=m +CONFIG_SND_SOC_LPASS_RX_MACRO=m +CONFIG_SND_SOC_LPASS_TX_MACRO=m + +CONFIG_TYPEC=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_F_FS=y + +CONFIG_USB_XHCI_HCD=y + +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_MSM=y + +CONFIG_SCSI_UFSHCD=y +CONFIG_SCSI_UFS_BSG=y +CONFIG_SCSI_UFS_HWMON=y +CONFIG_SCSI_UFSHCD_PLATFORM=y +CONFIG_SCSI_UFS_QCOM=y + +CONFIG_LEDS_CLASS_MULTICOLOR=y +CONFIG_LEDS_QCOM_LPG=y + +CONFIG_USB_DWC3=y + +CONFIG_RAS=y +CONFIG_EDAC=y +CONFIG_EDAC_QCOM=y + +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_DRV_PM8XXX=y + +CONFIG_QCOM_BAM_DMA=y +CONFIG_QCOM_GPI_DMA=y +CONFIG_QCOM_LLCC=y +CONFIG_QCOM_OCMEM=y +CONFIG_QCOM_RMTFS_MEM=y +CONFIG_QCOM_SOCINFO=y +CONFIG_QCOM_STATS=y +CONFIG_QCOM_WCNSS_CTRL=m +CONFIG_QCOM_SMP2P=y + +CONFIG_RESET_QCOM_AOSS=y +CONFIG_RESET_QCOM_PDC=y +CONFIG_QCOM_PDC=y + +CONFIG_GENERIC_PHY=y +CONFIG_PHY_QCOM_QMP=y +CONFIG_PHY_QCOM_QMP_PCIE=y +CONFIG_PHY_QCOM_QMP_UFS=y +CONFIG_PHY_QCOM_QMP_USB=y + +CONFIG_SLIM_QCOM_CTRL=m +CONFIG_SLIM_QCOM_NGD_CTRL=m diff --git a/recipes-kernel/linux/linux-yocto/qcom.scc b/recipes-kernel/linux/linux-yocto/qcom.scc new file mode 100644 index 000000000..e69de29bb diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 000000000..54dcd48db --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_%.bbappend @@ -0,0 +1,13 @@ +# do not override KBRANCH and SRCREV_machine, use default ones. +COMPATIBLE_MACHINE:qcom = "qcom-armv8a" + +FILESEXTRAPATHS:prepend:qcom := "${THISDIR}/${PN}:" + +# include all Qualcomm-specific files +SRC_URI:append:qcom = " \ + file://qcom.scc \ +" + +QCOM_BOOTIMG = "" +QCOM_BOOTIMG:qcom = "linux-qcom-bootimg" +inherit ${QCOM_BOOTIMG} diff --git a/recipes-kernel/linux/linux-yocto_6.5.bbappend b/recipes-kernel/linux/linux-yocto_6.5.bbappend new file mode 100644 index 000000000..96cce089d --- /dev/null +++ b/recipes-kernel/linux/linux-yocto_6.5.bbappend @@ -0,0 +1,4 @@ +SRC_URI:append:qcom = " \ + file://0001-arm64-dts-qcom-qrb2210-rb1-Swap-UART-index.patch \ + file://0001-arm64-dts-qcom-qcm2290-temporarily-disable-cluster-i.patch \ +" From 7c3d159e562db5689e0a61d5debdbe2a7e5cc8ca Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 3 Nov 2023 23:51:34 +0300 Subject: [PATCH 5/6] CI: fix indentation for the jobs array. Signed-off-by: Dmitry Baryshkov --- .github/workflows/build-template.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index b31ccb0a9..cb635e4f2 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -83,12 +83,12 @@ jobs: for tclibc in ${TCLIBC}; do cat << EOF >> plan.yaml - - name: ${tclibc} - bakes: + - name: ${tclibc} + bakes: EOF for machine in ${{inputs.machines}}; do cat << EOF >> plan.yaml - - { <<: [*commondata, *${tclibc}], machine: ${machine}, name: ${machine}-${tclibc} } + - { <<: [*commondata, *${tclibc}], machine: ${machine}, name: ${machine}-${tclibc} } EOF done done From 28d9eef6380a3f858375cf93e573c293dd7dea13 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Fri, 3 Nov 2023 23:33:31 +0300 Subject: [PATCH 6/6] CI: also test the linux-yocto kernel Add linux-yocto kernel into the CI loop. Signed-off-by: Dmitry Baryshkov --- .github/workflows/build-template.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-template.yml b/.github/workflows/build-template.yml index cb635e4f2..e4baab110 100644 --- a/.github/workflows/build-template.yml +++ b/.github/workflows/build-template.yml @@ -30,6 +30,7 @@ env: POKY_URL: https://git.yoctoproject.org/poky DISTRO: poky TCLIBC: glibc musl + KERNELS: linaro-qcomlt yocto jobs: build: @@ -67,20 +68,24 @@ jobs: EOF for tclibc in ${TCLIBC}; do + for kernel in ${KERNELS}; do cat << EOF >> plan.yaml - ${tclibc}: &${tclibc} + ${tclibc}-${kernel}: &${tclibc}-${kernel} local_conf: - INHERIT += 'buildstats buildstats-summary' - INHERIT:remove = 'rm_work' - TCLIBC := '${tclibc}' + - PREFERRED_PROVIDER_virtual/kernel := 'linux-${kernel}' EOF done + done cat << EOF >> plan.yaml jobs: EOF + # FIXME: loop over kernels instead of hardcoding them, need to support armv7a and modem first for tclibc in ${TCLIBC}; do cat << EOF >> plan.yaml - name: ${tclibc} @@ -88,10 +93,16 @@ jobs: EOF for machine in ${{inputs.machines}}; do cat << EOF >> plan.yaml - - { <<: [*commondata, *${tclibc}], machine: ${machine}, name: ${machine}-${tclibc} } + - { <<: [*commondata, *${tclibc}-linaro-qcomlt], machine: ${machine}, name: ${machine}-${tclibc} } + EOF + if [ "${machine}" = "qcom-armv8a" -a "${{inputs.branch}}" = "master" ] ; then + cat << EOF >> plan.yaml + - { <<: [*commondata, *${tclibc}-yocto], machine: qcom-armv8a, name: qcom-armv8a-${tclibc}-yocto } EOF + fi done done + echo "Ready to submit this Tux Plan:" cat plan.yaml - name: Run build