diff options
Diffstat (limited to 'bsp/meta-qcom')
66 files changed, 3702 insertions, 400 deletions
diff --git a/bsp/meta-qcom/conf/layer.conf b/bsp/meta-qcom/conf/layer.conf index 57ddb93a..5f3db02c 100644 --- a/bsp/meta-qcom/conf/layer.conf +++ b/bsp/meta-qcom/conf/layer.conf @@ -8,9 +8,11 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "qcom" BBFILE_PATTERN_qcom := "^${LAYERDIR}/" BBFILE_PRIORITY_qcom = "5" -LAYERSERIES_COMPAT_qcom = "sumo thud" +LAYERSERIES_COMPAT_qcom = "dunfell" BBFILES_DYNAMIC += " \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \ openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \ + networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \ " diff --git a/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf b/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf index 859bbfd7..8d732ed3 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-410c-32.conf @@ -15,7 +15,6 @@ RDEPENDS_kernel-base = "" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wcnss-config wcnss-start', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5-noinst-tools', '', d)} \ firmware-qcom-dragonboard410c \ " diff --git a/bsp/meta-qcom/conf/machine/dragonboard-410c.conf b/bsp/meta-qcom/conf/machine/dragonboard-410c.conf index c8e7fc5d..6ecfc60e 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-410c.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-410c.conf @@ -3,7 +3,7 @@ #@DESCRIPTION: Machine configuration for the DragonBoard 410c (96boards), with Qualcomm Snapdragon 410 APQ8016. require conf/machine/include/qcom-apq8016.inc -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/tune-cortexa53.inc MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" @@ -14,13 +14,13 @@ SERIAL_CONSOLE ?= "115200 ttyMSM0" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ kernel-modules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wcnss-config wcnss-start', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a3xx mesa-driver-msm', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5-noinst-tools', '', d)} \ firmware-qcom-dragonboard410c \ + linux-firmware-qcom-venus-1.8 \ " -QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p10" +QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p14" # Define rootfs partiton (kernel argument) SD_QCOM_BOOTIMG_ROOTFS ?= "mmcblk1p7" diff --git a/bsp/meta-qcom/conf/machine/dragonboard-820c.conf b/bsp/meta-qcom/conf/machine/dragonboard-820c.conf index 8e3670e8..347d2e10 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-820c.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-820c.conf @@ -14,8 +14,9 @@ SERIAL_CONSOLE ?= "115200 ttyMSM0" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ firmware-qcom-dragonboard820c \ kernel-modules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a530 mesa-driver-msm', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath10k', '', d)} \ + linux-firmware-qcom-venus-4.2 \ " QCOM_BOOTIMG_ROOTFS ?= "sda1" diff --git a/bsp/meta-qcom/conf/machine/dragonboard-845c.conf b/bsp/meta-qcom/conf/machine/dragonboard-845c.conf index 8cd10d41..b9dde332 100644 --- a/bsp/meta-qcom/conf/machine/dragonboard-845c.conf +++ b/bsp/meta-qcom/conf/machine/dragonboard-845c.conf @@ -12,13 +12,17 @@ KERNEL_DEVICETREE ?= "qcom/sdm845-db845c.dtb" SERIAL_CONSOLE ?= "115200 ttyMSM0" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + firmware-qcom-dragonboard845c \ kernel-modules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'linux-firmware-ath10k linux-firmware-qcom-sdm845-modem', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca linux-firmware-qcom-sdm845-modem', '', d)} \ + linux-firmware-qcom-sdm845-audio \ + linux-firmware-qcom-sdm845-compute \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'linux-firmware-qcom-adreno-a630 mesa-driver-msm', '', d)} \ " -# XXX: The sda10 is userdata we need to create an Linux gpt to have more space -# and use rootfs -QCOM_BOOTIMG_ROOTFS ?= "sda10" +# /dev/sda1 is 'rootfs' partition after installing the latest bootloader package from linaro +QCOM_BOOTIMG_ROOTFS ?= "sda1" # UFS partitions setup with 4096 logical sector size EXTRA_IMAGECMD_ext4 += " -b 4096 " diff --git a/bsp/meta-qcom/conf/machine/evb4k-qcs404.conf b/bsp/meta-qcom/conf/machine/evb4k-qcs404.conf new file mode 100644 index 00000000..9664bed8 --- /dev/null +++ b/bsp/meta-qcom/conf/machine/evb4k-qcs404.conf @@ -0,0 +1,19 @@ +#@TYPE: Machine +#@NAME: evb4k-qcs404 +#@DESCRIPTION: Machine configuration for the EVB-4K QCS404 with Qualcomm QCS404. + +require conf/machine/include/qcom-qcs404.inc +require conf/machine/include/tune-cortexa53.inc + +MACHINE_FEATURES = "usbhost usbgadget ext2" + +KERNEL_IMAGETYPE ?= "Image.gz" +KERNEL_DEVICETREE ?= "qcom/qcs404-evb-4000.dtb" + +SERIAL_CONSOLE ?= "115200 ttyMSM0" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + kernel-modules \ +" + +QCOM_BOOTIMG_ROOTFS ?= "mmcblk0p27" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc b/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc index bd861ae3..2688b203 100644 --- a/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc +++ b/bsp/meta-qcom/conf/machine/include/qcom-apq8016.inc @@ -23,16 +23,17 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ - qrtr-apps \ + qrtr \ rmtfs \ " +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ +" + # Fastboot expects an ext4 image, which needs to be 4096 aligned IMAGE_FSTYPES ?= "ext4.gz" IMAGE_ROOTFS_ALIGNMENT = "4096" QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000" QCOM_BOOTIMG_PAGE_SIZE ?= "2048" - -KERNEL_MODULE_PROBECONF += "qcom_q6v5_pil" -module_conf_qcom_q6v5_pil = "blacklist qcom_q6v5_pil" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc b/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc index b50cf8d8..3a6a08b9 100644 --- a/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc +++ b/bsp/meta-qcom/conf/machine/include/qcom-apq8096.inc @@ -1,6 +1,6 @@ SOC_FAMILY = "apq8096" require conf/machine/include/soc-family.inc -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/arm/arch-armv8a.inc XSERVER_OPENGL ?= " \ xf86-video-modesetting \ @@ -24,10 +24,14 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ - qrtr-apps \ + qrtr \ rmtfs \ " +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ +" + # Fastboot expects an ext4 image, which needs to be 4096 aligned IMAGE_FSTYPES ?= "ext4.gz" IMAGE_ROOTFS_ALIGNMENT = "4096" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc b/bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc new file mode 100644 index 00000000..9c556d37 --- /dev/null +++ b/bsp/meta-qcom/conf/machine/include/qcom-qcs404.inc @@ -0,0 +1,16 @@ +SOC_FAMILY = "qcs404" +require conf/machine/include/soc-family.inc +require conf/machine/include/arm/arch-armv8a.inc + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + qrtr \ +" + +# Fastboot expects an ext4 image, which needs to be 4096 aligned +IMAGE_FSTYPES ?= "ext4.gz" +IMAGE_ROOTFS_ALIGNMENT = "4096" + +QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000" +QCOM_BOOTIMG_PAGE_SIZE ?= "4096" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc b/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc index 4e2ab05b..e3839b13 100644 --- a/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc +++ b/bsp/meta-qcom/conf/machine/include/qcom-sdm845.inc @@ -1,6 +1,6 @@ SOC_FAMILY = "sdm845" require conf/machine/include/soc-family.inc -require conf/machine/include/arm/arch-armv8.inc +require conf/machine/include/arm/arch-armv8a.inc XSERVER_OPENGL ?= " \ xf86-video-modesetting \ @@ -24,6 +24,14 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + pd-mapper \ + qrtr \ + rmtfs \ + tqftpserv \ +" + +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ " IMAGE_FSTYPES ?= "ext4.gz" diff --git a/bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc b/bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc new file mode 100644 index 00000000..5039ba0d --- /dev/null +++ b/bsp/meta-qcom/conf/machine/include/qcom-sm8250.inc @@ -0,0 +1,41 @@ +SOC_FAMILY = "sm8250" +require conf/machine/include/soc-family.inc +require conf/machine/include/arm/arch-armv8a.inc + +XSERVER_OPENGL ?= " \ + xf86-video-modesetting \ + xserver-xorg-extension-glx \ +" + +XSERVER ?= " \ + xserver-xorg \ + xserver-xorg-module-libint10 \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${XSERVER_OPENGL}', 'xf86-video-fbdev', d)} \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-input-keyboard \ +" + +PREFERRED_PROVIDER_virtual/egl ?= "mesa" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" +PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-qcomlt" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + pd-mapper \ + qrtr \ + rmtfs \ + tqftpserv \ +" + +MACHINE_EXTRA_RRECOMMENDS += " \ + fastrpc \ +" + +IMAGE_FSTYPES ?= "ext4.gz" +IMAGE_ROOTFS_ALIGNMENT = "4096" + +QCOM_BOOTIMG_KERNEL_BASE ?= "0x80000000" +QCOM_BOOTIMG_PAGE_SIZE ?= "4096" diff --git a/bsp/meta-qcom/conf/machine/qrb5165-rb5.conf b/bsp/meta-qcom/conf/machine/qrb5165-rb5.conf new file mode 100644 index 00000000..447c8897 --- /dev/null +++ b/bsp/meta-qcom/conf/machine/qrb5165-rb5.conf @@ -0,0 +1,25 @@ +#@TYPE: Machine +#@NAME: RB5 Robotics platform +#@DESCRIPTION: Machine configuration for the RB5 development board, with Qualcomm Snapdragon 865 QRB5165. + +require conf/machine/include/qcom-sm8250.inc + +MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" + +KERNEL_IMAGETYPE ?= "Image.gz" +KERNEL_DEVICETREE ?= "qcom/qrb5165-rb5.dtb" + +SERIAL_CONSOLE ?= "115200 ttyMSM0" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + kernel-modules \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ +" +# linux-firmware-qcom-adreno-a650 + +# /dev/sda15 is 'userdata' partition, so wipe it and use for our build +QCOM_BOOTIMG_ROOTFS ?= "sda15" + +# UFS partitions setup with 4096 logical sector size +EXTRA_IMAGECMD_ext4 += " -b 4096 " diff --git a/bsp/meta-qcom/conf/machine/sd-600eval.conf b/bsp/meta-qcom/conf/machine/sd-600eval.conf index f7da0720..f4ed1cb2 100644 --- a/bsp/meta-qcom/conf/machine/sd-600eval.conf +++ b/bsp/meta-qcom/conf/machine/sd-600eval.conf @@ -9,7 +9,6 @@ MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" MACHINE_EXTRA_RRECOMMENDS = " \ kernel-modules \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wcnss-config wcnss-start', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5-noinst-tools', '', d)} \ firmware-qcom-sd-600eval \ " diff --git a/bsp/meta-qcom/conf/machine/sm8250-mtp.conf b/bsp/meta-qcom/conf/machine/sm8250-mtp.conf new file mode 100644 index 00000000..d5f7eeee --- /dev/null +++ b/bsp/meta-qcom/conf/machine/sm8250-mtp.conf @@ -0,0 +1,25 @@ +#@TYPE: Machine +#@NAME: SM8250-MTP +#@DESCRIPTION: Machine configuration for the SM8250-MTP development board, with Qualcomm Snapdragon 865 SM8250. + +require conf/machine/include/qcom-sm8250.inc + +MACHINE_FEATURES = "usbhost usbgadget alsa screen wifi bluetooth ext2" + +KERNEL_IMAGETYPE ?= "Image.gz" +KERNEL_DEVICETREE ?= "qcom/sm8250-mtp.dtb" + +SERIAL_CONSOLE ?= "115200 ttyMSM0" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " \ + kernel-modules \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'linux-firmware-qca', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-msm', '', d)} \ +" +# linux-firmware-qcom-adreno-a650 + +# /dev/sda15 is 'userdata' partition, so wipe it and use for our build +QCOM_BOOTIMG_ROOTFS ?= "sda15" + +# UFS partitions setup with 4096 logical sector size +EXTRA_IMAGECMD_ext4 += " -b 4096 " diff --git a/bsp/meta-qcom/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend b/bsp/meta-qcom/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend new file mode 100644 index 00000000..bd946f87 --- /dev/null +++ b/bsp/meta-qcom/dynamic-layers/networking-layer/recipes-test/images/initramfs-test-image.bbappend @@ -0,0 +1,5 @@ +PACKAGE_INSTALL += " \ + iperf2 \ + iperf3 \ + tcpdump \ +" diff --git a/bsp/meta-qcom/recipes-graphics/images/qcom-x11-image.bb b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-graphics/images/qcom-x11-image.bb index 48eed256..9376de1a 100644 --- a/bsp/meta-qcom/recipes-graphics/images/qcom-x11-image.bb +++ b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-graphics/images/qcom-x11-image.bb @@ -4,7 +4,7 @@ IMAGE_FEATURES += "splash package-management debug-tweaks ssh-server-openssh hwc LICENSE = "MIT" -inherit core-image distro_features_check extrausers +inherit core-image features_check extrausers # let's make sure we have a good image.. REQUIRED_DISTRO_FEATURES = "x11" diff --git a/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch index aae427e5..15c5c469 100644 --- a/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch +++ b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-navigation/gpsd/gpsd/0001-Introduce-Qualcomm-PDS-service-support.patch @@ -1,7 +1,10 @@ -From 4854806fdbd53b4b25d18f966f273c8f32d57c35 Mon Sep 17 00:00:00 2001 +From fd6199f456c7c5dcb4cb782e4af63111d22079bf Mon Sep 17 00:00:00 2001 From: Bjorn Andersson <bjorn.andersson@linaro.org> Date: Wed, 4 Apr 2018 04:29:09 +0000 Subject: [PATCH] Introduce Qualcomm PDS service support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit The Qualcomm PDS service provides location data on a wide range of Qualcomm platforms. It used QMI encoded messages sent over a shared @@ -28,32 +31,33 @@ a numerical identifier of the node in the AF_QIPCRTR network or the string "any". Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> +Signed-off-by: AnÃbal Limón <anibal.limon@linaro.org> --- SConstruct | 10 ++ - driver_pds.c | 361 +++++++++++++++++++++++++++++++++++++++++++++++++ + driver_pds.c | 325 +++++++++++++++++++++++++++++++++++++++++++++++++ driver_pds.h | 20 +++ drivers.c | 5 + - gpsd.h | 20 ++- - libgpsd_core.c | 15 +- - 6 files changed, 424 insertions(+), 7 deletions(-) + gpsd.h | 2 + + libgpsd_core.c | 15 ++- + 6 files changed, 376 insertions(+), 1 deletion(-) create mode 100644 driver_pds.c create mode 100644 driver_pds.h diff --git a/SConstruct b/SConstruct -index d9d75653..6f53fef3 100644 +index 5160481a7..31545b07f 100644 --- a/SConstruct +++ b/SConstruct -@@ -155,6 +155,7 @@ boolopts = ( +@@ -191,6 +191,7 @@ boolopts = ( + ("tripmate", True, "DeLorme TripMate support"), + ("tsip", True, "Trimble TSIP support"), ("ublox", True, "u-blox Protocol support"), - ("fury", True, "Jackson Labs Fury and Firefly support"), - ("nmea2000", True, "NMEA2000/CAN support"), + ("pds", True, "Qualcomm PDS support"), # Non-GPS protocols ("aivdm", True, "AIVDM support"), ("gpsclock", True, "GPSClock support"), -@@ -778,6 +779,14 @@ else: +@@ -923,6 +924,14 @@ else: announce("You do not have kernel CANbus available.") - env["nmea2000"] = False + config.env["nmea2000"] = False + if config.CheckHeader(["bits/sockaddr.h", "linux/qrtr.h"]): + confdefs.append("#define HAVE_LINUX_QRTR_H 1\n") @@ -65,21 +69,21 @@ index d9d75653..6f53fef3 100644 + # check for C11 or better, and __STDC__NO_ATOMICS__ is not defined # before looking for stdatomic.h - if ((config.CheckC11() -@@ -1121,6 +1130,7 @@ libgpsd_sources = [ + if ((config.CheckC11() and +@@ -1295,6 +1304,7 @@ libgpsd_sources = [ "driver_nmea0183.c", "driver_nmea2000.c", "driver_oncore.c", + "driver_pds.c", "driver_rtcm2.c", "driver_rtcm3.c", - "driver_sirf.c", + "drivers.c", diff --git a/driver_pds.c b/driver_pds.c new file mode 100644 -index 00000000..62464323 +index 000000000..7fe9e5339 --- /dev/null +++ b/driver_pds.c -@@ -0,0 +1,361 @@ +@@ -0,0 +1,325 @@ +#include <sys/socket.h> +#include <errno.h> +#include <fcntl.h> @@ -94,43 +98,7 @@ index 00000000..62464323 +#include <linux/qrtr.h> + +#define QMI_PDS_SERVICE_ID 0x10 -+#define QMI_PDS_INSTANCE_ID 0x2 -+ -+#ifndef QRTR_PORT_CTRL -+#define QRTR_PORT_CTRL 0xfffffffeu -+ -+enum qrtr_pkt_type { -+ QRTR_TYPE_DATA = 1, -+ QRTR_TYPE_HELLO = 2, -+ QRTR_TYPE_BYE = 3, -+ QRTR_TYPE_NEW_SERVER = 4, -+ QRTR_TYPE_DEL_SERVER = 5, -+ QRTR_TYPE_DEL_CLIENT = 6, -+ QRTR_TYPE_RESUME_TX = 7, -+ QRTR_TYPE_EXIT = 8, -+ QRTR_TYPE_PING = 9, -+ QRTR_TYPE_NEW_LOOKUP = 10, -+ QRTR_TYPE_DEL_LOOKUP = 11, -+}; -+ -+struct qrtr_ctrl_pkt { -+ __le32 cmd; -+ -+ union { -+ struct { -+ __le32 service; -+ __le32 instance; -+ __le32 node; -+ __le32 port; -+ } server; -+ -+ struct { -+ __le32 node; -+ __le32 port; -+ } client; -+ }; -+} __packed; -+#endif /* of ifndef QRTR_PORT_CTRL */ ++#define QMI_PDS_VERSION 0x2 + +struct qmi_header { + uint8_t type; @@ -181,13 +149,9 @@ index 00000000..62464323 + return -1; + } + -+ session->lexer.type = QMI_PDS_PACKET; ++ /* TODO: Validate sq to be our peer */ + -+ if (sq.sq_node != session->driver.pds.node || -+ sq.sq_port != session->driver.pds.port) { -+ session->lexer.outbuflen = 0; -+ return ret; -+ } ++ session->lexer.type = QMI_PDS_PACKET; + + hdr = buf; + if (hdr->type != QMI_INDICATION || @@ -223,36 +187,31 @@ index 00000000..62464323 + +static void qmi_pds_event_hook(struct gps_device_t *session, event_t event) +{ -+ struct sockaddr_qrtr sq; + struct qmi_header *hdr; + struct qmi_tlv *tlv; + static int txn_id; + char buf[128]; ++ char *ptr; + int sock = session->gpsdata.gps_fd; + int ret; + -+ session->driver.pds.node = 0; -+ session->driver.pds.port = 14; -+ -+ sq.sq_family = AF_QIPCRTR; -+ sq.sq_node = session->driver.pds.node; -+ sq.sq_port = session->driver.pds.port; -+ + switch (event) { + case event_deactivate: -+ hdr = (struct qmi_header *)buf; ++ ptr = buf; ++ hdr = (struct qmi_header *)ptr; + hdr->type = QMI_REQUEST; + hdr->txn = txn_id++; + hdr->msg = QMI_LOC_STOP; + hdr->len = sizeof(*tlv) + sizeof(uint8_t); ++ ptr += sizeof(*hdr); + -+ tlv = (struct qmi_tlv *)(buf + sizeof(*hdr)); ++ tlv = (struct qmi_tlv *)ptr; + tlv->key = QMI_TLV_SESSION_ID; + tlv->len = sizeof(uint8_t); + *(uint8_t*)tlv->value = 1; ++ ptr += sizeof(*tlv) + sizeof(uint8_t); + -+ ret = sendto(sock, buf, sizeof(*hdr) + hdr->len, 0, -+ (struct sockaddr *)&sq, sizeof(sq)); ++ ret = send(sock, buf, ptr - buf, 0); + if (ret < 0) { + gpsd_log(&session->context->errout, LOG_ERROR, + "QRTR event_hook: failed to send STOP request.\n"); @@ -260,38 +219,42 @@ index 00000000..62464323 + } + break; + case event_reactivate: -+ hdr = (struct qmi_header *)buf; ++ ptr = buf; ++ hdr = (struct qmi_header *)ptr; + hdr->type = QMI_REQUEST; + hdr->txn = txn_id++; + hdr->msg = QMI_LOC_REG_EVENTS; + hdr->len = sizeof(*tlv) + sizeof(uint64_t); ++ ptr += sizeof(*hdr); + -+ tlv = (struct qmi_tlv *)(buf + sizeof(*hdr)); ++ tlv = (struct qmi_tlv *)ptr; + tlv->key = QMI_TLV_EVENT_MASK; + tlv->len = sizeof(uint64_t); + *(uint64_t*)tlv->value = QMI_EVENT_MASK_NMEA; ++ ptr += sizeof(*tlv) + sizeof(uint64_t); + -+ ret = sendto(sock, buf, sizeof(*hdr) + hdr->len, 0, -+ (struct sockaddr *)&sq, sizeof(sq)); ++ ret = send(sock, buf, ptr - buf, 0); + if (ret < 0) { + gpsd_log(&session->context->errout, LOG_ERROR, + "QRTR event_hook: failed to send REG_EVENTS request.\n"); + return; + } + -+ hdr = (struct qmi_header *)buf; ++ ptr = buf; ++ hdr = (struct qmi_header *)ptr; + hdr->type = QMI_REQUEST; + hdr->txn = txn_id++; + hdr->msg = QMI_LOC_START; + hdr->len = sizeof(*tlv) + sizeof(uint8_t); ++ ptr += sizeof(*hdr); + + tlv = (struct qmi_tlv *)(buf + sizeof(*hdr)); + tlv->key = QMI_TLV_SESSION_ID; + tlv->len = sizeof(uint8_t); + *(uint8_t*)tlv->value = 1; ++ ptr += sizeof(*tlv) + sizeof(uint8_t); + -+ ret = sendto(sock, buf, sizeof(*hdr) + hdr->len, 0, -+ (struct sockaddr *)&sq, sizeof(sq)); ++ ret = send(sock, buf, ptr - buf, 0); + if (ret < 0) { + gpsd_log(&session->context->errout, LOG_ERROR, + "QRTR event_hook: failed to send START request.\n"); @@ -349,7 +312,7 @@ index 00000000..62464323 + memset(&pkt, 0, sizeof(pkt)); + pkt.cmd = QRTR_TYPE_NEW_LOOKUP; + pkt.server.service = QMI_PDS_SERVICE_ID; -+ pkt.server.instance = QMI_PDS_INSTANCE_ID; ++ pkt.server.instance = QMI_PDS_VERSION; + + sq_ctrl.sq_port = QRTR_PORT_CTRL; + ret = sendto(sock, &pkt, sizeof(pkt), 0, (struct sockaddr *)&sq_ctrl, sizeof(sq_ctrl)); @@ -387,7 +350,7 @@ index 00000000..62464323 + break; + + /* Filter results based on specified node */ -+ if (hostid != -1 && hostid != pkt.server.node) ++ if (hostid != -1 && hostid != (int)pkt.server.node) + continue; + + pds_node = pkt.server.node; @@ -408,14 +371,22 @@ index 00000000..62464323 + gpsd_log(&session->context->errout, LOG_INF, + "QRTR open: Found PDS at %d %d.\n", pds_node, pds_port); + ++ sq.sq_family = AF_QIPCRTR; ++ sq.sq_node = pds_node; ++ sq.sq_port = pds_port; ++ ret = connect(sock, (struct sockaddr *)&sq, sizeof(sq)); ++ if (ret < 0) { ++ gpsd_log(&session->context->errout, LOG_ERROR, ++ "QRTR open: Failed to connect socket.\n"); ++ close(sock); ++ return -1; ++ } ++ + gpsd_switch_driver(session, "Qualcomm PDS"); + session->gpsdata.gps_fd = sock; + session->sourcetype = source_qrtr; + session->servicetype = service_sensor; + -+ session->driver.pds.node = pds_node; -+ session->driver.pds.port = pds_port; -+ + return session->gpsdata.gps_fd; +} + @@ -425,9 +396,6 @@ index 00000000..62464323 + close(session->gpsdata.gps_fd); + INVALIDATE_SOCKET(session->gpsdata.gps_fd); + } -+ -+ session->driver.pds.node = 0; -+ session->driver.pds.port = 0; +} + +const struct gps_type_t driver_pds = { @@ -443,7 +411,7 @@ index 00000000..62464323 +#endif /* of defined(PDS_ENABLE) */ diff --git a/driver_pds.h b/driver_pds.h new file mode 100644 -index 00000000..3b373743 +index 000000000..3b373743d --- /dev/null +++ b/driver_pds.h @@ -0,0 +1,20 @@ @@ -468,10 +436,10 @@ index 00000000..3b373743 +#endif /* of defined(PDS_ENABLE) */ +#endif /* of ifndef _DRIVER_PDS_H_ */ diff --git a/drivers.c b/drivers.c -index eda1fd61..92d7eba8 100644 +index f49ba0a93..a2be4d9ad 100644 --- a/drivers.c +++ b/drivers.c -@@ -1744,6 +1744,7 @@ extern const struct gps_type_t driver_geostar; +@@ -1766,6 +1766,7 @@ extern const struct gps_type_t driver_greis; extern const struct gps_type_t driver_italk; extern const struct gps_type_t driver_navcom; extern const struct gps_type_t driver_nmea2000; @@ -479,7 +447,7 @@ index eda1fd61..92d7eba8 100644 extern const struct gps_type_t driver_oncore; extern const struct gps_type_t driver_sirf; extern const struct gps_type_t driver_skytraq; -@@ -1838,6 +1839,10 @@ static const struct gps_type_t *gpsd_driver_array[] = { +@@ -1863,6 +1864,10 @@ static const struct gps_type_t *gpsd_driver_array[] = { &driver_nmea2000, #endif /* NMEA2000_ENABLE */ @@ -491,30 +459,18 @@ index eda1fd61..92d7eba8 100644 &driver_rtcm104v2, #endif /* RTCM104V2_ENABLE */ diff --git a/gpsd.h b/gpsd.h -index 2bd5f4c0..b24c6e65 100644 +index e78afd4c3..fdbbd8f4c 100644 --- a/gpsd.h +++ b/gpsd.h -@@ -163,12 +163,13 @@ struct gps_lexer_t { - #define ONCORE_PACKET 13 +@@ -191,6 +191,7 @@ struct gps_lexer_t { #define GEOSTAR_PACKET 14 #define NMEA2000_PACKET 15 --#define MAX_GPSPACKET_TYPE 15 /* increment this as necessary */ --#define RTCM2_PACKET 16 --#define RTCM3_PACKET 17 --#define JSON_PACKET 18 --#define PACKET_TYPES 19 /* increment this as necessary */ --#define SKY_PACKET 20 + #define GREIS_PACKET 16 +#define QMI_PDS_PACKET 16 -+#define MAX_GPSPACKET_TYPE 16 /* increment this as necessary */ -+#define RTCM2_PACKET 17 -+#define RTCM3_PACKET 18 -+#define JSON_PACKET 19 -+#define PACKET_TYPES 20 /* increment this as necessary */ -+#define SKY_PACKET 21 - #define TEXTUAL_PACKET_TYPE(n) ((((n)>=NMEA_PACKET) && ((n)<=MAX_TEXTUAL_TYPE)) || (n)==JSON_PACKET) - #define GPS_PACKET_TYPE(n) (((n)>=NMEA_PACKET) && ((n)<=MAX_GPSPACKET_TYPE)) - #define LOSSLESS_PACKET_TYPE(n) (((n)>=RTCM2_PACKET) && ((n)<=RTCM3_PACKET)) -@@ -411,6 +412,7 @@ typedef enum {source_unknown, + #define MAX_GPSPACKET_TYPE 16 /* increment this as necessary */ + #define RTCM2_PACKET 17 + #define RTCM3_PACKET 18 +@@ -439,6 +440,7 @@ typedef enum {source_unknown, source_usb, /* potential GPS source, discoverable */ source_bluetooth, /* potential GPS source, discoverable */ source_can, /* potential GPS source, fixed CAN format */ @@ -522,24 +478,11 @@ index 2bd5f4c0..b24c6e65 100644 source_pty, /* PTY: we don't require exclusive access */ source_tcp, /* TCP/IP stream: case detected but not used */ source_udp, /* UDP stream: case detected but not used */ -@@ -699,6 +701,12 @@ struct gps_device_t { - unsigned char sid[8]; - } nmea2000; - #endif /* NMEA2000_ENABLE */ -+#ifdef PDS_ENABLE -+ struct { -+ unsigned int node; -+ unsigned int port; -+ } pds; -+#endif /* PDS_ENABLE */ - /* - * This is not conditionalized on RTCM104_ENABLE because we need to - * be able to build gpsdecode even when RTCM support is not diff --git a/libgpsd_core.c b/libgpsd_core.c -index 85b8d86a..4f6a11ed 100644 +index 3bf420c3e..848da6aeb 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c -@@ -48,6 +48,9 @@ +@@ -39,6 +39,9 @@ #if defined(NMEA2000_ENABLE) #include "driver_nmea2000.h" #endif /* defined(NMEA2000_ENABLE) */ @@ -561,7 +504,7 @@ index 85b8d86a..4f6a11ed 100644 (void)gpsd_close(session); if (session->mode == O_OPTIMIZE) gpsd_run_device_hook(&session->context->errout, -@@ -547,6 +555,11 @@ int gpsd_open(struct gps_device_t *session) +@@ -549,6 +557,11 @@ int gpsd_open(struct gps_device_t *session) return nmea2000_open(session); } #endif /* defined(NMEA2000_ENABLE) */ @@ -573,7 +516,7 @@ index 85b8d86a..4f6a11ed 100644 /* fall through to plain serial open */ /* could be a naked /dev/ppsX */ return gpsd_serial_open(session); -@@ -575,7 +588,7 @@ int gpsd_activate(struct gps_device_t *session, const int mode) +@@ -577,7 +590,7 @@ int gpsd_activate(struct gps_device_t *session, const int mode) #ifdef NON_NMEA0183_ENABLE /* if it's a sensor, it must be probed */ if ((session->servicetype == service_sensor) && @@ -583,5 +526,5 @@ index 85b8d86a..4f6a11ed 100644 for (dp = gpsd_drivers; *dp; dp++) { -- -2.17.0 +2.23.0 diff --git a/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend new file mode 100644 index 00000000..16f4e3c9 --- /dev/null +++ b/bsp/meta-qcom/dynamic-layers/openembedded-layer/recipes-test/images/initramfs-test-image.bbappend @@ -0,0 +1,3 @@ +PACKAGE_INSTALL += " \ + devmem2 \ +" diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb index b65ac463..ecdbed94 100644 --- a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard410c_1034.2.1.bb @@ -20,36 +20,25 @@ do_compile() { do_install() { install -d ${D}${nonarch_base_libdir}/firmware/ + install -d ${D}/boot - cp -r ./proprietary-linux/* ${D}${nonarch_base_libdir}/firmware/ cp ./efs-seed/fs_image_linux.tar.gz.mbn.img ${D}/boot/modem_fsg - MTOOLS_SKIP_CHECK=1 mcopy -i ./bootloaders-linux/NON-HLOS.bin \ - ::image/modem.* ::image/mba.mbn ::image/wcnss.* ${D}${nonarch_base_libdir}/firmware/ + cp -r ./proprietary-linux/wlan ${D}${nonarch_base_libdir}/firmware/ - # Venus firmware have been merged in linux-firmware in a different location than - # what we've been using for now. Let's add symlinks for now, until we switch to linux-firmware - install -d ${D}${nonarch_base_libdir}/firmware/qcom/venus-1.8/ - for f in ${D}${nonarch_base_libdir}/firmware/venus.*; do - f=$(basename $f) - ln -s ${nonarch_base_libdir}/firmware/$f ${D}${nonarch_base_libdir}/firmware/qcom/venus-1.8/$f - done + install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8916 + MTOOLS_SKIP_CHECK=1 mcopy -i ./bootloaders-linux/NON-HLOS.bin \ + ::image/modem.* ::image/mba.mbn ::image/wcnss.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8916 install -d ${D}${sysconfdir}/ install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE } -FILES_${PN} += "${nonarch_base_libdir}/firmware/*" FILES_${PN} += "/boot/modem_fsg" -INSANE_SKIP_${PN} += "arch" - -RPROVIDES_${PN} += "linux-firmware-qcom-adreno-a3xx" -RREPLACES_${PN} += "linux-firmware-qcom-adreno-a3xx" -RCONFLICTS_${PN} += "linux-firmware-qcom-adreno-a3xx" +FILES_${PN} += "${nonarch_base_libdir}/firmware/wlan/*" +FILES_${PN} += "${nonarch_base_libdir}/firmware/qcom/msm8916/*" -RPROVIDES_${PN} += "linux-firmware-qcom-venus-1.8" -RREPLACES_${PN} += "linux-firmware-qcom-venus-1.8" -RCONFLICTS_${PN} += "linux-firmware-qcom-venus-1.8" +INSANE_SKIP_${PN} += "arch" RPROVIDES_${PN} += "linux-firmware-qcom-license" RREPLACES_${PN} += "linux-firmware-qcom-license" diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb index dc81dcd2..952f574a 100644 --- a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard820c_01700.1.bb @@ -18,11 +18,9 @@ do_compile() { do_install() { install -d ${D}${nonarch_base_libdir}/firmware/ - install -d ${D}${nonarch_base_libdir}/firmware/qcom/venus-4.2/ + install -d ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/ - install -m 0444 ./proprietary-linux/a530*.* ${D}${nonarch_base_libdir}/firmware/ - install -m 0444 ./proprietary-linux/venus.* ${D}${nonarch_base_libdir}/firmware/qcom/venus-4.2/ - install -m 0444 ./proprietary-linux/adsp.* ${D}${nonarch_base_libdir}/firmware/ + install -m 0444 ./proprietary-linux/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/msm8996/ install -d ${D}${sysconfdir}/ install -m 0644 LICENSE ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE @@ -31,14 +29,6 @@ do_install() { FILES_${PN} += "${nonarch_base_libdir}/firmware/*" INSANE_SKIP_${PN} += "arch" -RPROVIDES_${PN} += "linux-firmware-qcom-adreno-a530" -RREPLACES_${PN} += "linux-firmware-qcom-adreno-a530" -RCONFLICTS_${PN} += "linux-firmware-qcom-adreno-a530" - -RPROVIDES_${PN} += "linux-firmware-qcom-venus-4.2" -RREPLACES_${PN} += "linux-firmware-qcom-venus-4.2" -RCONFLICTS_${PN} += "linux-firmware-qcom-venus-4.2" - RPROVIDES_${PN} += "linux-firmware-qcom-license" RREPLACES_${PN} += "linux-firmware-qcom-license" RCONFLICTS_${PN} += "linux-firmware-qcom-license" diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh new file mode 100644 index 00000000..3a1d5324 --- /dev/null +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c/generate_board-2_json.sh @@ -0,0 +1,23 @@ +JSON="$2" + +iter=0 +echo "[" > "${JSON}" +for file in $1/bdwlan.*; do + [[ $file == *.txt ]] && continue + + iter=$((iter+1)) + [ $iter -ne 1 ] && echo " }," >> "${JSON}" + + echo " {" >> "${JSON}" + echo " \"data\": \"$file\"," >> "${JSON}" + if [[ $file == */bdwlan.bin ]]; then + file_ext="ff" + else + file_ext="$(printf '%x\n' "$(basename "${file}" | sed -E 's:^.*\.b?([0-9a-f]*)$:0x\1:')")" + fi + echo " \"names\": [\"bus=snoc,qmi-board-id=${file_ext}\"]" >> "${JSON}" +done + +echo " }" >> "${JSON}" +echo "]" >> "${JSON}" + diff --git a/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb new file mode 100644 index 00000000..88a1a6c3 --- /dev/null +++ b/bsp/meta-qcom/recipes-bsp/firmware/firmware-qcom-dragonboard845c_20190529180356-v4.bb @@ -0,0 +1,55 @@ +DESCRIPTION = "QCOM Firmware for DragonBoard 845c" + +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.qcom.txt;md5=cbbe399f2c983ad51768f4561587f000" + +SRC_URI = "https://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_${PV}.zip \ + git://github.com/alimon/qca-swiss-army-knife \ + file://generate_board-2_json.sh" +SRC_URI[md5sum] = "ad69855a1275547b16d94a1b5405ac62" +SRC_URI[sha256sum] = "4289d2f2a7124b104d0274879e702aae9b1e50c42eec3747f8584c6744ef65e3" +SRCREV = "0c01a2abc3e9855b71f0fbea2c335011104d9ec0" + +COMPATIBLE_MACHINE = "(dragonboard-845c)" +PACKAGE_ARCH = "${MACHINE_ARCH}" +DEPENDS += "bash-native" +inherit python3native + +S = "${WORKDIR}" + +do_compile() { + # Build board-2.bin needed by WiFi + mkdir -p bdf + cp ./38-bdwlan_split/bdwlan*.* bdf + bash generate_board-2_json.sh bdf board-2.json + python3 git/tools/scripts/ath10k/ath10k-bdencoder -c board-2.json -o board-2.bin +} + +do_install() { + install -d ${D}${nonarch_base_libdir}/firmware/ + install -d ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2/ + install -d ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + + install -m 0444 ./17-USB3-201-202-FW/K2026090.mem ${D}${nonarch_base_libdir}/firmware/ + install -m 0444 ./18-adreno-fw/a630_zap*.* ${D}${nonarch_base_libdir}/firmware/qcom/ + install -m 0444 ./20-adsp_split/firmware/adsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + install -m 0444 ./21-cdsp_split/firmware/cdsp*.* ${D}${nonarch_base_libdir}/firmware/qcom/sdm845 + install -m 0444 ./33-venus_split/venus.* ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2/ + + install -d ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/ + install -m 0444 ./board-2.bin ${D}${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/ + + install -d ${D}${sysconfdir}/ + install -m 0644 LICENSE.qcom.txt ${D}${sysconfdir}/QCOM-LINUX-BOARD-SUPPORT-LICENSE +} + +FILES_${PN} += "${nonarch_base_libdir}/firmware/*" +INSANE_SKIP_${PN} += "arch" + +RPROVIDES_${PN} += "linux-firmware-qcom-venus-5.2" +RREPLACES_${PN} += "linux-firmware-qcom-venus-5.2" +RCONFLICTS_${PN} += "linux-firmware-qcom-venus-5.2" + +RPROVIDES_${PN} += "linux-firmware-qcom-license" +RREPLACES_${PN} += "linux-firmware-qcom-license" +RCONFLICTS_${PN} += "linux-firmware-qcom-license" diff --git a/bsp/meta-qcom/recipes-bsp/wcnss-config/wcnss-config_1.13.bb b/bsp/meta-qcom/recipes-bsp/wcnss-config/wcnss-config_1.13.bb deleted file mode 100644 index 79711ad8..00000000 --- a/bsp/meta-qcom/recipes-bsp/wcnss-config/wcnss-config_1.13.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "WLAN and BT configuration files for QCOM WCN" -HOMEPAGE = "https://git.linaro.org/landing-teams/working/qualcomm/wcnss-config.git" -SECTION = "devel" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://debian/copyright;md5=9ffc7d99f148b53a339cd4374c5c431f" - -# TAG:debian/1.13 -SRCREV = "655a59f30915bed785d39cc90130dc06b44d7f6f" -SRC_URI = "git://git.linaro.org/landing-teams/working/qualcomm/wcnss-config.git;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit systemd allarch - -PACKAGES =+ "wcnss-start" - -do_install () { - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${S}/debian/wcnss-start.service ${D}${systemd_unitdir}/system - - install -d ${D}${sbindir} - install -m 0755 ${S}/wcnss-start ${D}${sbindir} -} - -# They are empty, and would break dev-pkgs image feature. -PACKAGES_remove = "${PN}-dev ${PN}-staticdev" - -FILES_wcnss-start = "${sbindir}/wcnss-start ${systemd_unitdir}/system/wcnss-start.service" - -SYSTEMD_PACKAGES = "wcnss-start" -SYSTEMD_SERVICE_wcnss-start = "wcnss-start.service" diff --git a/bsp/meta-qcom/recipes-devtools/qdl/files/0001-Makefile-Use-pkg-config-for-libxml2-detection.patch b/bsp/meta-qcom/recipes-devtools/qdl/files/0001-Makefile-Use-pkg-config-for-libxml2-detection.patch new file mode 100644 index 00000000..2aca1811 --- /dev/null +++ b/bsp/meta-qcom/recipes-devtools/qdl/files/0001-Makefile-Use-pkg-config-for-libxml2-detection.patch @@ -0,0 +1,35 @@ +From d0ecd95e8935a9fe3e94921d10bfb153f5e0ce52 Mon Sep 17 00:00:00 2001 +From: Nicolas Dechesne <nicolas.dechesne@linaro.org> +Date: Wed, 28 Aug 2019 17:54:50 +0200 +Subject: [PATCH] Makefile: Use pkg-config for libxml2 detection. + +xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -1,14 +1,14 @@ + OUT := qdl + +-CFLAGS := -O2 -Wall -g `xml2-config --cflags` +-LDFLAGS := `xml2-config --libs` -ludev +-prefix := /usr/local ++CFLAGS += -O2 -Wall -g `pkg-config --cflags libxml-2.0` ++LDFLAGS += `pkg-config --libs libxml-2.0` -ludev ++prefix ?= /usr/local + + SRCS := firehose.c qdl.c sahara.c util.c patch.c program.c ufs.c + OBJS := $(SRCS:.c=.o) + + $(OUT): $(OBJS) +- $(CC) -o $@ $^ $(LDFLAGS) ++ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) + + clean: + rm -f $(OUT) $(OBJS) diff --git a/bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb b/bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb new file mode 100644 index 00000000..aba3cec1 --- /dev/null +++ b/bsp/meta-qcom/recipes-devtools/qdl/qdl_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "QDL flasing tool" +HOMEPAGE = "https://github.com/andersson/qdl.git" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://qdl.c;beginline=1;endline=31;md5=1c7d712d897368d3d3c161e5493efc6a" + +DEPENDS = "libxml2" +DEPENDS_append_class-target = " udev " + +inherit pkgconfig + +SRCREV = "760b3dffb03d2b7dfb82c6eac652a092f51c572d" +SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \ + file://0001-Makefile-Use-pkg-config-for-libxml2-detection.patch" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +do_install () { + oe_runmake install DESTDIR=${D} prefix=${prefix} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/bsp/meta-qcom/recipes-devtools/skales/files/0002-mkbootimg-use-python3.patch b/bsp/meta-qcom/recipes-devtools/skales/files/0002-mkbootimg-use-python3.patch new file mode 100644 index 00000000..2abac7df --- /dev/null +++ b/bsp/meta-qcom/recipes-devtools/skales/files/0002-mkbootimg-use-python3.patch @@ -0,0 +1,23 @@ +From aadbb5dd64abc2efbb5548d1d0b168d476875157 Mon Sep 17 00:00:00 2001 +From: Peter Griffin <peter.griffin@linaro.org> +Date: Wed, 29 Jan 2020 22:55:41 +0100 +Subject: [PATCH 2/2] mkbootimg: use python3 + +Signed-off-by: Peter Griffin <peter.griffin@linaro.org> +--- + mkbootimg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkbootimg b/mkbootimg +index c0e7dcb..adfc54b 100755 +--- a/mkbootimg ++++ b/mkbootimg +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python3 + # + # Copyright (c) 2013, The Linux Foundation. All rights reserved. + # +-- +2.7.4 + diff --git a/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb b/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb index 71928e86..782d20ca 100644 --- a/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb +++ b/bsp/meta-qcom/recipes-devtools/skales/skales_git.bb @@ -6,19 +6,18 @@ SECTION = "devel" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://mkbootimg;beginline=3;endline=29;md5=114b84083e657f3886bfa2c1e5de7deb" -DEPENDS = "python dtc" - SRCREV = "6eac9e943de53c4aaaede3697e9226a47686fe25" PV = "1.5.0+git${SRCPV}" -SRC_URI = "git://codeaurora.org/quic/kernel/skales" +SRC_URI = "git://source.codeaurora.org/quic/kernel/skales;protocol=http \ + file://0002-mkbootimg-use-python3.patch \ + " S = "${WORKDIR}/git" do_install () { install -d ${D}${bindir}/skales install -m 0755 ${S}/mkbootimg ${D}${bindir}/skales - install -m 0755 ${S}/dtbTool ${D}${bindir}/skales } BBCLASSEXTEND = "native" diff --git a/bsp/meta-qcom/recipes-graphics/mesa/files/0001-freedreno-add-query-for-dmabuf-modifiers.patch b/bsp/meta-qcom/recipes-graphics/mesa/files/0001-freedreno-add-query-for-dmabuf-modifiers.patch deleted file mode 100644 index 57ebd8f9..00000000 --- a/bsp/meta-qcom/recipes-graphics/mesa/files/0001-freedreno-add-query-for-dmabuf-modifiers.patch +++ /dev/null @@ -1,101 +0,0 @@ -From c4bee1a1b3fb224002fe8c263bedbce1b705ed49 Mon Sep 17 00:00:00 2001 -From: Peter Griffin <peter.griffin@linaro.org> -Date: Mon, 13 May 2019 19:18:56 +0100 -Subject: [PATCH] freedreno: add query for dmabuf modifiers - -Backport of mesa 7c4b9510d by Fritz Koenig. Tested with Weston -and weston-simple-dmabuf-drm client. - -Upstream-Status: Backport from 19.0 - -Signed-off-by: Peter Griffin <peter.griffin@linaro.org> ---- - src/gallium/drivers/freedreno/freedreno_screen.c | 43 ++++++++++++++++++++++++ - src/gallium/drivers/freedreno/freedreno_screen.h | 3 ++ - 2 files changed, 46 insertions(+) - -diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c -index f338d75..cbb5b8a 100644 ---- a/src/gallium/drivers/freedreno/freedreno_screen.c -+++ b/src/gallium/drivers/freedreno/freedreno_screen.c -@@ -40,6 +40,7 @@ - - #include "util/os_time.h" - -+#include <drm_fourcc.h> - #include <errno.h> - #include <stdio.h> - #include <stdlib.h> -@@ -732,6 +733,37 @@ fd_screen_bo_get_handle(struct pipe_screen *pscreen, - } - } - -+static void -+fd_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen, -+ enum pipe_format format, -+ int max, uint64_t *modifiers, -+ unsigned int *external_only, -+ int *count) -+{ -+ struct fd_screen *screen = fd_screen(pscreen); -+ int i, num = 0; -+ -+ max = MIN2(max, screen->num_supported_modifiers); -+ -+ if (!max) { -+ max = screen->num_supported_modifiers; -+ external_only = NULL; -+ modifiers = NULL; -+ } -+ -+ for (i = 0; i < max; i++) { -+ if (modifiers) -+ modifiers[num] = screen->supported_modifiers[i]; -+ -+ if (external_only) -+ external_only[num] = 0; -+ -+ num++; -+ } -+ -+ *count = num; -+} -+ - struct fd_bo * - fd_screen_bo_from_handle(struct pipe_screen *pscreen, - struct winsys_handle *whandle) -@@ -921,6 +953,17 @@ fd_screen_create(struct fd_device *dev) - pscreen->fence_finish = fd_fence_finish; - pscreen->fence_get_fd = fd_fence_get_fd; - -+ pscreen->query_dmabuf_modifiers = fd_screen_query_dmabuf_modifiers; -+ -+ if (!screen->supported_modifiers) { -+ static const uint64_t supported_modifiers[] = { -+ DRM_FORMAT_MOD_LINEAR, -+ }; -+ -+ screen->supported_modifiers = supported_modifiers; -+ screen->num_supported_modifiers = ARRAY_SIZE(supported_modifiers); -+ } -+ - slab_create_parent(&screen->transfer_pool, sizeof(struct fd_transfer), 16); - - return pscreen; -diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h -index 6be739a..5558066 100644 ---- a/src/gallium/drivers/freedreno/freedreno_screen.h -+++ b/src/gallium/drivers/freedreno/freedreno_screen.h -@@ -89,6 +89,9 @@ struct fd_screen { - struct fd_batch_cache batch_cache; - - bool reorder; -+ -+ unsigned num_supported_modifiers; -+ const uint64_t *supported_modifiers; - }; - - static inline struct fd_screen * --- -2.7.4 - diff --git a/bsp/meta-qcom/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch b/bsp/meta-qcom/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch new file mode 100644 index 00000000..2d4aa000 --- /dev/null +++ b/bsp/meta-qcom/recipes-graphics/mesa/mesa/0001-freedreno-clear-last_fence-after-resource-tracking.patch @@ -0,0 +1,94 @@ +From 3c4e3006ef3318c1afe65341a1f92cf332ce0d81 Mon Sep 17 00:00:00 2001 +From: Rob Clark <robdclark@chromium.org> +Date: Sat, 23 May 2020 10:52:52 -0700 +Subject: [PATCH] freedreno: clear last_fence after resource tracking + +The resource tracking in the clear/draw_vbo/blit paths could itself +trigger a flush. Which would update last_fence. So we need to clear +last_fence *after* all the dependency tracking. + +Fixes: ddb7fadaf8b ("freedreno: avoid no-op flushes by re-using last-fence") +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2992 +Signed-off-by: Rob Clark <robdclark@chromium.org> +--- + src/gallium/drivers/freedreno/a6xx/fd6_blitter.c | 8 ++++++-- + src/gallium/drivers/freedreno/freedreno_draw.c | 16 ++++++++++++---- + 2 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +index f812aab37a6..21900312ae7 100644 +--- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c ++++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.c +@@ -632,8 +632,6 @@ handle_rgba_blit(struct fd_context *ctx, const struct pipe_blit_info *info) + if (!can_do_blit(info)) + return false; + +- fd_fence_ref(&ctx->last_fence, NULL); +- + batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true); + + fd6_emit_restore(batch, batch->draw); +@@ -646,6 +644,12 @@ handle_rgba_blit(struct fd_context *ctx, const struct pipe_blit_info *info) + + mtx_unlock(&ctx->screen->lock); + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_write()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + emit_setup(batch); + + if ((info->src.resource->target == PIPE_BUFFER) && +diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c +index 94e2aae9e68..e2a0a1260fa 100644 +--- a/src/gallium/drivers/freedreno/freedreno_draw.c ++++ b/src/gallium/drivers/freedreno/freedreno_draw.c +@@ -93,8 +93,6 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) + return; + } + +- fd_fence_ref(&ctx->last_fence, NULL); +- + /* Upload a user index buffer. */ + struct pipe_resource *indexbuf = NULL; + unsigned index_offset = 0; +@@ -282,6 +280,12 @@ fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) + /* and any buffers used, need to be resolved: */ + batch->resolve |= buffers; + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_written()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + DBG("%p: %x %ux%u num_draws=%u (%s/%s)", batch, buffers, + pfb->width, pfb->height, batch->num_draws, + util_format_short_name(pipe_surface_format(pfb->cbufs[0])), +@@ -318,8 +322,6 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, + if (!fd_render_condition_check(pctx)) + return; + +- fd_fence_ref(&ctx->last_fence, NULL); +- + if (ctx->in_blit) { + fd_batch_reset(batch); + fd_context_all_dirty(ctx); +@@ -366,6 +368,12 @@ fd_clear(struct pipe_context *pctx, unsigned buffers, + + mtx_unlock(&ctx->screen->lock); + ++ /* Clearing last_fence must come after the batch dependency tracking ++ * (resource_read()/resource_written()), as that can trigger a flush, ++ * re-populating last_fence ++ */ ++ fd_fence_ref(&ctx->last_fence, NULL); ++ + DBG("%p: %x %ux%u depth=%f, stencil=%u (%s/%s)", batch, buffers, + pfb->width, pfb->height, depth, stencil, + util_format_short_name(pipe_surface_format(pfb->cbufs[0])), +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend index 7ad44bdc..fd40c398 100644 --- a/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend +++ b/bsp/meta-qcom/recipes-graphics/mesa/mesa_%.bbappend @@ -1,13 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +SRC_URI_append = " \ + file://0001-freedreno-clear-last_fence-after-resource-tracking.patch \ +" + # Enable freedreno driver GALLIUMDRIVERS_append_apq8064 = ",freedreno" GALLIUMDRIVERS_append_apq8016 = ",freedreno" GALLIUMDRIVERS_append_apq8096 = ",freedreno" - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI_append_apq8064 = " file://0001-freedreno-add-query-for-dmabuf-modifiers.patch" -SRC_URI_append_apq8016 = " file://0001-freedreno-add-query-for-dmabuf-modifiers.patch" -SRC_URI_append_apq8096 = " file://0001-freedreno-add-query-for-dmabuf-modifiers.patch" +GALLIUMDRIVERS_append_sdm845 = ",freedreno" PACKAGECONFIG_append_apq8064 = " \ gallium \ @@ -23,3 +23,8 @@ PACKAGECONFIG_append_apq8096 = " \ gallium \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \ " + +PACKAGECONFIG_append_sdm845 = " \ + gallium \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xa', '', d)} \ +" diff --git a/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index 0d8fc578..04856c99 100644 --- a/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/bsp/meta-qcom/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -3,3 +3,4 @@ PACKAGECONFIG_append_apq8064 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" PACKAGECONFIG_append_apq8016 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" PACKAGECONFIG_append_apq8096 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" +PACKAGECONFIG_append_sdm845 = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' dri3 xshmfence glamor', '', d)}" diff --git a/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_%.bbappend new file mode 100644 index 00000000..9a1115c3 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_%.bbappend @@ -0,0 +1,7 @@ + +do_install_append() { + rm -rf ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.2 + rm -rf ${D}${nonarch_base_libdir}/firmware/qcom/venus-5.4 +} + + diff --git a/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_git.bbappend deleted file mode 100644 index ff4b3c1b..00000000 --- a/bsp/meta-qcom/recipes-kernel/linux-firmware/linux-firmware_git.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -# XXX: Checkout previous ath10k stable firmware for dragonboard820c, -# RM.4.4.1.c2-00057-QCARMSWP-1 causes a HW reboot use RM.4.4.1-00079-QCARMSWPZ-1 -do_install_dragonboard-820c_prepend() { - linux_firmware_ath10k_stable="1d1dd4be21cde408b0fb12774d477293bc8d4cc2" - cd "${S}" - git checkout "${linux_firmware_ath10k_stable}" -- ath10k/QCA6174 -} diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch new file mode 100644 index 00000000..2975a2a4 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch @@ -0,0 +1,207 @@ +From e4a349e3fce09e441f6568ca318be66709386514 Mon Sep 17 00:00:00 2001 +From: Jonathan Marek <jonathan@marek.ca> +Date: Tue, 9 Jun 2020 15:40:24 -0400 +Subject: [PATCH] arm64: dts: qcom: sm8250: Add USB and PHY device nodes + +Add device nodes for the USB3 controller, QMP SS PHY and +SNPS HS PHY. + +Signed-off-by: Jonathan Marek <jonathan@marek.ca> +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 180 +++++++++++++++++++++++++++ + 1 file changed, 180 insertions(+) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index cc6c65883d88..68f9a3ce9760 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -1097,6 +1097,186 @@ intc: interrupt-controller@17a00000 { + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; + }; + ++ usb_1_hsphy: phy@88e3000 { ++ compatible = "qcom,sm8250-usb-hs-phy", ++ "qcom,usb-snps-hs-7nm-phy"; ++ reg = <0 0x088e3000 0 0x400>; ++ status = "disabled"; ++ #phy-cells = <0>; ++ ++ clocks = <&rpmhcc RPMH_CXO_CLK>; ++ clock-names = "ref"; ++ ++ resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>; ++ }; ++ ++ usb_2_hsphy: phy@88e4000 { ++ compatible = "qcom,sm8250-usb-hs-phy", ++ "qcom,usb-snps-hs-7nm-phy"; ++ reg = <0 0x088e4000 0 0x400>; ++ status = "disabled"; ++ #phy-cells = <0>; ++ ++ clocks = <&rpmhcc RPMH_CXO_CLK>; ++ clock-names = "ref"; ++ ++ resets = <&gcc GCC_QUSB2PHY_SEC_BCR>; ++ }; ++ ++ usb_1_qmpphy: phy@88e9000 { ++ compatible = "qcom,sm8250-qmp-usb3-phy"; ++ reg = <0 0x088e9000 0 0x200>, ++ <0 0x088e8000 0 0x20>; ++ reg-names = "reg-base", "dp_com"; ++ status = "disabled"; ++ #clock-cells = <1>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ ++ clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, ++ <&rpmhcc RPMH_CXO_CLK>, ++ <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; ++ clock-names = "aux", "ref_clk_src", "com_aux"; ++ ++ resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, ++ <&gcc GCC_USB3_PHY_PRIM_BCR>; ++ reset-names = "phy", "common"; ++ ++ usb_1_ssphy: lanes@88e9200 { ++ reg = <0 0x088e9200 0 0x200>, ++ <0 0x088e9400 0 0x200>, ++ <0 0x088e9c00 0 0x400>, ++ <0 0x088e9600 0 0x200>, ++ <0 0x088e9800 0 0x200>, ++ <0 0x088e9a00 0 0x100>; ++ #phy-cells = <0>; ++ clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; ++ clock-names = "pipe0"; ++ clock-output-names = "usb3_phy_pipe_clk_src"; ++ }; ++ }; ++ ++ usb_2_qmpphy: phy@88eb000 { ++ compatible = "qcom,sm8250-qmp-usb3-uni-phy"; ++ reg = <0 0x088eb000 0 0x200>; ++ status = "disabled"; ++ #clock-cells = <1>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ ++ clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>, ++ <&rpmhcc RPMH_CXO_CLK>, ++ <&gcc GCC_USB3_SEC_CLKREF_EN>, ++ <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; ++ clock-names = "aux", "ref_clk_src", "ref", "com_aux"; ++ ++ resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, ++ <&gcc GCC_USB3_PHY_SEC_BCR>; ++ reset-names = "phy", "common"; ++ ++ usb_2_ssphy: lane@88eb200 { ++ reg = <0 0x088eb200 0 0x200>, ++ <0 0x088eb400 0 0x200>, ++ <0 0x088eb800 0 0x800>; ++ #phy-cells = <0>; ++ clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; ++ clock-names = "pipe0"; ++ clock-output-names = "usb3_uni_phy_pipe_clk_src"; ++ }; ++ }; ++ ++ usb_1: usb@a6f8800 { ++ compatible = "qcom,sm8250-dwc3", "qcom,dwc3"; ++ reg = <0 0x0a6f8800 0 0x400>; ++ status = "disabled"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ dma-ranges; ++ ++ clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>, ++ <&gcc GCC_USB30_PRIM_MASTER_CLK>, ++ <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>, ++ <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_PRIM_SLEEP_CLK>, ++ <&gcc GCC_USB3_SEC_CLKREF_EN>; ++ clock-names = "cfg_noc", "core", "iface", "mock_utmi", ++ "sleep", "xo"; ++ ++ assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_PRIM_MASTER_CLK>; ++ assigned-clock-rates = <19200000>, <200000000>; ++ ++ interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, ++ <&pdc 14 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 15 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 17 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-names = "hs_phy_irq", "dp_hs_phy_irq", ++ "dm_hs_phy_irq", "ss_phy_irq"; ++ ++ power-domains = <&gcc USB30_PRIM_GDSC>; ++ ++ resets = <&gcc GCC_USB30_PRIM_BCR>; ++ ++ usb_1_dwc3: dwc3@a600000 { ++ compatible = "snps,dwc3"; ++ reg = <0 0x0a600000 0 0xcd00>; ++ interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>; ++ //iommus = <&apps_smmu 0x0 0x0>; ++ snps,dis_u2_susphy_quirk; ++ snps,dis_enblslpm_quirk; ++ phys = <&usb_1_hsphy>, <&usb_1_ssphy>; ++ phy-names = "usb2-phy", "usb3-phy"; ++ }; ++ }; ++ ++ usb_2: usb@a8f8800 { ++ compatible = "qcom,sm8250-dwc3", "qcom,dwc3"; ++ reg = <0 0x0a8f8800 0 0x400>; ++ status = "disabled"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ dma-ranges; ++ ++ clocks = <&gcc GCC_CFG_NOC_USB3_SEC_AXI_CLK>, ++ <&gcc GCC_USB30_SEC_MASTER_CLK>, ++ <&gcc GCC_AGGRE_USB3_SEC_AXI_CLK>, ++ <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_SEC_SLEEP_CLK>, ++ <&gcc GCC_USB3_SEC_CLKREF_EN>; ++ clock-names = "cfg_noc", "core", "iface", "mock_utmi", ++ "sleep", "xo"; ++ ++ assigned-clocks = <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>, ++ <&gcc GCC_USB30_SEC_MASTER_CLK>; ++ assigned-clock-rates = <19200000>, <200000000>; ++ ++ interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, ++ <&pdc 12 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 13 IRQ_TYPE_EDGE_BOTH>, ++ <&pdc 16 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-names = "hs_phy_irq", "dp_hs_phy_irq", ++ "dm_hs_phy_irq", "ss_phy_irq"; ++ ++ power-domains = <&gcc USB30_SEC_GDSC>; ++ ++ resets = <&gcc GCC_USB30_SEC_BCR>; ++ ++ usb_2_dwc3: dwc3@a800000 { ++ compatible = "snps,dwc3"; ++ reg = <0 0x0a800000 0 0xcd00>; ++ interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>; ++ //iommus = <&apps_smmu 0x20 0>; ++ snps,dis_u2_susphy_quirk; ++ snps,dis_enblslpm_quirk; ++ phys = <&usb_2_hsphy>, <&usb_2_ssphy>; ++ phy-names = "usb2-phy", "usb3-phy"; ++ }; ++ }; ++ + pdc: interrupt-controller@b220000 { + compatible = "qcom,sm8250-pdc", "qcom,pdc"; + reg = <0 0x0b220000 0 0x30000>, <0 0x17c000f0 0 0x60>; +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch new file mode 100644 index 00000000..b5e15c52 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch @@ -0,0 +1,45 @@ +From a1b05da240efec1780dc654dd12efe518e4a5068 Mon Sep 17 00:00:00 2001 +From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> +Date: Tue, 9 Jun 2020 11:10:58 +0530 +Subject: [PATCH] arm64: dts: qcom: sm8250: Add support for SDC2 + +Add support for SDC2 which can be used to interface uSD card. + +Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 68f9a3ce9760..8e4abe5aa01f 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -983,6 +983,25 @@ ufs_mem_phy_lanes: lanes@1d87400 { + }; + }; + ++ sdhc_2: sdhci@8804000 { ++ compatible = "qcom,sm8250-sdhci", "qcom,sdhci-msm-v5"; ++ reg = <0 0x08804000 0 0x1000>; ++ ++ interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>, ++ <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>; ++ interrupt-names = "hc_irq", "pwr_irq"; ++ ++ clocks = <&gcc GCC_SDCC2_AHB_CLK>, ++ <&gcc GCC_SDCC2_APPS_CLK>; ++ clock-names = "iface", "core"; ++ //iommus = <&apps_smmu 0xa0 0xf>; ++ qcom,dll-config = <0x0007642c>; ++ qcom,ddr-config = <0x80040868>; ++ power-domains = <&rpmhpd SM8250_CX>; ++ ++ status = "disabled"; ++ }; ++ + intc: interrupt-controller@17a00000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch new file mode 100644 index 00000000..6eb26cdd --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch @@ -0,0 +1,74 @@ +From 7239ad605113c0945c94f0f75cfbeb3b1a38deb7 Mon Sep 17 00:00:00 2001 +From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> +Date: Mon, 29 Jun 2020 21:09:02 +0530 +Subject: [PATCH] arm64: dts: qcom: sm8250: Rename UART2 node to UART12 + +The UART12 node has been mistakenly mentioned as UART2. Let's fix that +for both SM8250 SoC and MTP board and also add pinctrl definition for +it. + +Fixes: 60378f1a171e ("arm64: dts: qcom: sm8250: Add sm8250 dts file") +Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> +--- + arch/arm64/boot/dts/qcom/sm8250-mtp.dts | 4 ++-- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 11 ++++++++++- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +index e9acda9f5b83..e844da89e688 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250-mtp.dts ++++ b/arch/arm64/boot/dts/qcom/sm8250-mtp.dts +@@ -13,7 +13,7 @@ / { + compatible = "qcom,sm8250-mtp"; + + aliases { +- serial0 = &uart2; ++ serial0 = &uart12; + }; + + chosen { +@@ -359,7 +359,7 @@ &tlmm { + gpio-reserved-ranges = <28 4>, <40 4>; + }; + +-&uart2 { ++&uart12 { + status = "okay"; + }; + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 3ecc780a005d..ba8e8b8a90d2 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -865,11 +865,13 @@ spi12: spi@a90000 { + status = "disabled"; + }; + +- uart2: serial@a90000 { ++ uart12: serial@a90000 { + compatible = "qcom,geni-debug-uart"; + reg = <0x0 0x00a90000 0x0 0x4000>; + clock-names = "se"; + clocks = <&gcc 113>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_uart12_default>; + interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; +@@ -1839,6 +1841,13 @@ config { + bias-disable; + }; + }; ++ ++ qup_uart12_default: qup-uart12-default { ++ mux { ++ pins = "gpio34", "gpio35"; ++ function = "qup12"; ++ }; ++ }; + }; + + timer@17c20000 { +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch new file mode 100644 index 00000000..81832861 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch @@ -0,0 +1,1202 @@ +From ba21e7e0130be07dadf415e277524b6544680656 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> +Date: Wed, 3 Jun 2020 18:42:42 +0300 +Subject: [PATCH] arm64: dts: qcom: sm8250: add I2C and SPI nodes + +Much like SDM845 each serial engine has 4 pins attached. Add all +possible I2C and SPI nodes for all 20 serial engines. + +Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 1147 ++++++++++++++++++++++++++ + 1 file changed, 1147 insertions(+) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 384839cb036c..37d3abeabf87 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -15,6 +15,49 @@ / { + #address-cells = <2>; + #size-cells = <2>; + ++ aliases { ++ i2c0 = &i2c0; ++ i2c1 = &i2c1; ++ i2c2 = &i2c2; ++ i2c3 = &i2c3; ++ i2c4 = &i2c4; ++ i2c5 = &i2c5; ++ i2c6 = &i2c6; ++ i2c7 = &i2c7; ++ i2c8 = &i2c8; ++ i2c9 = &i2c9; ++ i2c10 = &i2c10; ++ i2c11 = &i2c11; ++ i2c12 = &i2c12; ++ i2c13 = &i2c13; ++ i2c14 = &i2c14; ++ i2c15 = &i2c15; ++ i2c16 = &i2c16; ++ i2c17 = &i2c17; ++ i2c18 = &i2c18; ++ i2c19 = &i2c19; ++ spi0 = &spi0; ++ spi1 = &spi1; ++ spi2 = &spi2; ++ spi3 = &spi3; ++ spi4 = &spi4; ++ spi5 = &spi5; ++ spi6 = &spi6; ++ spi7 = &spi7; ++ spi8 = &spi8; ++ spi9 = &spi9; ++ spi10 = &spi10; ++ spi11 = &spi11; ++ spi12 = &spi12; ++ spi13 = &spi13; ++ spi14 = &spi14; ++ spi15 = &spi15; ++ spi16 = &spi16; ++ spi17 = &spi17; ++ spi18 = &spi18; ++ spi19 = &spi19; ++ }; ++ + chosen { }; + + clocks { +@@ -294,6 +337,394 @@ gcc: clock-controller@100000 { + clocks = <&rpmhcc RPMH_CXO_CLK>, <&sleep_clk>; + }; + ++ qupv3_id_2: geniqup@8c0000 { ++ compatible = "qcom,geni-se-qup"; ++ reg = <0x0 0x008c0000 0x0 0x6000>; ++ clock-names = "m-ahb", "s-ahb"; ++ clocks = <&gcc GCC_QUPV3_WRAP_2_M_AHB_CLK>, ++ <&gcc GCC_QUPV3_WRAP_2_S_AHB_CLK>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ status = "disabled"; ++ ++ i2c14: i2c@880000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00880000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c14_default>; ++ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi14: spi@880000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00880000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi14_default>; ++ interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c15: i2c@884000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00884000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c15_default>; ++ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi15: spi@884000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00884000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi15_default>; ++ interrupts = <GIC_SPI 583 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c16: i2c@888000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00888000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c16_default>; ++ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi16: spi@888000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00888000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi16_default>; ++ interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c17: i2c@88c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x0088c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c17_default>; ++ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi17: spi@88c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x0088c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi17_default>; ++ interrupts = <GIC_SPI 585 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c18: i2c@890000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00890000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c18_default>; ++ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi18: spi@890000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00890000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi18_default>; ++ interrupts = <GIC_SPI 586 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c19: i2c@894000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00894000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c19_default>; ++ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi19: spi@894000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00894000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP2_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi19_default>; ++ interrupts = <GIC_SPI 587 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ }; ++ ++ qupv3_id_0: geniqup@9c0000 { ++ compatible = "qcom,geni-se-qup"; ++ reg = <0x0 0x009c0000 0x0 0x6000>; ++ clock-names = "m-ahb", "s-ahb"; ++ clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>, ++ <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ status = "disabled"; ++ ++ i2c0: i2c@980000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00980000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c0_default>; ++ interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi0: spi@980000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00980000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi0_default>; ++ interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c1: i2c@984000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00984000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c1_default>; ++ interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi1: spi@984000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00984000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi1_default>; ++ interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c2: i2c@988000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00988000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c2_default>; ++ interrupts = <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi2: spi@988000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00988000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi2_default>; ++ interrupts = <GIC_SPI 603 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c3: i2c@98c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x0098c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c3_default>; ++ interrupts = <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi3: spi@98c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x0098c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi3_default>; ++ interrupts = <GIC_SPI 604 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c4: i2c@990000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00990000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c4_default>; ++ interrupts = <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi4: spi@990000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00990000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi4_default>; ++ interrupts = <GIC_SPI 605 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c5: i2c@994000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00994000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c5_default>; ++ interrupts = <GIC_SPI 606 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi5: spi@994000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00994000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi5_default>; ++ interrupts = <GIC_SPI 606 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c6: i2c@998000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00998000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S6_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c6_default>; ++ interrupts = <GIC_SPI 607 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi6: spi@998000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00998000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S6_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi6_default>; ++ interrupts = <GIC_SPI 607 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c7: i2c@99c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x0099c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c7_default>; ++ interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi7: spi@99c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x0099c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP0_S7_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi7_default>; ++ interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ }; ++ + qupv3_id_1: geniqup@ac0000 { + compatible = "qcom,geni-se-qup"; + reg = <0x0 0x00ac0000 0x0 0x6000>; +@@ -304,6 +735,136 @@ qupv3_id_1: geniqup@ac0000 { + ranges; + status = "disabled"; + ++ i2c8: i2c@a80000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a80000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c8_default>; ++ interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi8: spi@a80000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a80000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S0_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi8_default>; ++ interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c9: i2c@a84000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a84000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c9_default>; ++ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi9: spi@a84000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a84000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S1_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi9_default>; ++ interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c10: i2c@a88000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a88000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c10_default>; ++ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi10: spi@a88000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a88000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S2_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi10_default>; ++ interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c11: i2c@a8c000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a8c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c11_default>; ++ interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi11: spi@a8c000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a8c000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S3_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi11_default>; ++ interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c12: i2c@a90000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a90000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c12_default>; ++ interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi12: spi@a90000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a90000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S4_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi12_default>; ++ interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ + uart2: serial@a90000 { + compatible = "qcom,geni-debug-uart"; + reg = <0x0 0x00a90000 0x0 0x4000>; +@@ -312,6 +873,32 @@ uart2: serial@a90000 { + interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + }; ++ ++ i2c13: i2c@a94000 { ++ compatible = "qcom,geni-i2c"; ++ reg = <0 0x00a94000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_i2c13_default>; ++ interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi13: spi@a94000 { ++ compatible = "qcom,geni-spi"; ++ reg = <0 0x00a94000 0 0x4000>; ++ clock-names = "se"; ++ clocks = <&gcc GCC_QUPV3_WRAP1_S5_CLK>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&qup_spi13_default>; ++ interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; + }; + + ufs_mem_hc: ufshc@1d84000 { +@@ -512,6 +1099,566 @@ tlmm: pinctrl@f100000 { + #interrupt-cells = <2>; + gpio-ranges = <&tlmm 0 0 180>; + wakeup-parent = <&pdc>; ++ ++ qup_i2c0_default: qup-i2c0-default { ++ mux { ++ pins = "gpio28", "gpio29"; ++ function = "qup0"; ++ }; ++ ++ config { ++ pins = "gpio28", "gpio29"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c1_default: qup-i2c1-default { ++ pinmux { ++ pins = "gpio4", "gpio5"; ++ function = "qup1"; ++ }; ++ ++ config { ++ pins = "gpio4", "gpio5"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c2_default: qup-i2c2-default { ++ mux { ++ pins = "gpio115", "gpio116"; ++ function = "qup2"; ++ }; ++ ++ config { ++ pins = "gpio115", "gpio116"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c3_default: qup-i2c3-default { ++ mux { ++ pins = "gpio119", "gpio120"; ++ function = "qup3"; ++ }; ++ ++ config { ++ pins = "gpio119", "gpio120"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c4_default: qup-i2c4-default { ++ mux { ++ pins = "gpio8", "gpio9"; ++ function = "qup4"; ++ }; ++ ++ config { ++ pins = "gpio8", "gpio9"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c5_default: qup-i2c5-default { ++ mux { ++ pins = "gpio12", "gpio13"; ++ function = "qup5"; ++ }; ++ ++ config { ++ pins = "gpio12", "gpio13"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c6_default: qup-i2c6-default { ++ mux { ++ pins = "gpio16", "gpio17"; ++ function = "qup6"; ++ }; ++ ++ config { ++ pins = "gpio16", "gpio17"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c7_default: qup-i2c7-default { ++ mux { ++ pins = "gpio20", "gpio21"; ++ function = "qup7"; ++ }; ++ ++ config { ++ pins = "gpio20", "gpio21"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c8_default: qup-i2c8-default { ++ mux { ++ pins = "gpio24", "gpio25"; ++ function = "qup8"; ++ }; ++ ++ config { ++ pins = "gpio24", "gpio25"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c9_default: qup-i2c9-default { ++ mux { ++ pins = "gpio125", "gpio126"; ++ function = "qup9"; ++ }; ++ ++ config { ++ pins = "gpio125", "gpio126"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c10_default: qup-i2c10-default { ++ mux { ++ pins = "gpio129", "gpio130"; ++ function = "qup10"; ++ }; ++ ++ config { ++ pins = "gpio129", "gpio130"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c11_default: qup-i2c11-default { ++ mux { ++ pins = "gpio60", "gpio61"; ++ function = "qup11"; ++ }; ++ ++ config { ++ pins = "gpio60", "gpio61"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c12_default: qup-i2c12-default { ++ mux { ++ pins = "gpio32", "gpio33"; ++ function = "qup12"; ++ }; ++ ++ config { ++ pins = "gpio32", "gpio33"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c13_default: qup-i2c13-default { ++ mux { ++ pins = "gpio36", "gpio37"; ++ function = "qup13"; ++ }; ++ ++ config { ++ pins = "gpio36", "gpio37"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c14_default: qup-i2c14-default { ++ mux { ++ pins = "gpio40", "gpio41"; ++ function = "qup14"; ++ }; ++ ++ config { ++ pins = "gpio40", "gpio41"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c15_default: qup-i2c15-default { ++ mux { ++ pins = "gpio44", "gpio45"; ++ function = "qup15"; ++ }; ++ ++ config { ++ pins = "gpio44", "gpio45"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c16_default: qup-i2c16-default { ++ mux { ++ pins = "gpio48", "gpio49"; ++ function = "qup16"; ++ }; ++ ++ config { ++ pins = "gpio48", "gpio49"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c17_default: qup-i2c17-default { ++ mux { ++ pins = "gpio52", "gpio53"; ++ function = "qup17"; ++ }; ++ ++ config { ++ pins = "gpio52", "gpio53"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c18_default: qup-i2c18-default { ++ mux { ++ pins = "gpio56", "gpio57"; ++ function = "qup18"; ++ }; ++ ++ config { ++ pins = "gpio56", "gpio57"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_i2c19_default: qup-i2c19-default { ++ mux { ++ pins = "gpio0", "gpio1"; ++ function = "qup19"; ++ }; ++ ++ config { ++ pins = "gpio0", "gpio1"; ++ drive-strength = <2>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi0_default: qup-spi0-default { ++ mux { ++ pins = "gpio28", "gpio29", ++ "gpio30", "gpio31"; ++ function = "qup0"; ++ }; ++ ++ config { ++ pins = "gpio28", "gpio29", ++ "gpio30", "gpio31"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi1_default: qup-spi1-default { ++ mux { ++ pins = "gpio4", "gpio5", ++ "gpio6", "gpio7"; ++ function = "qup1"; ++ }; ++ ++ config { ++ pins = "gpio4", "gpio5", ++ "gpio6", "gpio7"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi2_default: qup-spi2-default { ++ mux { ++ pins = "gpio115", "gpio116", ++ "gpio117", "gpio118"; ++ function = "qup2"; ++ }; ++ ++ config { ++ pins = "gpio115", "gpio116", ++ "gpio117", "gpio118"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi3_default: qup-spi3-default { ++ mux { ++ pins = "gpio119", "gpio120", ++ "gpio121", "gpio122"; ++ function = "qup3"; ++ }; ++ ++ config { ++ pins = "gpio119", "gpio120", ++ "gpio121", "gpio122"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi4_default: qup-spi4-default { ++ mux { ++ pins = "gpio8", "gpio9", ++ "gpio10", "gpio11"; ++ function = "qup4"; ++ }; ++ ++ config { ++ pins = "gpio8", "gpio9", ++ "gpio10", "gpio11"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi5_default: qup-spi5-default { ++ mux { ++ pins = "gpio12", "gpio13", ++ "gpio14", "gpio15"; ++ function = "qup5"; ++ }; ++ ++ config { ++ pins = "gpio12", "gpio13", ++ "gpio14", "gpio15"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi6_default: qup-spi6-default { ++ mux { ++ pins = "gpio16", "gpio17", ++ "gpio18", "gpio19"; ++ function = "qup6"; ++ }; ++ ++ config { ++ pins = "gpio16", "gpio17", ++ "gpio18", "gpio19"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi7_default: qup-spi7-default { ++ mux { ++ pins = "gpio20", "gpio21", ++ "gpio22", "gpio23"; ++ function = "qup7"; ++ }; ++ ++ config { ++ pins = "gpio20", "gpio21", ++ "gpio22", "gpio23"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi8_default: qup-spi8-default { ++ mux { ++ pins = "gpio24", "gpio25", ++ "gpio26", "gpio27"; ++ function = "qup8"; ++ }; ++ ++ config { ++ pins = "gpio24", "gpio25", ++ "gpio26", "gpio27"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi9_default: qup-spi9-default { ++ mux { ++ pins = "gpio125", "gpio126", ++ "gpio127", "gpio128"; ++ function = "qup9"; ++ }; ++ ++ config { ++ pins = "gpio125", "gpio126", ++ "gpio127", "gpio128"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi10_default: qup-spi10-default { ++ mux { ++ pins = "gpio129", "gpio130", ++ "gpio131", "gpio132"; ++ function = "qup10"; ++ }; ++ ++ config { ++ pins = "gpio129", "gpio130", ++ "gpio131", "gpio132"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi11_default: qup-spi11-default { ++ mux { ++ pins = "gpio60", "gpio61", ++ "gpio62", "gpio63"; ++ function = "qup11"; ++ }; ++ ++ config { ++ pins = "gpio60", "gpio61", ++ "gpio62", "gpio63"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi12_default: qup-spi12-default { ++ mux { ++ pins = "gpio32", "gpio33", ++ "gpio34", "gpio35"; ++ function = "qup12"; ++ }; ++ ++ config { ++ pins = "gpio32", "gpio33", ++ "gpio34", "gpio35"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi13_default: qup-spi13-default { ++ mux { ++ pins = "gpio36", "gpio37", ++ "gpio38", "gpio39"; ++ function = "qup13"; ++ }; ++ ++ config { ++ pins = "gpio36", "gpio37", ++ "gpio38", "gpio39"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi14_default: qup-spi14-default { ++ mux { ++ pins = "gpio40", "gpio41", ++ "gpio42", "gpio43"; ++ function = "qup14"; ++ }; ++ ++ config { ++ pins = "gpio40", "gpio41", ++ "gpio42", "gpio43"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi15_default: qup-spi15-default { ++ mux { ++ pins = "gpio44", "gpio45", ++ "gpio46", "gpio47"; ++ function = "qup15"; ++ }; ++ ++ config { ++ pins = "gpio44", "gpio45", ++ "gpio46", "gpio47"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi16_default: qup-spi16-default { ++ mux { ++ pins = "gpio48", "gpio49", ++ "gpio50", "gpio51"; ++ function = "qup16"; ++ }; ++ ++ config { ++ pins = "gpio48", "gpio49", ++ "gpio50", "gpio51"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi17_default: qup-spi17-default { ++ mux { ++ pins = "gpio52", "gpio53", ++ "gpio54", "gpio55"; ++ function = "qup17"; ++ }; ++ ++ config { ++ pins = "gpio52", "gpio53", ++ "gpio54", "gpio55"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi18_default: qup-spi18-default { ++ mux { ++ pins = "gpio56", "gpio57", ++ "gpio58", "gpio59"; ++ function = "qup18"; ++ }; ++ ++ config { ++ pins = "gpio56", "gpio57", ++ "gpio58", "gpio59"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; ++ ++ qup_spi19_default: qup-spi19-default { ++ mux { ++ pins = "gpio0", "gpio1", ++ "gpio2", "gpio3"; ++ function = "qup19"; ++ }; ++ ++ config { ++ pins = "gpio0", "gpio1", ++ "gpio2", "gpio3"; ++ drive-strength = <6>; ++ bias-disable; ++ }; ++ }; + }; + + timer@17c20000 { +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch new file mode 100644 index 00000000..1913a6f3 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch @@ -0,0 +1,29 @@ +From 6cdc941e6bf4df72844bd8b0fef2eff65d2c0726 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> +Date: Thu, 4 Jun 2020 00:41:53 +0300 +Subject: [PATCH] arm64: dts: qcom: sm8250: change spmi node label + +PMIC dtsi files (pm8150*.dtsi) expect to have spmi_bus label, rather +than just spmi. Rename spmi label accordingly. + +Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> +--- + arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi +index 1e2862bbfb11..9dd27aecdfda 100644 +--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi +@@ -991,7 +991,7 @@ pdc: interrupt-controller@b220000 { + interrupt-controller; + }; + +- spmi: qcom,spmi@c440000 { ++ spmi_bus: qcom,spmi@c440000 { + compatible = "qcom,spmi-pmic-arb"; + reg = <0x0 0x0c440000 0x0 0x0001100>, + <0x0 0x0c600000 0x0 0x2000000>, +-- +2.27.0 + diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5-enable.patch b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5-enable.patch new file mode 100644 index 00000000..278c9e58 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5-enable.patch @@ -0,0 +1,9 @@ +Index: git/arch/arm64/boot/dts/qcom/Makefile +=================================================================== +--- git.orig/arch/arm64/boot/dts/qcom/Makefile ++++ git/arch/arm64/boot/dts/qcom/Makefile +@@ -26,3 +26,4 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8150-mtp.dt + dtb-$(CONFIG_ARCH_QCOM) += sm8250-mtp.dtb + dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-1000.dtb + dtb-$(CONFIG_ARCH_QCOM) += qcs404-evb-4000.dtb ++dtb-$(CONFIG_ARCH_QCOM) += qrb5165-rb5.dtb diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts new file mode 100644 index 00000000..09003dab --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-5.7/qrb5165-rb5.dts @@ -0,0 +1,760 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2020, Linaro Ltd. + */ + +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h> +#include "sm8250.dtsi" +#include "pm8150.dtsi" +#include "pm8150b.dtsi" +#include "pm8150l.dtsi" + +/ { + model = "Qualcomm Technologies, Inc. Robotics RB5"; + compatible = "qcom,qrb5165-rb5", "qcom,sm8250"; + + aliases { + serial0 = &uart12; + sdhc2 = &sdhc_2; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + dc12v: dc12v-regulator { + compatible = "regulator-fixed"; + regulator-name = "DC12V"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-always-on; + }; + + leds { + compatible = "gpio-leds"; + + user4 { + label = "green:user4"; + gpios = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "panic-indicator"; + default-state = "off"; + }; + + wlan { + label = "yellow:wlan"; + gpios = <&pm8150_gpios 9 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tx"; + default-state = "off"; + }; + + bt { + label = "blue:bt"; + gpios = <&pm8150_gpios 7 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "bluetooth-power"; + default-state = "off"; + }; + + }; + + vbat: vbat-regulator { + compatible = "regulator-fixed"; + regulator-name = "VBAT"; + + vin-supply = <&dc12v>; + regulator-min-microvolt = <4200000>; + regulator-max-microvolt = <4200000>; + regulator-always-on; + }; + + vbat_som: vbat-som-regulator { + compatible = "regulator-fixed"; + regulator-name = "VBAT_SOM"; + + vin-supply = <&dc12v>; + regulator-min-microvolt = <4200000>; + regulator-max-microvolt = <4200000>; + regulator-always-on; + }; + + vdc_3v3: vdc-3v3-regulator { + compatible = "regulator-fixed"; + regulator-name = "VDC_3V3"; + vin-supply = <&dc12v>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdc_5v: vdc-5v-regulator { + compatible = "regulator-fixed"; + regulator-name = "VDC_5V"; + + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <500000>; + regulator-always-on; + vin-supply = <&vreg_l11c_3p3>; + }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + }; + + vreg_s4a_1p8: vreg-s4a-1p8 { + compatible = "regulator-fixed"; + regulator-name = "vreg_s4a_1p8"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + vin-supply = <&vph_pwr>; + }; + + vreg_s6c_0p88: smpc6-regulator { + compatible = "regulator-fixed"; + regulator-name = "vreg_s6c_0p88"; + + regulator-min-microvolt = <752000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + vin-supply = <&vph_pwr>; + }; +}; + +&apps_rsc { + pm8150-rpmh-regulators { + compatible = "qcom,pm8150-rpmh-regulators"; + qcom,pmic-id = "a"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + vdd-l2-l10-supply = <&vreg_bob>; + vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p95>; + vdd-l6-l9-supply = <&vreg_s8c_1p3>; + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_1p9>; + vdd-l13-l16-l17-supply = <&vreg_bob>; + + vreg_s5a_1p9: smps5 { + regulator-name = "vreg_s5a_1p9"; + regulator-min-microvolt = <1904000>; + regulator-max-microvolt = <2000000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_s6a_0p95: smps6 { + regulator-name = "vreg_s6a_0p95"; + regulator-min-microvolt = <920000>; + regulator-max-microvolt = <1128000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l2a_3p1: ldo2 { + regulator-name = "vreg_l2a_3p1"; + regulator-min-microvolt = <3072000>; + regulator-max-microvolt = <3072000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l3a_0p9: ldo3 { + regulator-name = "vreg_l3a_0p9"; + regulator-min-microvolt = <928000>; + regulator-max-microvolt = <932000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l5a_0p875: ldo5 { + regulator-name = "vreg_l5a_0p875"; + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l6a_1p2: ldo6 { + regulator-name = "vreg_l6a_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l7a_1p7: ldo7 { + regulator-name = "vreg_l7a_1p7"; + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l9a_1p2: ldo9 { + regulator-name = "vreg_l9a_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l10a_1p8: ldo10 { + regulator-name = "vreg_l10a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l12a_1p8: ldo12 { + regulator-name = "vreg_l12a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l13a_ts_3p0: ldo13 { + regulator-name = "vreg_l13a_ts_3p0"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l14a_1p8: ldo14 { + regulator-name = "vreg_l14a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1880000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l15a_11ad_io_1p8: ldo15 { + regulator-name = "vreg_l15a_11ad_io_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l16a_2p7: ldo16 { + regulator-name = "vreg_l16a_2p7"; + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l17a_3p0: ldo17 { + regulator-name = "vreg_l17a_3p0"; + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l18a_0p92: ldo18 { + regulator-name = "vreg_l18a_0p92"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <912000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + }; + + pm8150l-rpmh-regulators { + compatible = "qcom,pm8150l-rpmh-regulators"; + qcom,pmic-id = "c"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-l1-l8-supply = <&vreg_s4a_1p8>; + vdd-l2-l3-supply = <&vreg_s8c_1p3>; + vdd-l4-l5-l6-supply = <&vreg_bob>; + vdd-l7-l11-supply = <&vreg_bob>; + vdd-l9-l10-supply = <&vreg_bob>; + vdd-bob-supply = <&vph_pwr>; + + vreg_bob: bob { + regulator-name = "vreg_bob"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <4000000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; + }; + + vreg_s8c_1p3: smps8 { + regulator-name = "vreg_s8c_1p3"; + regulator-min-microvolt = <1352000>; + regulator-max-microvolt = <1352000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l1c_1p8: ldo1 { + regulator-name = "vreg_l1c_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l2c_1p2: ldo2 { + regulator-name = "vreg_l2c_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l3c_0p92: ldo3 { + regulator-name = "vreg_l3c_0p92"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l4c_1p7: ldo4 { + regulator-name = "vreg_l4c_1p7"; + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l5c_1p8: ldo5 { + regulator-name = "vreg_l5c_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l6c_2p9: ldo6 { + regulator-name = "vreg_l6c_2p9"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l7c_cam_vcm0_2p85: ldo7 { + regulator-name = "vreg_l7c_cam_vcm0_2p85"; + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3104000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l8c_1p8: ldo8 { + regulator-name = "vreg_l8c_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l9c_2p9: ldo9 { + regulator-name = "vreg_l9c_2p9"; + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l10c_3p0: ldo10 { + regulator-name = "vreg_l10c_3p0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l11c_3p3: ldo11 { + regulator-name = "vreg_l11c_3p3"; + regulator-min-microvolt = <3296000>; + regulator-max-microvolt = <3296000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + regulator-always-on; + }; + }; + + pm8009-rpmh-regulators { + compatible = "qcom,pm8009-rpmh-regulators"; + qcom,pmic-id = "f"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-l2-supply = <&vreg_s8c_1p3>; + vdd-l5-l6-supply = <&vreg_bob>; + vdd-l7-supply = <&vreg_s4a_1p8>; + + vreg_l1f_cam_dvdd1_1p1: ldo1 { + regulator-name = "vreg_l1f_cam_dvdd1_1p1"; + regulator-min-microvolt = <1104000>; + regulator-max-microvolt = <1104000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l2f_cam_dvdd0_1p2: ldo2 { + regulator-name = "vreg_l2f_cam_dvdd0_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l3f_cam_dvdd2_1p05: ldo3 { + regulator-name = "vreg_l3f_cam_dvdd2_1p05"; + regulator-min-microvolt = <1056000>; + regulator-max-microvolt = <1056000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l5f_cam_avdd0_2p85: ldo5 { + regulator-name = "vreg_l5f_cam_avdd0_2p85"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l6f_cam_avdd1_2p85: ldo6 { + regulator-name = "vreg_l6f_cam_avdd1_2p85"; + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <2856000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l7f_1p8: ldo7 { + regulator-name = "vreg_l7f_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + }; +}; + +/* LS-I2C0 */ +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; +}; + +/* LS-I2C1 */ +&i2c15 { + status = "okay"; +}; + +&pm8150_gpios { + gpio-reserved-ranges = <1 1>, <3 2>, <7 1>; + gpio-line-names = + "NC", + "OPTION2", + "PM_GPIO-F", + "PM_SLP_CLK_IN", + "OPTION1", + "VOL_UP_N", + "PM8250_GPIO7", /* Blue LED */ + "SP_ARI_PWR_ALARM", + "GPIO_9_P", /* Yellow LED */ + "GPIO_10_P"; /* Green LED */ +}; + +&pm8150b_gpios { + gpio-line-names = + "NC", + "NC", + "NC", + "NC", + "HAP_BOOST_EN", /* SOM */ + "SMB_STAT", /* SOM */ + "NC", + "NC", + "SDM_FORCE_USB_BOOT", + "NC", + "NC", + "NC"; +}; + +&pm8150l_gpios { + gpio-line-names = + "NC", + "PM3003A_EN", + "NC", + "NC", + "PM_GPIO5", /* HDMI RST_N */ + "PM_GPIO-A", /* PWM */ + "PM_GPIO7", + "NC", + "NC", + "PM_GPIO-B", + "NC", + "PM3003A_MODE"; +}; + +&qupv3_id_0 { + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qupv3_id_2 { + status = "okay"; +}; + +/* CAN */ +&spi0 { + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <40 4>; + gpio-line-names = + "GPIO-MM", + "GPIO-NN", + "GPIO-OO", + "GPIO-PP", + "GPIO-A", + "GPIO-C", + "GPIO-E", + "GPIO-D", + "I2C0-SDA", + "I2C0-SCL", + "GPIO-TT", /* GPIO_10 */ + "NC", + "GPIO_12_I2C_SDA", + "GPIO_13_I2C_SCL", + "GPIO-X", + "GPIO_15_RGMII_INT", + "HST_BT_UART_CTS", + "HST_BT_UART_RFR", + "HST_BT_UART_TX", + "HST_BT_UART_RX", + "HST_WLAN_EN", /* GPIO_20 */ + "HST_BT_EN", + "GPIO-AAA", + "GPIO-BBB", + "GPIO-CCC", + "GPIO-Z", + "GPIO-DDD", + "GPIO-BB", + "GPIO_28_CAN_SPI_MISO", + "GPIO_29_CAN_SPI_MOSI", + "GPIO_30_CAN_SPI_CLK", /* GPIO_30 */ + "GPIO_31_CAN_SPI_CS", + "GPIO-UU", + "NC", + "UART1_TXD_SOM", + "UART1_RXD_SOM", + "UART0_CTS", + "UART0_RTS", + "UART0_TXD", + "UART0_RXD", + "SPI1_MISO", /* GPIO_40 */ + "SPI1_MOSI", + "SPI1_CLK", + "SPI1_CS", + "I2C1_SDA", + "I2C1_SCL", + "GPIO-F", + "GPIO-JJ", + "Board_ID1", + "Board_ID2", + "NC", /* GPIO_50 */ + "NC", + "SPI0_MISO", + "SPI0_MOSI", + "SPI0_SCLK", + "SPI0_CS", + "GPIO-QQ", + "GPIO-RR", + "USB2LAN_RESET", + "USB2LAN_EXTWAKE", + "NC", /* GPIO_60 */ + "NC", + "NC", + "LT9611_INT", + "GPIO-AA", + "USB_CC_DIR", + "GPIO-G", + "GPIO-LL", + "USB_DP_HPD_1P8", + "NC", + "NC", /* GPIO_70 */ + "SD_CMD", + "SD_DAT3", + "SD_SCLK", + "SD_DAT2", + "SD_DAT1", + "SD_DAT0", /* BOOT_CFG3 */ + "SD_UFS_CARD_DET_N", + "GPIO-II", + "PCIE0_RST_N", + "PCIE0_CLK_REQ_N", /* GPIO_80 */ + "PCIE0_WAKE_N", + "GPIO-CC", + "GPIO-DD", + "GPIO-EE", + "GPIO-FF", + "GPIO-GG", + "GPIO-HH", + "GPIO-VV", + "GPIO-WW", + "NC", /* GPIO_90 */ + "NC", + "GPIO-K", + "GPIO-I", + "CSI0_MCLK", + "CSI1_MCLK", + "CSI2_MCLK", + "CSI3_MCLK", + "GPIO-AA", /* CSI4_MCLK */ + "GPIO-BB", /* CSI5_MCLK */ + "GPIO-KK", /* GPIO_100 */ + "CCI_I2C_SDA0", + "CCI_I2C_SCL0", + "CCI_I2C_SDA1", + "CCI_I2C_SCL1", + "CCI_I2C_SDA2", + "CCI_I2C_SCL2", + "CCI_I2C_SDA3", + "CCI_I2C_SCL3", + "GPIO-L", + "NC", /* GPIO_110 */ + "NC", + "ACCEL_INT", + "GYRO_INT", + "GPIO-J", + "GPIO-YY", + "GPIO-H", + "GPIO-ZZ", + "NC", + "NC", + "NC", /* GPIO_120 */ + "NC", + "MAG_INT", + "MAG_DRDY_INT", + "HST_SW_CTRL", + "GPIO-M", + "GPIO-N", + "GPIO-O", + "GPIO-P", + "PS_INT", + "WSA1_EN", /* GPIO_130 */ + "USB_HUB_RESET", + "SDM_FORCE_USB_BOOT", + "I2S1_CLK_HDMI", + "I2S1_DATA0_HDMI", + "I2S1_WS_HDMI", + "GPIO-B", + "GPIO_137", /* To LT9611_I2S_MCLK_3V3 */ + "PCM_CLK", + "PCM_DI", + "PCM_DO", /* GPIO_140 */ + "PCM_FS", + "HST_SLIM_CLK", + "HST_SLIM_DATA", + "GPIO-U", + "GPIO-Y", + "GPIO-R", + "GPIO-Q", + "GPIO-S", + "GPIO-T", + "GPIO-V", /* GPIO_150 */ + "GPIO-W", + "DMIC_CLK1", + "DMIC_DATA1", + "DMIC_CLK2", + "DMIC_DATA2", + "WSA_SWR_CLK", + "WSA_SWR_DATA", + "DMIC_CLK3", + "DMIC_DATA3", + "I2C4_SDA", /* GPIO_160 */ + "I2C4_SCL", + "SPI3_CS1", + "SPI3_CS2", + "SPI2_MISO_LS3", + "SPI2_MOSI_LS3", + "SPI2_CLK_LS3", + "SPI2_ACCEL_CS_LS3", + "SPI2_CS1", + "NC", + "GPIO-SS", /* GPIO_170 */ + "GPIO-XX", + "SPI3_MISO", + "SPI3_MOSI", + "SPI3_CLK", + "SPI3_CS", + "HST_BLE_SNS_UART_TX", + "HST_BLE_SNS_UART_RX", + "HST_WLAN_UART_TX", + "HST_WLAN_UART_RX"; +}; + +&uart12 { + status = "okay"; +}; + +&ufs_mem_hc { + status = "okay"; + + vcc-supply = <&vreg_l17a_3p0>; + vcc-max-microamp = <800000>; + vccq-supply = <&vreg_l6a_1p2>; + vccq-max-microamp = <800000>; + vccq2-supply = <&vreg_s4a_1p8>; + vccq2-max-microamp = <800000>; +}; + +&ufs_mem_phy { + status = "okay"; + + vdda-phy-supply = <&vreg_l5a_0p875>; + vdda-max-microamp = <89900>; + vdda-pll-supply = <&vreg_l9a_1p2>; + vdda-pll-max-microamp = <18800>; +}; + +&usb_1 { + status = "okay"; +}; + +&usb_1_dwc3 { + dr_mode = "peripheral"; +}; + +&usb_1_hsphy { + status = "okay"; + + vdda-pll-supply = <&vreg_l5a_0p875>; + vdda33-supply = <&vreg_l2a_3p1>; + vdda18-supply = <&vreg_l12a_1p8>; +}; + +&usb_1_qmpphy { + status = "okay"; + + vdda-phy-supply = <&vreg_l9a_1p2>; + vdda-pll-supply = <&vreg_l18a_0p92>; +}; + +&usb_2 { + status = "okay"; +}; + +&usb_2_dwc3 { + dr_mode = "host"; +}; + +&usb_2_hsphy { + status = "okay"; + + vdda-pll-supply = <&vreg_l5a_0p875>; + vdda33-supply = <&vreg_l2a_3p1>; + vdda18-supply = <&vreg_l12a_1p8>; +}; + +&usb_2_qmpphy { + status = "okay"; + + vdda-phy-supply = <&vreg_l9a_1p2>; + vdda-pll-supply = <&vreg_l18a_0p92>; +}; diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb new file mode 100644 index 00000000..82cf263b --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt-dev.bb @@ -0,0 +1,24 @@ +# Copyright (C) 2014-2020 Linaro +# Released under the MIT license (see COPYING.MIT for the terms) +# +# This recipe is disabled by default. +# To enable it add the following line to conf/local.conf: +# PREFERRED_PROVIDER_virtual/kernel = "linux-linaro-qcomlt-dev" + +DESCRIPTION = "Linaro Qualcomm Landing team Integration Kernel ${PV}" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +require recipes-kernel/linux/linux-linaro-qcom.inc +require recipes-kernel/linux/linux-qcom-bootimg.inc + +SRCBRANCH ?= "integration-linux-qcomlt" +SRCREV ?= "${AUTOREV}" + +LINUX_VERSION = "5.8-rc+" +PV = "${LINUX_VERSION}+git${SRCPV}" + +# Wifi firmware has a recognizable arch :( +ERROR_QA_remove = "arch" + +# Disable by default +DEFAULT_PREFERENCE = "-1" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb index 40b202f4..1cc27c72 100644 --- a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_4.14.bb @@ -4,8 +4,6 @@ DESCRIPTION = "Linaro Qualcomm Landing team 4.14 Kernel" LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" -inherit pythonnative - require recipes-kernel/linux/linux-linaro-qcom.inc require recipes-kernel/linux/linux-qcom-bootimg.inc diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.1.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb index 5f915b64..77dfbcde 100644 --- a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.1.bb +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.2.bb @@ -1,19 +1,17 @@ # Copyright (C) 2014-2019 Linaro # Released under the MIT license (see COPYING.MIT for the terms) -DESCRIPTION = "Linaro Qualcomm Landing team 5.1 Kernel" +DESCRIPTION = "Linaro Qualcomm Landing team 5.2 Kernel" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -inherit pythonnative - require recipes-kernel/linux/linux-linaro-qcom.inc require recipes-kernel/linux/linux-qcom-bootimg.inc LOCALVERSION ?= "-linaro-lt-qcom" -SRCBRANCH ?= "release/db845c/qcomlt-5.1" -SRCREV ?= "5f45ef7de008123ffcc5d2433545e97861e19bcf" +SRCBRANCH ?= "release/db845c/qcomlt-5.2" +SRCREV ?= "13e8268d9b5cf3980b6e2766bf00439001c363fd" -COMPATIBLE_MACHINE = "(sdm845)" +COMPATIBLE_MACHINE = "(sdm845|qcs404)" # Wifi firmware has a recognizable arch :( ERROR_QA_remove = "arch" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb new file mode 100644 index 00000000..83074c10 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.4.bb @@ -0,0 +1,17 @@ +# Copyright (C) 2014-2019 Linaro +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Linaro Qualcomm Landing team 5.4 Kernel" +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +require recipes-kernel/linux/linux-linaro-qcom.inc +require recipes-kernel/linux/linux-qcom-bootimg.inc + +LOCALVERSION ?= "-linaro-lt-qcom" +SRCBRANCH ?= "release/qcomlt-5.4" +SRCREV ?= "e2db8e82634bd73bce5ce1e447720756777ca432" + +COMPATIBLE_MACHINE = "(apq8016|apq8096|sdm845)" + +# Wifi firmware has a recognizable arch :( +ERROR_QA_remove = "arch" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb new file mode 100644 index 00000000..cfc879e9 --- /dev/null +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_5.7.bb @@ -0,0 +1,29 @@ +# Copyright (C) 2014-2019 Linaro +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Linaro Qualcomm Landing team 5.7 Kernel" +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" + +inherit python3native + +require recipes-kernel/linux/linux-linaro-qcom.inc +require recipes-kernel/linux/linux-qcom-bootimg.inc + +SRC_URI_append_qrb5165-rb5 = " \ + file://qrb5165-rb5.dts;subdir=git/arch/arm64/boot/dts/qcom \ + file://qrb5165-rb5-enable.patch \ + file://0001-arm64-dts-qcom-sm8250-change-spmi-node-label.patch \ + file://0001-arm64-dts-qcom-sm8250-add-I2C-and-SPI-nodes.patch \ + file://0001-arm64-dts-qcom-sm8250-Add-USB-and-PHY-device-nodes.patch \ + file://0001-arm64-dts-qcom-sm8250-Rename-UART2-node-to-UART12.patch \ + file://0001-arm64-dts-qcom-sm8250-Add-support-for-SDC2.patch \ +" + +LOCALVERSION ?= "-linaro-lt-qcom" +SRCBRANCH ?= "release/qcomlt-5.7" +SRCREV ?= "21bb88052948b35bdce926f301f2ba7970040812" + +COMPATIBLE_MACHINE = "(apq8016|apq8096|sdm845|sm8250)" + +# Wifi firmware has a recognizable arch :( +ERROR_QA_remove = "arch" diff --git a/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc b/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc index 7290f27a..5177feb1 100644 --- a/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc +++ b/bsp/meta-qcom/recipes-kernel/linux/linux-qcom-bootimg.inc @@ -4,12 +4,12 @@ QCOM_BOOTIMG_ROOTFS ?= "undefined" SD_QCOM_BOOTIMG_ROOTFS ?= "undefined" # set output file names -DT_IMAGE_BASE_NAME = "dt-${KERNEL_IMAGE_NAME}" -DT_IMAGE_SYMLINK_NAME = "dt-${KERNEL_IMAGE_LINK_NAME}" BOOT_IMAGE_BASE_NAME = "boot-${KERNEL_IMAGE_NAME}" BOOT_IMAGE_SYMLINK_NAME = "boot-${KERNEL_IMAGE_LINK_NAME}" SD_BOOT_IMAGE_BASE_NAME = "boot-sd${KERNEL_IMAGE_NAME}" SD_BOOT_IMAGE_SYMLINK_NAME = "boot-sd-${KERNEL_IMAGE_LINK_NAME}" +KERNEL_CMDLINE = "root=/dev/${1} rw rootwait console=${ttydev},${baudrate}n8" +KERNEL_CMDLINE_append_dragonboard-845c = " clk_ignore_unused pd_ignore_unused" # param ${1} partition where rootfs is located # param ${2} output boot image file name @@ -17,23 +17,13 @@ priv_make_image() { ${STAGING_BINDIR_NATIVE}/skales/mkbootimg --kernel ${B}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE} \ --ramdisk ${B}/initrd.img \ --output ${DEPLOYDIR}/${2}.img \ - $mkbootimg_dtarg \ --pagesize ${QCOM_BOOTIMG_PAGE_SIZE} \ --base ${QCOM_BOOTIMG_KERNEL_BASE} \ - --cmdline \ - "root=/dev/${1} rw rootwait console=${ttydev},${baudrate}n8" + --cmdline "${KERNEL_CMDLINE}" } do_deploy_append() { - mkbootimg_dtarg="" - if [ "${QCOM_BOOTIMG_BUNDLE_DT}" = "1" ]; then - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${STAGING_LIBDIR_NATIVE}" - ${STAGING_BINDIR_NATIVE}/skales/dtbTool -o ${DEPLOYDIR}/${DT_IMAGE_BASE_NAME}.img -s ${QCOM_BOOTIMG_PAGE_SIZE} ${B}/arch/${ARCH}/boot/dts/qcom/ - mkbootimg_dtarg="--dt ${DEPLOYDIR}/${DT_IMAGE_BASE_NAME}.img" - ln -sf ${DT_IMAGE_BASE_NAME}.img ${DEPLOYDIR}/${DT_IMAGE_SYMLINK_NAME}.img - fi - tmp="${SERIAL_CONSOLES}" baudrate=`echo $tmp | sed 's/\;.*//'` ttydev=`echo $tmp | sed -e 's/^[0-9]*\;//' -e 's/\s.*//' -e 's/\;.*//'` diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch new file mode 100644 index 00000000..d8bd3a36 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch @@ -0,0 +1,123 @@ +From 816bd950c67f114068761cb311a8185cd2c3f6dd Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Date: Mon, 1 Jun 2020 15:12:57 +0100 +Subject: [PATCH 1/4] ucm2: codecs: wcd934x: Add Codec sequences. + +Add WCD934x codec sequences to be used by other platforms like DB845c +and Lenovo YOGA C630 + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +--- + ucm2/codecs/wcd934x/DefaultDisableSeq.conf | 5 +++++ + ucm2/codecs/wcd934x/DefaultEnableSeq.conf | 14 ++++++++++++++ + ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf | 6 ++++++ + ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf | 6 ++++++ + ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf | 2 ++ + ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf | 3 +++ + ucm2/codecs/wcd934x/SpeakerDisableSeq.conf | 4 ++++ + ucm2/codecs/wcd934x/SpeakerEnableSeq.conf | 4 ++++ + 8 files changed, 44 insertions(+) + create mode 100644 ucm2/codecs/wcd934x/DefaultDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/DefaultEnableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/SpeakerDisableSeq.conf + create mode 100644 ucm2/codecs/wcd934x/SpeakerEnableSeq.conf + +diff --git a/ucm2/codecs/wcd934x/DefaultDisableSeq.conf b/ucm2/codecs/wcd934x/DefaultDisableSeq.conf +new file mode 100644 +index 0000000..88d82a3 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/DefaultDisableSeq.conf +@@ -0,0 +1,5 @@ ++cset "name='RX INT7_1 MIX1 INP0' ZERO" ++cset "name='RX INT8_1 MIX1 INP0' ZERO" ++cset "name='RX INT1_2 MUX' ZERO" ++cset "name='RX INT2_2 MUX' ZERO" ++cset "name='CDC_IF TX0 MUX' ZERO" +diff --git a/ucm2/codecs/wcd934x/DefaultEnableSeq.conf b/ucm2/codecs/wcd934x/DefaultEnableSeq.conf +new file mode 100644 +index 0000000..e5bdbbd +--- /dev/null ++++ b/ucm2/codecs/wcd934x/DefaultEnableSeq.conf +@@ -0,0 +1,14 @@ ++cset "name='SLIM RX1 MUX' AIF1_PB" ++cset "name='SLIM RX2 MUX' AIF1_PB" ++cset "name='SLIM RX6 MUX' ZERO" ++cset "name='SLIM RX7 MUX' ZERO" ++cset "name='SLIM RX3 MUX' ZERO" ++cset "name='SLIM RX4 MUX' ZERO" ++cset "name='SLIM RX5 MUX' ZERO" ++cset "name='AIF1_CAP Mixer SLIM TX0' 1" ++ ++cset "name='RX INT7_1 MIX1 INP0' RX1" ++cset "name='RX INT8_1 MIX1 INP0' RX2" ++cset "name='RX INT1_2 MUX' RX1" ++cset "name='RX INT2_2 MUX' RX2" ++cset "name='CDC_IF TX0 MUX' DEC0" +diff --git a/ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf +new file mode 100644 +index 0000000..0206e87 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneDisableSeq.conf +@@ -0,0 +1,6 @@ ++cset "name='COMP1 Switch' 0" ++cset "name='COMP2 Switch' 0" ++cset "name='RX1 Digital Volume' 0" ++cset "name='RX2 Digital Volume' 0" ++cset "name='RX INT1 DEM MUX' ZERO" ++cset "name='RX INT2 DEM MUX' ZERO" +diff --git a/ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf +new file mode 100644 +index 0000000..5ce7950 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneEnableSeq.conf +@@ -0,0 +1,6 @@ ++cset "name='COMP1 Switch' 1" ++cset "name='COMP2 Switch' 1" ++cset "name='RX INT1 DEM MUX' CLSH_DSM_OUT" ++cset "name='RX INT2 DEM MUX' CLSH_DSM_OUT" ++cset "name='RX1 Digital Volume' 68" ++cset "name='RX2 Digital Volume' 68" +diff --git a/ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf +new file mode 100644 +index 0000000..5558446 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneMicDisableSeq.conf +@@ -0,0 +1,2 @@ ++cset "name='AMIC MUX0' ZERO" ++cset "name='ADC2 Volume' 0" +diff --git a/ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf b/ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf +new file mode 100644 +index 0000000..ad43830 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/HeadphoneMicEnableSeq.conf +@@ -0,0 +1,3 @@ ++cset "name='AMIC MUX0' ADC2" ++cset "name='ADC2 Volume' 12" ++cset "name='ADC MUX0' AMIC" +diff --git a/ucm2/codecs/wcd934x/SpeakerDisableSeq.conf b/ucm2/codecs/wcd934x/SpeakerDisableSeq.conf +new file mode 100644 +index 0000000..3c977c8 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/SpeakerDisableSeq.conf +@@ -0,0 +1,4 @@ ++cset "name='RX7 Digital Volume' 0" ++cset "name='RX8 Digital Volume' 0" ++cset "name='COMP7 Switch' 0" ++cset "name='COMP8 Switch' 0" +diff --git a/ucm2/codecs/wcd934x/SpeakerEnableSeq.conf b/ucm2/codecs/wcd934x/SpeakerEnableSeq.conf +new file mode 100644 +index 0000000..2d9a3d8 +--- /dev/null ++++ b/ucm2/codecs/wcd934x/SpeakerEnableSeq.conf +@@ -0,0 +1,4 @@ ++cset "name='COMP7 Switch' 1" ++cset "name='COMP8 Switch' 1" ++cset "name='RX7 Digital Volume' 80" ++cset "name='RX8 Digital Volume' 80" +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-codecs-wsa881x-add-codec-sequences.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-codecs-wsa881x-add-codec-sequences.patch new file mode 100644 index 00000000..6bdeeb96 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0002-ucm2-codecs-wsa881x-add-codec-sequences.patch @@ -0,0 +1,64 @@ +From 81689f1b4b8b511cc51a7dee4a3151b6fcb8cd2c Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Date: Mon, 1 Jun 2020 15:12:58 +0100 +Subject: [PATCH 2/4] ucm2: codecs: wsa881x: add codec sequences + +Add default, enable/disable codec sequence for wsa881x codec + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +--- + ucm2/codecs/wsa881x/DefaultEnableSeq.conf | 8 ++++++++ + ucm2/codecs/wsa881x/SpeakerDisableSeq.conf | 8 ++++++++ + ucm2/codecs/wsa881x/SpeakerEnableSeq.conf | 10 ++++++++++ + 3 files changed, 26 insertions(+) + create mode 100644 ucm2/codecs/wsa881x/DefaultEnableSeq.conf + create mode 100644 ucm2/codecs/wsa881x/SpeakerDisableSeq.conf + create mode 100644 ucm2/codecs/wsa881x/SpeakerEnableSeq.conf + +diff --git a/ucm2/codecs/wsa881x/DefaultEnableSeq.conf b/ucm2/codecs/wsa881x/DefaultEnableSeq.conf +new file mode 100644 +index 0000000..499342b +--- /dev/null ++++ b/ucm2/codecs/wsa881x/DefaultEnableSeq.conf +@@ -0,0 +1,8 @@ ++cset "name='SpkrLeft COMP Switch' 1" ++cset "name='SpkrLeft BOOST Switch' 1" ++cset "name='SpkrLeft DAC Switch' 1" ++cset "name='SpkrLeft VISENSE Switch' 0" ++cset "name='SpkrRight COMP Switch' 1" ++cset "name='SpkrRight BOOST Switch' 1" ++cset "name='SpkrRight DAC Switch' 1" ++cset "name='SpkrRight VISENSE Switch' 0" +diff --git a/ucm2/codecs/wsa881x/SpeakerDisableSeq.conf b/ucm2/codecs/wsa881x/SpeakerDisableSeq.conf +new file mode 100644 +index 0000000..9614422 +--- /dev/null ++++ b/ucm2/codecs/wsa881x/SpeakerDisableSeq.conf +@@ -0,0 +1,8 @@ ++cset "name='SpkrLeft COMP Switch' 0" ++cset "name='SpkrLeft BOOST Switch' 0" ++cset "name='SpkrLeft DAC Switch' 0" ++cset "name='SpkrLeft VISENSE Switch' 0" ++cset "name='SpkrRight COMP Switch' 0" ++cset "name='SpkrRight BOOST Switch' 0" ++cset "name='SpkrRight DAC Switch' 0" ++cset "name='SpkrRight VISENSE Switch' 0" +diff --git a/ucm2/codecs/wsa881x/SpeakerEnableSeq.conf b/ucm2/codecs/wsa881x/SpeakerEnableSeq.conf +new file mode 100644 +index 0000000..31c27f3 +--- /dev/null ++++ b/ucm2/codecs/wsa881x/SpeakerEnableSeq.conf +@@ -0,0 +1,10 @@ ++cset "name='SpkrLeft COMP Switch' 1" ++cset "name='SpkrLeft BOOST Switch' 1" ++cset "name='SpkrLeft DAC Switch' 1" ++cset "name='SpkrLeft VISENSE Switch' 0" ++cset "name='SpkrLeft PA Volume' 12" ++cset "name='SpkrRight COMP Switch' 1" ++cset "name='SpkrRight BOOST Switch' 1" ++cset "name='SpkrRight DAC Switch' 1" ++cset "name='SpkrRight VISENSE Switch' 0" ++cset "name='SpkrRight PA Volume' 12" +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch new file mode 100644 index 00000000..caa67419 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch @@ -0,0 +1,129 @@ +From b225c35639a76b07f90c4bc310b9d4c057d8ae42 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Date: Mon, 1 Jun 2020 15:12:59 +0100 +Subject: [PATCH 3/4] ucm2: DB845c: Add ucm for DB845c board + +DB845c board by default has two WSA881x speakers and HDMI +audio connections. + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +--- + ucm2/DB845c/DB845c.conf | 11 ++++++++++ + ucm2/DB845c/HDMI.conf | 33 +++++++++++++++++++++++++++++ + ucm2/DB845c/HiFi.conf | 46 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 90 insertions(+) + create mode 100644 ucm2/DB845c/DB845c.conf + create mode 100644 ucm2/DB845c/HDMI.conf + create mode 100644 ucm2/DB845c/HiFi.conf + +diff --git a/ucm2/DB845c/DB845c.conf b/ucm2/DB845c/DB845c.conf +new file mode 100644 +index 0000000..bfd1ee5 +--- /dev/null ++++ b/ucm2/DB845c/DB845c.conf +@@ -0,0 +1,11 @@ ++Syntax 2 ++ ++SectionUseCase."HiFi" { ++ File "HiFi.conf" ++ Comment "HiFi quality Music." ++} ++ ++SectionUseCase."HDMI" { ++ File "HDMI.conf" ++ Comment "HDMI output." ++} +diff --git a/ucm2/DB845c/HDMI.conf b/ucm2/DB845c/HDMI.conf +new file mode 100644 +index 0000000..fe1045c +--- /dev/null ++++ b/ucm2/DB845c/HDMI.conf +@@ -0,0 +1,33 @@ ++# Use case configuration for DB845c board. ++# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> ++ ++SectionVerb { ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 1" ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 0" ++ ] ++ Value { ++ TQ "HiFi" ++ PlaybackPCM "hw:${CardId}" ++ } ++} ++ ++SectionDevice."HDMI-stereo" { ++ #Name "HDMI-stereo" ++ Comment "HDMI Digital Stereo Output" ++ ++ EnableSequence [ ++ ] ++ ++ DisableSequence [ ++ ] ++ ++ Value { ++ PlaybackPriority 200 ++ } ++} +diff --git a/ucm2/DB845c/HiFi.conf b/ucm2/DB845c/HiFi.conf +new file mode 100644 +index 0000000..f88e8ec +--- /dev/null ++++ b/ucm2/DB845c/HiFi.conf +@@ -0,0 +1,46 @@ ++# Use case configuration for DB845c. ++# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> ++ ++SectionVerb { ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 1" ++ ++ <codecs/wcd934x/DefaultEnableSeq.conf> ++ <codecs/wsa881x/DefaultEnableSeq.conf> ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wcd934x/DefaultDisableSeq.conf> ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 0" ++ ] ++ ++ Value { ++ TQ "HiFi" ++ } ++} ++ ++SectionDevice."Speaker" { ++ Comment "Speaker playback" ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wcd934x/SpeakerEnableSeq.conf> ++ <codecs/wsa881x/SpeakerEnableSeq.conf> ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wsa881x/SpeakerDisableSeq.conf> ++ <codecs/wcd934x/SpeakerDisableSeq.conf> ++ ] ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId},1" ++ PlaybackVolume "RX1 Digital Volume" ++ PlaybackVolume "RX2 Digital Volume" ++ } ++} +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch new file mode 100644 index 00000000..c415af73 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch @@ -0,0 +1,135 @@ +From 0c817e5a484960787d4cf46ba18cfcbca40ff8b2 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Date: Mon, 1 Jun 2020 15:13:00 +0100 +Subject: [PATCH 4/4] ucm2: Add ucm for Lenovo-YOGA-C630-13Q50 laptop + +This laptop has by 2 WSA Smart speakers over Soundwire and 3.5mm +headset audio connection. + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +--- + ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf | 98 +++++++++++++++++++ + .../Lenovo-YOGA-C630-13Q50.conf | 6 ++ + 2 files changed, 104 insertions(+) + create mode 100644 ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf + create mode 100644 ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf + +diff --git a/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +new file mode 100644 +index 0000000..0bd68f0 +--- /dev/null ++++ b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +@@ -0,0 +1,98 @@ ++# Use case configuration for LenovoYOGAC6301. ++# Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> ++ ++SectionVerb { ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1" ++ cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 1" ++ ++ <codecs/wcd934x/DefaultEnableSeq.conf> ++ <codecs/wsa881x/DefaultEnableSeq.conf> ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wcd934x/DefaultDisableSeq.conf> ++ cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 0" ++ cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 0" ++ ] ++ ++ Value { ++ TQ "HiFi" ++ } ++} ++ ++SectionDevice."Speaker" { ++ Comment "Speaker playback" ++ ++ ConflictingDevice [ ++ "Headphones" ++ ] ++ ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wcd934x/SpeakerEnableSeq.conf> ++ <codecs/wsa881x/SpeakerEnableSeq.conf> ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wsa881x/SpeakerDisableSeq.conf> ++ <codecs/wcd934x/SpeakerDisableSeq.conf> ++ ] ++ ++ Value { ++ PlaybackPriority 100 ++ PlaybackPCM "hw:${CardId}" ++ PlaybackVolume "RX7 Digital Volume" ++ PlaybackVolume "RX8 Digital Volume" ++ } ++} ++ ++SectionDevice."Headphones" { ++ Comment "Headphones playback" ++ ++ ConflictingDevice [ ++ "Speaker" ++ ] ++ ++ EnableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wcd934x/HeadphoneEnableSeq.conf> ++ ] ++ ++ DisableSequence [ ++ cdev "hw:${CardId}" ++ <codecs/wcd934x/HeadphoneDisableSeq.conf> ++ ] ++ ++ Value { ++ PlaybackPriority 200 ++ PlaybackPCM "hw:${CardId}" ++ PlaybackVolume "RX1 Digital Volume" ++ PlaybackVolume "RX2 Digital Volume" ++ } ++} ++ ++SectionDevice."Mic" { ++ Comment "Mic" ++ ++ EnableSequence [ ++ <codecs/wcd934x/HeadphoneMicEnableSeq.conf> ++ ] ++ ++ DisableSequence [ ++ <codecs/wcd934x/HeadphoneMicDisableSeq.conf> ++ cset "name='AMIC MUX0' ZERO" ++ cset "name='ADC2 Volume' 0" ++ ] ++ ++ Value { ++ CapturePriority 100 ++ CapturePCM "hw:${CardId},1" ++ CaptureVolume "ADC2 Volume" ++ } ++} +diff --git a/ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf b/ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf +new file mode 100644 +index 0000000..114466a +--- /dev/null ++++ b/ucm2/Lenovo-YOGA-C630-13Q50/Lenovo-YOGA-C630-13Q50.conf +@@ -0,0 +1,6 @@ ++Syntax 2 ++ ++SectionUseCase."HiFi" { ++ File "HiFi.conf" ++ Comment "HiFi Music." ++} +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch new file mode 100644 index 00000000..56682a38 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch @@ -0,0 +1,61 @@ +From 9353445dab6c863dd031161fa37009e4bba31821 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Date: Mon, 1 Jun 2020 17:20:26 +0100 +Subject: [PATCH 5/6] ucm2: Lenovo-YOGA-C630: remove cdev which is already + present in ucm2 + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +--- + ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +index 0bd68f0..39e91f4 100644 +--- a/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf ++++ b/ucm2/Lenovo-YOGA-C630-13Q50/HiFi.conf +@@ -4,7 +4,6 @@ + SectionVerb { + + EnableSequence [ +- cdev "hw:${CardId}" + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1" + cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 1" + +@@ -13,7 +12,6 @@ SectionVerb { + ] + + DisableSequence [ +- cdev "hw:${CardId}" + <codecs/wcd934x/DefaultDisableSeq.conf> + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 0" + cset "name='MultiMedia2 Mixer SLIMBUS_0_TX' 0" +@@ -33,13 +31,11 @@ SectionDevice."Speaker" { + + + EnableSequence [ +- cdev "hw:${CardId}" + <codecs/wcd934x/SpeakerEnableSeq.conf> + <codecs/wsa881x/SpeakerEnableSeq.conf> + ] + + DisableSequence [ +- cdev "hw:${CardId}" + <codecs/wsa881x/SpeakerDisableSeq.conf> + <codecs/wcd934x/SpeakerDisableSeq.conf> + ] +@@ -60,12 +56,10 @@ SectionDevice."Headphones" { + ] + + EnableSequence [ +- cdev "hw:${CardId}" + <codecs/wcd934x/HeadphoneEnableSeq.conf> + ] + + DisableSequence [ +- cdev "hw:${CardId}" + <codecs/wcd934x/HeadphoneDisableSeq.conf> + ] + +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch new file mode 100644 index 00000000..6ed85d4b --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch @@ -0,0 +1,66 @@ +From 604914c07ffb10946711c2e5ca95d3a9bb6ad399 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Date: Mon, 1 Jun 2020 17:20:25 +0100 +Subject: [PATCH 6/6] ucm2: DB845c: remove cdev which is already present in + ucm2 + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +--- + ucm2/DB845c/HDMI.conf | 2 -- + ucm2/DB845c/HiFi.conf | 4 ---- + 2 files changed, 6 deletions(-) + +diff --git a/ucm2/DB845c/HDMI.conf b/ucm2/DB845c/HDMI.conf +index fe1045c..5a0a933 100644 +--- a/ucm2/DB845c/HDMI.conf ++++ b/ucm2/DB845c/HDMI.conf +@@ -3,12 +3,10 @@ + + SectionVerb { + EnableSequence [ +- cdev "hw:${CardId}" + cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 1" + ] + + DisableSequence [ +- cdev "hw:${CardId}" + cset "name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 0" + ] + Value { +diff --git a/ucm2/DB845c/HiFi.conf b/ucm2/DB845c/HiFi.conf +index f88e8ec..ef7c341 100644 +--- a/ucm2/DB845c/HiFi.conf ++++ b/ucm2/DB845c/HiFi.conf +@@ -4,7 +4,6 @@ + SectionVerb { + + EnableSequence [ +- cdev "hw:${CardId}" + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 1" + + <codecs/wcd934x/DefaultEnableSeq.conf> +@@ -12,7 +11,6 @@ SectionVerb { + ] + + DisableSequence [ +- cdev "hw:${CardId}" + <codecs/wcd934x/DefaultDisableSeq.conf> + cset "name='SLIMBUS_0_RX Audio Mixer MultiMedia2' 0" + ] +@@ -26,13 +24,11 @@ SectionDevice."Speaker" { + Comment "Speaker playback" + + EnableSequence [ +- cdev "hw:${CardId}" + <codecs/wcd934x/SpeakerEnableSeq.conf> + <codecs/wsa881x/SpeakerEnableSeq.conf> + ] + + DisableSequence [ +- cdev "hw:${CardId}" + <codecs/wsa881x/SpeakerDisableSeq.conf> + <codecs/wcd934x/SpeakerDisableSeq.conf> + ] +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch new file mode 100644 index 00000000..b148078a --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch @@ -0,0 +1,33 @@ +From 1448e9df35c7773e197c868a9463e9edfc7b1998 Mon Sep 17 00:00:00 2001 +From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +Date: Tue, 2 Jun 2020 10:23:54 +0100 +Subject: [PATCH 7/7] ucm2: DB845c: HDMI: update cdev to correct value + +Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> +--- + ucm2/DB845c/HDMI.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ucm2/DB845c/HDMI.conf b/ucm2/DB845c/HDMI.conf +index 5a0a933..c233cef 100644 +--- a/ucm2/DB845c/HDMI.conf ++++ b/ucm2/DB845c/HDMI.conf +@@ -11,7 +11,6 @@ SectionVerb { + ] + Value { + TQ "HiFi" +- PlaybackPCM "hw:${CardId}" + } + } + +@@ -26,6 +25,7 @@ SectionDevice."HDMI-stereo" { + ] + + Value { ++ PlaybackPCM "hw:${CardId},0" + PlaybackPriority 200 + } + } +-- +2.27.0.rc0 + diff --git a/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend new file mode 100644 index 00000000..0c346e47 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf_1.2.%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append_sdm845 = " \ + file://0001-ucm2-codecs-wcd934x-Add-Codec-sequences.patch \ + file://0002-ucm2-codecs-wsa881x-add-codec-sequences.patch \ + file://0003-ucm2-DB845c-Add-ucm-for-DB845c-board.patch \ + file://0004-ucm2-Add-ucm-for-Lenovo-YOGA-C630-13Q50-laptop.patch \ + file://0005-ucm2-Lenovo-YOGA-C630-remove-cdev-which-is-already-p.patch \ + file://0006-ucm2-DB845c-remove-cdev-which-is-already-present-in-.patch \ + file://0007-ucm2-DB845c-HDMI-update-cdev-to-correct-value.patch \ +" diff --git a/bsp/meta-qcom/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/bsp/meta-qcom/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend new file mode 100644 index 00000000..44a86ff9 --- /dev/null +++ b/bsp/meta-qcom/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -0,0 +1,3 @@ +do_install_append() { + sed -i "s|^load-module module-udev-detect|load-module module-udev-detect tsched=0|" ${D}${sysconfdir}/pulse/default.pa +} diff --git a/bsp/meta-qcom/recipes-support/fastrpc/fastrpc_git.bb b/bsp/meta-qcom/recipes-support/fastrpc/fastrpc_git.bb new file mode 100644 index 00000000..3aa67a79 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/fastrpc/fastrpc_git.bb @@ -0,0 +1,15 @@ +HOMEPAGE = "https://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git" +SUMMARY = "Qualcomm FastRPC applications and library" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://src/fastrpc_apps_user.c;beginline=1;endline=29;md5=f94f3a7beba14ae2f59f817e9634f891" + +SRCREV = "388d868b3146fa7ccbeb6aa8c71485ebbbf5e1b9" +SRC_URI = "git://git.linaro.org/landing-teams/working/qualcomm/fastrpc.git;branch=automake;protocol=https" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +inherit autotools diff --git a/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 00000000..de3fea87 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper/0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,29 @@ +From 874dadf1168f8a1b2b1bd4ab5bb4a20097147ab0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 28 May 2020 08:01:37 -0700 +Subject: [PATCH] pd-mapper: Include limits.h for PATH_MAX + +Fixes +pd-mapper.c:199:22: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'AF_MAX'? + +Upstream-Status: Submitted [https://github.com/andersson/pd-mapper/pull/4] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + pd-mapper.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pd-mapper.c b/pd-mapper.c +index 45177ae..f5d45ee 100644 +--- a/pd-mapper.c ++++ b/pd-mapper.c +@@ -36,6 +36,7 @@ + #include <fcntl.h> + #include <libgen.h> + #include <libqrtr.h> ++#include <limits.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-- +2.26.2 + diff --git a/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper_git.bb b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper_git.bb new file mode 100644 index 00000000..9e5ca116 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/pd-mapper/pd-mapper_git.bb @@ -0,0 +1,28 @@ +SUMMARY = "Qualcomm pd-mapper application" +HOMEPAGE = "https://github.com/andersson/pd-mapper.git" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c5d4ab97bca4e843c5afdbf78aa5fdee" + +DEPENDS = "qrtr" + +inherit systemd + +SRCREV = "ab5074fdd5e4130578aa4c99b00d44527a79636f" +SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \ + file://0001-pd-mapper-Include-limits.h-for-PATH_MAX.patch \ +" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "prefix=${prefix} bindir=${bindir} libdir=${libdir} includedir=${includedir} LDFLAGS='${LDFLAGS} -Wl,-lqrtr'" + +do_install () { + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system +} + +SYSTEMD_SERVICE_${PN} = "pd-mapper.service" +RDEPENDS_${PN} += "qrtr" diff --git a/bsp/meta-qcom/recipes-support/qrtr/files/qrtr.service b/bsp/meta-qcom/recipes-support/qrtr/files/qrtr.service deleted file mode 100644 index e2f1952a..00000000 --- a/bsp/meta-qcom/recipes-support/qrtr/files/qrtr.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=QRTR service -After=systemd-remount-fs.service - -[Service] -ExecStartPre=/usr/bin/qrtr-cfg 1 -ExecStart=/usr/bin/qrtr-ns -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target diff --git a/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb b/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb index e5e74636..51c342b0 100644 --- a/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb +++ b/bsp/meta-qcom/recipes-support/qrtr/qrtr_git.bb @@ -7,9 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=15329706fbfcb5fc5edcc1bc7c139da5" inherit systemd -SRCREV = "a1694a1c938fdcd047553841370ebe2cd7384299" +SRCREV = "7bd5cf302437755b0d741c9dc1805395a9654597" SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https" -SRC_URI += "file://qrtr.service" PV = "0.0+${SRCPV}" @@ -18,14 +17,7 @@ S = "${WORKDIR}/git" EXTRA_OEMAKE = "prefix=${prefix} bindir=${bindir} libdir=${libdir} includedir=${includedir} LDFLAGS='${LDFLAGS}'" do_install () { - oe_runmake install DESTDIR=${D} - - sed -i -e s:/usr/bin:${bindir}:g ${WORKDIR}/qrtr.service - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/qrtr.service ${D}${systemd_unitdir}/system + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system } -SYSTEMD_SERVICE_${PN} = "qrtr.service" - -PACKAGES =+ "qrtr-apps" -FILES_qrtr-apps = "${bindir}/*" +SYSTEMD_SERVICE_${PN} = "qrtr-ns.service" diff --git a/bsp/meta-qcom/recipes-support/rmtfs/files/rmtfs.service b/bsp/meta-qcom/recipes-support/rmtfs/files/rmtfs.service deleted file mode 100644 index 2002fd6d..00000000 --- a/bsp/meta-qcom/recipes-support/rmtfs/files/rmtfs.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=RMTFS setup -After=systemd-remount-fs.service qrtr.service -Requires=qrtr.service - -[Service] -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fs1 ] && dd if=/dev/zero of=/boot/modem_fs1 bs=1M count=2 || :" -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fs2 ] && dd if=/dev/zero of=/boot/modem_fs2 bs=1M count=2 || :" -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fsc ] && dd if=/dev/zero of=/boot/modem_fsc bs=1M count=2 || :" -ExecStartPre=/bin/sh -c "[ ! -f /boot/modem_fsg ] && dd if=/dev/zero of=/boot/modem_fsg bs=1M count=2 || :" -ExecStart=/usr/bin/rmtfs -v -ExecStartPost=/bin/sh -c "[ -d /sys/bus/platform/devices/*.hexagon ] && modprobe qcom_q6v5_pil" - -[Install] -WantedBy=multi-user.target diff --git a/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb b/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb index 2e79bc04..86553467 100644 --- a/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb +++ b/bsp/meta-qcom/recipes-support/rmtfs/rmtfs_git.bb @@ -7,23 +7,18 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ca25dbf5ebfc1a058bfc657c895aac2f" inherit systemd -SRCREV = "0d3c49ec5aa27517afec9f18a3afc4b0800e6cbb" +SRCREV = "dfb8f3ed1c8fbde621cd08aaf9e7724a4c55cbd1" SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https" -SRC_URI += "file://rmtfs.service" DEPENDS = "qmic-native qrtr udev" PV = "0.0+${SRCPV}" S = "${WORKDIR}/git" -EXTRA_OEMAKE = "'LDFLAGS=${TARGET_LDFLAGS} -L${STAGING_LIBDIR} -lqrtr -ludev'" +EXTRA_OEMAKE = "'LDFLAGS=${TARGET_LDFLAGS} -L${STAGING_LIBDIR} -lqrtr -ludev -lpthread'" do_install () { - oe_runmake install DESTDIR=${D} prefix=${prefix} - - sed -i -e s:/usr/bin:${bindir}:g ${WORKDIR}/rmtfs.service - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/rmtfs.service ${D}${systemd_unitdir}/system + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system } SYSTEMD_SERVICE_${PN} = "rmtfs.service" diff --git a/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv/0001-include-limits.h-for-PATH_MAX.patch b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv/0001-include-limits.h-for-PATH_MAX.patch new file mode 100644 index 00000000..5a58c586 --- /dev/null +++ b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv/0001-include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,25 @@ +From c21250e08cc5e6815340244693437e6372b5eca4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 29 Nov 2019 17:52:33 -0800 +Subject: [PATCH] include limits.h for PATH_MAX + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + translate.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/translate.c b/translate.c +index 34c419e..e95dee5 100644 +--- a/translate.c ++++ b/translate.c +@@ -35,6 +35,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <libgen.h> ++#include <limits.h> + #include <stdio.h> + #include <string.h> + #include <unistd.h> +-- +2.24.0 + diff --git a/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv_git.bb b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv_git.bb new file mode 100644 index 00000000..8973434b --- /dev/null +++ b/bsp/meta-qcom/recipes-support/tqftpserv/tqftpserv_git.bb @@ -0,0 +1,28 @@ +SUMMARY = "Qualcomm tqftpserv application" +HOMEPAGE = "https://github.com/andersson/tqftpserv.git" +SECTION = "devel" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=424e013ed97b36284f3b9ce27bb16a56" + +DEPENDS = "qrtr" + +inherit systemd + +SRCREV = "fe53d2a810abe0e1ee7cc0bb20fd520dc6605ecb" +SRC_URI = "git://github.com/andersson/${BPN}.git;branch=master;protocol=https \ + file://0001-include-limits.h-for-PATH_MAX.patch \ +" + +PV = "0.0+${SRCPV}" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "prefix=${prefix} bindir=${bindir} libdir=${libdir} includedir=${includedir} LDFLAGS='${LDFLAGS} -Wl,-lqrtr'" + +do_install () { + oe_runmake install DESTDIR=${D} prefix=${prefix} servicedir=${systemd_unitdir}/system +} + +SYSTEMD_SERVICE_${PN} = "tqftpserv.service" +RDEPENDS_${PN} += "qrtr" diff --git a/bsp/meta-qcom/recipes-test/diag/diag_git.bb b/bsp/meta-qcom/recipes-test/diag/diag_git.bb index 3fa45293..a0e90233 100644 --- a/bsp/meta-qcom/recipes-test/diag/diag_git.bb +++ b/bsp/meta-qcom/recipes-test/diag/diag_git.bb @@ -7,7 +7,7 @@ SRC_URI = "git://github.com/andersson/diag.git;protocol=https \ " PV = "0.0+git${SRCPV}" -SRCREV = "5ef6b6b0c50047be3dd456d91d9a6dd730ba99e2" +SRCREV = "cc5dc0dec3f584d4a500fa36b983e6e77a98e478" S = "${WORKDIR}/git" diff --git a/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb b/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb index 83ef315b..8497ec5a 100644 --- a/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb +++ b/bsp/meta-qcom/recipes-test/images/initramfs-test-image.bb @@ -2,20 +2,28 @@ DESCRIPTION = "Small ramdisk image for running tests (bootrr, etc)" PACKAGE_INSTALL = " \ ${ROOTFS_BOOTSTRAP_INSTALL} \ + bluez5 \ busybox \ base-passwd \ - devmem2 \ + dhcp-client \ diag \ + e2fsprogs \ + e2fsprogs-e2fsck \ + e2fsprogs-mke2fs \ + e2fsprogs-resize2fs \ + e2fsprogs-tune2fs \ ethtool \ gptfdisk \ - iperf2 \ - iperf3 \ lava-test-shell \ packagegroup-core-boot \ - qrtr-apps \ + pciutils \ + pd-mapper \ + qrtr \ rmtfs \ - tcpdump \ + tqftpserv \ udev \ + usbutils \ + wpa-supplicant \ " # Do not pollute the initrd image with rootfs features |