From 1ea6ddacc2d8b32ddbdb11cd5ceff3f2dbca0bfc Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 7 Apr 2024 11:49:53 +0200 Subject: [PATCH 01/11] nu801: update PKG_MIRROR_HASH to zst When using zst instead of xz, the hash changes. This was missed in the initial treewide updated. Fixes: b3c1c57a35a0 ("treewide: update PKG_MIRROR_HASH to zst") Signed-off-by: Robert Marko --- package/system/gpio-cdev/nu801/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/system/gpio-cdev/nu801/Makefile b/package/system/gpio-cdev/nu801/Makefile index 3c0b4f2086..82c04ccb41 100644 --- a/package/system/gpio-cdev/nu801/Makefile +++ b/package/system/gpio-cdev/nu801/Makefile @@ -8,7 +8,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/chunkeey/nu801.git PKG_SOURCE_VERSION:=f623879a393d0315f29095fe46b19cd2246d10d7 -PKG_MIRROR_HASH:=d2080fa74901fcd9c2576784adaa84792b577167576a45326b478192cb157eba +PKG_MIRROR_HASH:=8bf2de78e078b7305178577530ff51e7373f94d39629653ea7efc8e485d0fdbd PKG_MAINTAINER:=Christian Lamparter PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=LICENSE From 153c9f348270bf6fb727abf96726c082a7d41aa7 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sat, 6 Apr 2024 23:08:03 +0200 Subject: [PATCH 02/11] generic: 6.6: backport arm64 swiotlb default size reduction Kernel 6.6 added dynamic SWIOTLB allocation, but with it also started allocating 64MB of the SWIOTLB bounce buffer by default which is quite a lot of memory on most OpenWrt devices. Luckily in kernel 6.7 arm64 received an optimization that reduces that default size to 1MB per 1GB of RAM if certain criteria was met. So in order to reclaim back 63MB of RAM which brought some ipq807x devices close to OOM under load lets backport the upstream commit. Signed-off-by: Robert Marko --- ...duce-the-default-size-if-no-ZONE_DMA.patch | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch diff --git a/target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch b/target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch new file mode 100644 index 0000000000..6ede4d32a1 --- /dev/null +++ b/target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch @@ -0,0 +1,51 @@ +From 65033574ade97afccba074d837fd269903a83a9a Mon Sep 17 00:00:00 2001 +From: Catalin Marinas +Date: Thu, 5 Oct 2023 16:40:30 +0100 +Subject: [PATCH] arm64: swiotlb: Reduce the default size if no ZONE_DMA + bouncing needed + +With CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC enabled, the arm64 kernel still +allocates the default SWIOTLB buffer (64MB) even if ZONE_DMA is disabled +or all the RAM fits into this zone. However, this potentially wastes a +non-negligible amount of memory on platforms with little RAM. + +Reduce the SWIOTLB size to 1MB per 1GB of RAM if only needed for +kmalloc() buffer bouncing. + +Signed-off-by: Catalin Marinas +Suggested-by: Ross Burton +Cc: Ross Burton +Cc: Will Deacon +Reviewed-by: Robin Murphy +--- + arch/arm64/mm/init.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +--- a/arch/arm64/mm/init.c ++++ b/arch/arm64/mm/init.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -493,8 +494,16 @@ void __init mem_init(void) + { + bool swiotlb = max_pfn > PFN_DOWN(arm64_dma_phys_limit); + +- if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC)) ++ if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC) && !swiotlb) { ++ /* ++ * If no bouncing needed for ZONE_DMA, reduce the swiotlb ++ * buffer for kmalloc() bouncing to 1MB per 1GB of RAM. ++ */ ++ unsigned long size = ++ DIV_ROUND_UP(memblock_phys_mem_size(), 1024); ++ swiotlb_adjust_size(min(swiotlb_size_or_default(), size)); + swiotlb = true; ++ } + + swiotlb_init(swiotlb, SWIOTLB_VERBOSE); + From 6918c637b79724d8ad9d0851afc06c1c82913fde Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 7 Apr 2024 12:29:11 +0200 Subject: [PATCH 03/11] treewide: package: update missed hashes after switch to ZSTD With the switch to ZSTD for git clone packaging, hashes have changed so fixup remaining package hashes that were missed in the inital update. Fixes: b3c1c57 ("treewide: update PKG_MIRROR_HASH to zst") Signed-off-by: Robert Marko --- package/boot/apex/Makefile | 2 +- package/boot/arm-trusted-firmware-bcm63xx/Makefile | 2 +- package/boot/arm-trusted-firmware-mediatek/Makefile | 2 +- package/boot/at91bootstrap/Makefile | 2 +- package/boot/opensbi/Makefile | 2 +- package/boot/rkbin/Makefile | 2 +- package/boot/tfa-layerscape/Makefile | 2 +- package/boot/uboot-at91/Makefile | 2 +- package/boot/uboot-bcm4908/Makefile | 2 +- package/boot/uboot-fritz4040/Makefile | 2 +- package/boot/uboot-layerscape/Makefile | 2 +- package/firmware/layerscape/fman-ucode/Makefile | 2 +- package/firmware/layerscape/ls-ddr-phy/Makefile | 2 +- package/firmware/layerscape/ls-dpl/Makefile | 2 +- package/firmware/layerscape/ls-mc/Makefile | 2 +- package/firmware/layerscape/ls-rcw/Makefile | 2 +- package/firmware/layerscape/ppfe-firmware/Makefile | 2 +- package/kernel/bcm63xx-cfe/Makefile | 2 +- package/kernel/lantiq/ltq-vectoring/Makefile | 2 +- package/kernel/mwlwifi/Makefile | 2 +- package/network/utils/layerscape/restool/Makefile | 2 +- package/utils/bcm27xx-utils/Makefile | 2 +- package/utils/debugcc/Makefile | 2 +- package/utils/firmware-utils/Makefile | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package/boot/apex/Makefile b/package/boot/apex/Makefile index 66a1b7667e..cf8d97bb1c 100644 --- a/package/boot/apex/Makefile +++ b/package/boot/apex/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/linusw/apex.git PKG_SOURCE_VERSION:=483e18aa133d5e25866570c29b124530b2d1e0d3 -PKG_MIRROR_HASH:=42230bb436f5590447ca55e8befb8927e6ea74c1e6953c043bbbef986c411704 +PKG_MIRROR_HASH:=75e0be55e779a6c1f582bf12f5f98ac175404be9172750c1c1015ad78aa8aa3d PKG_TARGETS:=bin PKG_FLAGS:=nonshared diff --git a/package/boot/arm-trusted-firmware-bcm63xx/Makefile b/package/boot/arm-trusted-firmware-bcm63xx/Makefile index 69289af2d9..bcb5ce9892 100644 --- a/package/boot/arm-trusted-firmware-bcm63xx/Makefile +++ b/package/boot/arm-trusted-firmware-bcm63xx/Makefile @@ -9,7 +9,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/bcm63xx/atf.git PKG_SOURCE_DATE:=2021-12-24 PKG_SOURCE_VERSION:=e6d46baf3fae79f693f90bf34f7284c3dfc64aef -PKG_MIRROR_HASH:=9d5d04f572b1b6ddc6eb3064b9cb09f5fe982e82d350790041d35316349af124 +PKG_MIRROR_HASH:=5646abc01152210a8181455151f01145001d61b3fb09619b1cee48008e36b0fa PKG_MAINTAINER:=Rafał Miłecki diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile index 70190b7618..c065c7e67d 100644 --- a/package/boot/arm-trusted-firmware-mediatek/Makefile +++ b/package/boot/arm-trusted-firmware-mediatek/Makefile @@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git PKG_SOURCE_DATE:=2023-10-13 PKG_SOURCE_VERSION:=0ea67d76ae8be127c91caa3fcdf449b1fe533175 -PKG_MIRROR_HASH:=ad538e7304f8fae280491104b2128d9b7626c5da49216149a25921905590cb62 +PKG_MIRROR_HASH:=22579fae08de942e0d5a420cfaa0b1d310dc9431e85b7e28a3c3ef08331a199d PKG_MAINTAINER:=Daniel Golle diff --git a/package/boot/at91bootstrap/Makefile b/package/boot/at91bootstrap/Makefile index f27a3f01dc..a2a1f2bddb 100644 --- a/package/boot/at91bootstrap/Makefile +++ b/package/boot/at91bootstrap/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=at91bootstrap PKG_VERSION:=v4.0.3 -PKG_MIRROR_HASH:=1ecdc31a13350fcdcaa3f77ed8ad73906f79fc668dbb2f337e1d5dd877bf9882 +PKG_MIRROR_HASH:=9c1d42337294b549e6c229ae4c9996efd21e00ae5f968bd780d352e054e24cb7 PKG_SOURCE_VERSION:=1d9e673698d9db4a4f2301559f481274de2e75ae BINARIES_DIR:=build/binaries PKG_CPE_ID:=cpe:/a:linux4sam:at91bootstrap diff --git a/package/boot/opensbi/Makefile b/package/boot/opensbi/Makefile index c9f104845f..99a4631630 100644 --- a/package/boot/opensbi/Makefile +++ b/package/boot/opensbi/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/riscv/opensbi PKG_SOURCE_DATE:=2022-12-24 PKG_SOURCE_VERSION:=6b5188ca14e59ce7bf71afe4e7d3d557c3d31bf8 -PKG_MIRROR_HASH:=72096b51297b0fa9375500dab2e85e42fe32127b041dee073ecd14eb13906465 +PKG_MIRROR_HASH:=5939a3225cb37c1dde0b5b9f28f9980c0712533676774ae244d6d84bb09a1439 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/boot/rkbin/Makefile b/package/boot/rkbin/Makefile index 253d8f52b9..3b6cc0d42c 100644 --- a/package/boot/rkbin/Makefile +++ b/package/boot/rkbin/Makefile @@ -11,7 +11,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git PKG_SOURCE_DATE:=2023-07-26 PKG_SOURCE_VERSION:=b4558da0860ca48bf1a571dd33ccba580b9abe23 -PKG_MIRROR_HASH:=8c6259c64ee53f596ac15dbedd0541ca9af40cdf3951d40f030ea00b94379009 +PKG_MIRROR_HASH:=7cd2cb8357fa850eb4eef94db49a2c46cf910bfe4e673eff9071413bb002afc9 PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Tianling Shen diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index 3509658869..b92516ceb0 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/atf PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0 -PKG_MIRROR_HASH:=c0e3c7d0cc9ee5f9ae68cd705ce7f07f714c4fe3fd4a5a79de5699e7865b759f +PKG_MIRROR_HASH:=e109ca87a0f432529ab4d1fcd019adc0cd0d3684c96cdf770aac113f9bbe4bd6 PKG_BUILD_DEPENDS:=tfa-layerscape/host include $(INCLUDE_DIR)/host-build.mk diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile index afab24e841..81ea22ded6 100644 --- a/package/boot/uboot-at91/Makefile +++ b/package/boot/uboot-at91/Makefile @@ -12,7 +12,7 @@ PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/linux4sam/u-boot-at91.git -PKG_MIRROR_HASH:=56bbac45f71aaf39b365661db2a76c6c8415e27f7147b27bb58312b12756c8f3 +PKG_MIRROR_HASH:=82229503800d9a624bb8de5f8d7a84cb35fd512a1550c6f1d46958cd47d4807b PKG_SOURCE_VERSION:=7b59654a486d39dc8e0343e2554699b8a79c7a54 include $(INCLUDE_DIR)/u-boot.mk diff --git a/package/boot/uboot-bcm4908/Makefile b/package/boot/uboot-bcm4908/Makefile index 1e6e04c287..7bc4986007 100644 --- a/package/boot/uboot-bcm4908/Makefile +++ b/package/boot/uboot-bcm4908/Makefile @@ -9,7 +9,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.openwrt.org/project/bcm63xx/u-boot.git PKG_SOURCE_DATE:=2022-12-08 PKG_SOURCE_VERSION:=4435700d18a791dca0d8d767e5414dfac9df4451 -PKG_MIRROR_HASH:=a05c13451cd311f3b32c734cfc341e76007c8c6ed1eeb27aee7b0651609b7be3 +PKG_MIRROR_HASH:=80de483c11938cca9fdd0f35931cce1921c8166d9c1c146da56bf155394842cb include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile index 29130fc596..6fa4d14814 100644 --- a/package/boot/uboot-fritz4040/Makefile +++ b/package/boot/uboot-fritz4040/Makefile @@ -12,7 +12,7 @@ PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=9d89013f9cc963eca25856c61fa066091d35f8de PKG_SOURCE_DATE:=2022-05-01 -PKG_MIRROR_HASH:=7c60ca967b607c9b43f54dd75e6126f63935e21e330bbf80f07d210889bb6c2d +PKG_MIRROR_HASH:=4e8106a7877ae6aa8da44bf95401b860d11f7d51417cc5a61ce59a353d4ee866 PKG_RELEASE:=5 diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index e255debfeb..8c5e32587d 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/u-boot PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0 -PKG_MIRROR_HASH:=f4a3a262fd8923af72dede0348a512c05b756e3925279553eaf1c6667b186fb4 +PKG_MIRROR_HASH:=6cb3cd569f11f582375eb3af475a2a0d77fe602813337b64883ef01344be7bf6 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk diff --git a/package/firmware/layerscape/fman-ucode/Makefile b/package/firmware/layerscape/fman-ucode/Makefile index fdd4659851..99729e0b83 100644 --- a/package/firmware/layerscape/fman-ucode/Makefile +++ b/package/firmware/layerscape/fman-ucode/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-fm-ucode PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0 -PKG_MIRROR_HASH:=3614200837945460374570a48822a3efb96a64b93724e7f973e61008baeccf3a +PKG_MIRROR_HASH:=d69792e0b03f2fd00cb9d69325d9817b43fb14dd1b27e41018b3ea69b25c55a5 PKG_FLAGS:=nonshared diff --git a/package/firmware/layerscape/ls-ddr-phy/Makefile b/package/firmware/layerscape/ls-ddr-phy/Makefile index 28e1355073..848ee4e85f 100644 --- a/package/firmware/layerscape/ls-ddr-phy/Makefile +++ b/package/firmware/layerscape/ls-ddr-phy/Makefile @@ -12,7 +12,7 @@ PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/NXP/ddr-phy-binary.git PKG_SOURCE_VERSION:=LSDK-21.08 -PKG_MIRROR_HASH:=0fb35c697f4b4274577cce63223198f5c7715164a2c5d09a55c46ef17639ed4b +PKG_MIRROR_HASH:=2f9bf4f6b2410e436e4e606f981c71919b1896e4da4f204de483d9f7677a064d PKG_BUILD_DEPENDS:=tfa-layerscape/host PKG_LICENSE:=EULA diff --git a/package/firmware/layerscape/ls-dpl/Makefile b/package/firmware/layerscape/ls-dpl/Makefile index 7ceba620bb..058fe5443b 100644 --- a/package/firmware/layerscape/ls-dpl/Makefile +++ b/package/firmware/layerscape/ls-dpl/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/mc-utils PKG_SOURCE_VERSION:=mc_release_10.38.0 -PKG_MIRROR_HASH:=c5032ad73a04cf7fa23a2afeee85108677e665871a6c48ca352f415eea9b6390 +PKG_MIRROR_HASH:=9ada83ac4cc259cdf2ea2ebfc2328292f7dace701bfac2b5514749bd9f8315f0 PKG_FLAGS:=nonshared diff --git a/package/firmware/layerscape/ls-mc/Makefile b/package/firmware/layerscape/ls-mc/Makefile index 3ef5a78327..4d01a531cd 100644 --- a/package/firmware/layerscape/ls-mc/Makefile +++ b/package/firmware/layerscape/ls-mc/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/NXP/qoriq-mc-binary.git PKG_SOURCE_VERSION:=mc_release_10.38.0 -PKG_MIRROR_HASH:=b4482690246f9bd6a8728c482fd391ccf9b25a104b02f08add6e5c5d43a5ad75 +PKG_MIRROR_HASH:=4bd0eab4b600d6dee67b4c5b32624a92fd84e6c93f506e46a4fe52217e2d1593 PKG_FLAGS:=nonshared diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index 1569f1042e..3565c540d7 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/rcw PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0 -PKG_MIRROR_HASH:=3127285549a0a7dd3cded20c2fbfb67b06943faa8dab529f61936dc1bea177db +PKG_MIRROR_HASH:=6d505c1a60046a79c91b69cd6e26a2ef3515d7cb2999bdc9defcb664a1a5aef9 PKG_FLAGS:=nonshared diff --git a/package/firmware/layerscape/ppfe-firmware/Makefile b/package/firmware/layerscape/ppfe-firmware/Makefile index 86f6194125..b6a251098e 100644 --- a/package/firmware/layerscape/ppfe-firmware/Makefile +++ b/package/firmware/layerscape/ppfe-firmware/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-engine-pfe-bin PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0 -PKG_MIRROR_HASH:=eb1e3efe08980e70594060c84c1620a1dde53e00e96bae63d15dceb236c0bfa8 +PKG_MIRROR_HASH:=59f5660f1b93314e3e073053195719eab7361f07d1a9e02896f9356b1a615873 PKG_FLAGS:=nonshared diff --git a/package/kernel/bcm63xx-cfe/Makefile b/package/kernel/bcm63xx-cfe/Makefile index dbd82403e9..62548a5761 100644 --- a/package/kernel/bcm63xx-cfe/Makefile +++ b/package/kernel/bcm63xx-cfe/Makefile @@ -8,7 +8,7 @@ PKG_SOURCE_URL:=https://github.com/openwrt/bcm63xx-cfe.git PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2021-06-22 PKG_SOURCE_VERSION:=e5050f37150b34deb547b50feccd0e7439cb5bd7 -PKG_MIRROR_HASH:=a3e255903e398aa5627ab3a4b5fb2576f07e130a236e74f19d8b9830fe0d58f0 +PKG_MIRROR_HASH:=3b53abf21790e42707e20c73aff23fc32db9fdaf010da6f459a20a9e8f8feae6 PKG_FLAGS:=nonshared diff --git a/package/kernel/lantiq/ltq-vectoring/Makefile b/package/kernel/lantiq/ltq-vectoring/Makefile index 7e25422f01..6076df7742 100644 --- a/package/kernel/lantiq/ltq-vectoring/Makefile +++ b/package/kernel/lantiq/ltq-vectoring/Makefile @@ -6,7 +6,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/ppa_drv.git PKG_SOURCE_DATE:=2019-05-20 PKG_SOURCE_VERSION:=4fa7ac30fcc8ec4eddae9debba5f4230981f469f -PKG_MIRROR_HASH:=444eb823dd9ddd25453976bf7a3230955e4148b8bf92f35f165ecffee32c4555 +PKG_MIRROR_HASH:=53ae72a929db598202a4e9c3df43b65fa0778cd165c1ec2ddf9361993795b930 PKG_LICENSE:=GPL-2.0 BSD-2-Clause MAKE_PATH:=src/vectoring diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile index e316869075..b55b4604ca 100644 --- a/package/kernel/mwlwifi/Makefile +++ b/package/kernel/mwlwifi/Makefile @@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2023-11-29 PKG_SOURCE_VERSION:=ebf3167445f108346dcff9a31a708534c0bd7cc5 -PKG_MIRROR_HASH:=402ca0023f03c631b1dcefb15345cdc0eb92a3359912bc0ee46e06f0c9ebbac1 +PKG_MIRROR_HASH:=6dffc08208305366b9c25133b74693d5c2e544c1076b7b4ed846628c66be56c1 PKG_MAINTAINER:=Imre Kaloz PKG_BUILD_PARALLEL:=1 diff --git a/package/network/utils/layerscape/restool/Makefile b/package/network/utils/layerscape/restool/Makefile index 5919f42ff2..bca78fbda8 100644 --- a/package/network/utils/layerscape/restool/Makefile +++ b/package/network/utils/layerscape/restool/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/nxp-qoriq/restool PKG_SOURCE_VERSION:=LSDK-21.08 -PKG_MIRROR_HASH:=0396644927b8f3da20183227562f695c8063d3d4c6bb606e8f31dda450e962e4 +PKG_MIRROR_HASH:=3c289e6c9adc2c61445473ecd8b1b1a7b6dfd19a66d3c65f3b83b669e4c3e25b PKG_FLAGS:=nonshared diff --git a/package/utils/bcm27xx-utils/Makefile b/package/utils/bcm27xx-utils/Makefile index ec41b70c30..9e113914e7 100644 --- a/package/utils/bcm27xx-utils/Makefile +++ b/package/utils/bcm27xx-utils/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git PKG_SOURCE_VERSION:=e65f5ec102e74218cda7da9fdc8b1caa0fd1127d -PKG_MIRROR_HASH:=14f4aa1a8115240d702251bc399b53cbfa0928813f70a73ca27b22da94b696d2 +PKG_MIRROR_HASH:=ea946fc4a86875c5d1efc35b2bc80f6b5482afc3d1ea13853b69abc2b4a2eee6 PKG_FLAGS:=nonshared PKG_BUILD_FLAGS:=no-lto diff --git a/package/utils/debugcc/Makefile b/package/utils/debugcc/Makefile index 2a72f17730..3e26cea7e5 100644 --- a/package/utils/debugcc/Makefile +++ b/package/utils/debugcc/Makefile @@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/linux-msm/debugcc.git PKG_SOURCE_DATE:=2023-11-10 PKG_SOURCE_VERSION:=d15bea7c05f224a85dd1fcec24b0f153dbad9f6e -PKG_MIRROR_HASH:=b6bd181db4992cf429343cd7d0fdde0f937a8f1811f5fe9e7855a0d76b0d88a0 +PKG_MIRROR_HASH:=4cd7a770a05db28f496a60eb9fe015a4af677bba05053b4d4be21adcf95e52e5 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/package/utils/firmware-utils/Makefile b/package/utils/firmware-utils/Makefile index d9213d71c8..3a6467503c 100644 --- a/package/utils/firmware-utils/Makefile +++ b/package/utils/firmware-utils/Makefile @@ -9,7 +9,7 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git PKG_SOURCE_DATE:=2024-03-23 PKG_SOURCE_VERSION:=6b242991a995c41769977efb010dc9f4e4ec3da2 -PKG_MIRROR_HASH:=f8d84868487ec51ea4119fb5a48a181025ca272d8eb5b714068d0eec8db88d87 +PKG_MIRROR_HASH:=00ff2661fda2eb299ccbfaa07dff8fbcf46b3441a6e9f6f46eaa119e66dbe142 PKG_BUILD_DEPENDS:=openssl zlib From 449b5701d726a0b7ef7371bb94d0f36645a7a2bc Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 7 Apr 2024 16:52:48 +0200 Subject: [PATCH 04/11] generic: backport at803x kernel panic fix Backport at803x kernel panic fix merged upstream for kernel 6.1 and 6.6. Signed-off-by: Christian Marangi --- ...03x-fix-kernel-panic-with-at8031_pro.patch | 45 +++++++++++++++++++ ...03x-fix-kernel-panic-with-at8031_pro.patch | 45 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 target/linux/generic/backport-6.1/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch create mode 100644 target/linux/generic/backport-6.6/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch diff --git a/target/linux/generic/backport-6.1/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch b/target/linux/generic/backport-6.1/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch new file mode 100644 index 0000000000..9b9ce2a3cd --- /dev/null +++ b/target/linux/generic/backport-6.1/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch @@ -0,0 +1,45 @@ +From 6a4aee277740d04ac0fd54cfa17cc28261932ddc Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Mon, 25 Mar 2024 20:06:19 +0100 +Subject: [PATCH] net: phy: qcom: at803x: fix kernel panic with at8031_probe + +On reworking and splitting the at803x driver, in splitting function of +at803x PHYs it was added a NULL dereference bug where priv is referenced +before it's actually allocated and then is tried to write to for the +is_1000basex and is_fiber variables in the case of at8031, writing on +the wrong address. + +Fix this by correctly setting priv local variable only after +at803x_probe is called and actually allocates priv in the phydev struct. + +Reported-by: William Wortel +Cc: +Fixes: 25d2ba94005f ("net: phy: at803x: move specific at8031 probe mode check to dedicated probe") +Signed-off-by: Christian Marangi +Reviewed-by: Andrew Lunn +Link: https://lore.kernel.org/r/20240325190621.2665-1-ansuelsmth@gmail.com +Signed-off-by: Paolo Abeni +--- + drivers/net/phy/qcom/at803x.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/phy/qcom/at803x.c ++++ b/drivers/net/phy/qcom/at803x.c +@@ -797,7 +797,7 @@ static int at8031_parse_dt(struct phy_de + + static int at8031_probe(struct phy_device *phydev) + { +- struct at803x_priv *priv = phydev->priv; ++ struct at803x_priv *priv; + int mode_cfg; + int ccr; + int ret; +@@ -806,6 +806,8 @@ static int at8031_probe(struct phy_devic + if (ret) + return ret; + ++ priv = phydev->priv; ++ + /* Only supported on AR8031/AR8033, the AR8030/AR8035 use strapping + * options. + */ diff --git a/target/linux/generic/backport-6.6/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch b/target/linux/generic/backport-6.6/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch new file mode 100644 index 0000000000..9b9ce2a3cd --- /dev/null +++ b/target/linux/generic/backport-6.6/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch @@ -0,0 +1,45 @@ +From 6a4aee277740d04ac0fd54cfa17cc28261932ddc Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Mon, 25 Mar 2024 20:06:19 +0100 +Subject: [PATCH] net: phy: qcom: at803x: fix kernel panic with at8031_probe + +On reworking and splitting the at803x driver, in splitting function of +at803x PHYs it was added a NULL dereference bug where priv is referenced +before it's actually allocated and then is tried to write to for the +is_1000basex and is_fiber variables in the case of at8031, writing on +the wrong address. + +Fix this by correctly setting priv local variable only after +at803x_probe is called and actually allocates priv in the phydev struct. + +Reported-by: William Wortel +Cc: +Fixes: 25d2ba94005f ("net: phy: at803x: move specific at8031 probe mode check to dedicated probe") +Signed-off-by: Christian Marangi +Reviewed-by: Andrew Lunn +Link: https://lore.kernel.org/r/20240325190621.2665-1-ansuelsmth@gmail.com +Signed-off-by: Paolo Abeni +--- + drivers/net/phy/qcom/at803x.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/net/phy/qcom/at803x.c ++++ b/drivers/net/phy/qcom/at803x.c +@@ -797,7 +797,7 @@ static int at8031_parse_dt(struct phy_de + + static int at8031_probe(struct phy_device *phydev) + { +- struct at803x_priv *priv = phydev->priv; ++ struct at803x_priv *priv; + int mode_cfg; + int ccr; + int ret; +@@ -806,6 +806,8 @@ static int at8031_probe(struct phy_devic + if (ret) + return ret; + ++ priv = phydev->priv; ++ + /* Only supported on AR8031/AR8033, the AR8030/AR8035 use strapping + * options. + */ From 57c9cb421e428c840d5aa0d6c56aead952bfadb4 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sun, 7 Apr 2024 14:44:46 +0200 Subject: [PATCH 05/11] at91bootstrap: update PKG_MIRROR_HASH to zstd for v3 at91bootstrap So, when updating the hash for at91bootstrap it was done via CHECK_ALL=1 so that updated the PKG_MIRROR_HASH for the main v4 version hash, but at91bootstrap checkout version depends on the subtarget as well. Choosing to build for sam9x will change the at91bootstrap version to v3 and this hash was not refreshed thus causing the CI to fail. Fixes: 6918c637b797 ("treewide: package: update missed hashes after switch to ZSTD") Signed-off-by: Robert Marko --- package/boot/at91bootstrap/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/at91bootstrap/Makefile b/package/boot/at91bootstrap/Makefile index a2a1f2bddb..1b145c8a8b 100644 --- a/package/boot/at91bootstrap/Makefile +++ b/package/boot/at91bootstrap/Makefile @@ -26,7 +26,7 @@ endif ifeq ($(AT91BOOTSTRAP_V4),n) PKG_VERSION=v3.10.4 - PKG_MIRROR_HASH=6fe61fe90838e785917383bb9e887fa05e1bd061a6725954242f504e38b5c426 + PKG_MIRROR_HASH:=08ab81c37b995592992d6eda3f76ce9aad6e2b3e9d9c4f7e88c1ba8bb8346657 PKG_SOURCE_VERSION=404846dd283894367a015ca59189bcf927d92e11 BINARIES_DIR=binaries endif From 507b0286d9e5a06fc50fcad6e1b38f373f4beb13 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 7 Apr 2024 18:55:14 +0200 Subject: [PATCH 06/11] ustream-ssl: update to Git HEAD (2024-04-07) 7621339d7694 mbedtls: fix build on non-linux systems 268050964b08 ustream-mbedtls: add missing psa_crypto_init call 956fba242ac0 add callbacks for debug messages 9fdf3fb87af5 mbedtls: add TLS 1.3 ciphers 28c4c1e6471b mbedtls: disable TLS 1.3 in client mode when skipping verification d61493a44204 mbedtls: add missing ifdef for build with disabled debug Signed-off-by: Felix Fietkau --- package/libs/ustream-ssl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile index 686a05cbe7..8537205fda 100644 --- a/package/libs/ustream-ssl/Makefile +++ b/package/libs/ustream-ssl/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git -PKG_SOURCE_DATE:=2023-11-26 -PKG_SOURCE_VERSION:=263b9a97cf7e1e2467319c23832b705fc01190b5 -PKG_MIRROR_HASH:=b18a5e7510d3984829f1c2ad1850b101ed1931670cf556d509c0a91750aafcb3 +PKG_SOURCE_DATE:=2024-04-07 +PKG_SOURCE_VERSION:=d61493a4420417cbf9931ffee8c862faf04f2967 +PKG_MIRROR_HASH:=a420d775ad4928836e33e0d9423486fe4904555dbbfff283cd96370a49cf9659 CMAKE_INSTALL:=1 PKG_LICENSE:=ISC From 8cf4ac5195476356a14678ae72897e563881b15e Mon Sep 17 00:00:00 2001 From: Rodrigo Balerdi Date: Sat, 6 Apr 2024 03:18:00 -0300 Subject: [PATCH 07/11] base-files: minor fix to mmc_get_mac_ascii function This is mostly a cosmetic cleanup. The absence of the return statement was not causing any problems. Signed-off-by: Rodrigo Balerdi --- package/base-files/files/lib/functions/system.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh index 107e67835a..23484c8ad9 100644 --- a/package/base-files/files/lib/functions/system.sh +++ b/package/base-files/files/lib/functions/system.sh @@ -205,6 +205,7 @@ mmc_get_mac_ascii() { part=$(find_mmc_part "$part_name") if [ -z "$part" ]; then echo "mmc_get_mac_ascii: partition $part_name not found!" >&2 + return fi get_mac_ascii "$part" "$key" From 20fe7e687e59bdc787362585f154a71227add004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 6 Apr 2024 17:30:49 +0200 Subject: [PATCH 08/11] bcm27xx: update 6.1 patches from RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sync 6.1 patches with the RPi foundation. Since rpi-6.6.y is now the main branch of the RPi foundation, there won't be any new patches for linux 6.1. Signed-off-by: Álvaro Fernández Rojas --- target/linux/bcm27xx/bcm2708/config-6.1 | 3 + target/linux/bcm27xx/bcm2709/config-6.1 | 3 + target/linux/bcm27xx/bcm2710/config-6.1 | 3 + target/linux/bcm27xx/bcm2711/config-6.1 | 3 + target/linux/bcm27xx/bcm2712/config-6.1 | 3 + ...Improve-MMU-support-for-larger-pages.patch | 64 --- ...designware-Look-for-CNT-values-in-DT.patch | 57 --- .../950-1227-dts-rp1-Add-I2C-timings.patch | 103 ----- ...-vc4_hvs_dlist_free_work-to-only-rea.patch | 45 ++ ...ale-dlist-entries-if-allocation-fail.patch | 69 +++ ...port-the-button-GPIO-via-sysfs-GPIO-.patch | 55 +++ ...-the-SPI-speed-to-use-from-the-Devic.patch | 94 ++++ ...spi-speed-hz-for-Pisound-in-the-Devi.patch | 129 ++++++ ...ackup-switchover-mode-overlay-value-.patch | 51 ++ ...improvement-on-backup-switchover-mod.patch | 30 ++ ...ma-overlay-pi5-to-enable-32bit-DMA-o.patch | 85 ++++ ...re-Use-SCL-rise-and-fall-times-in-DT.patch | 91 ++++ ...ware-Support-non-standard-bus-speeds.patch | 80 ++++ ...950-1259-ARM-dts-rp1-Add-I2C-timings.patch | 78 ++++ ...m2712-don-t-allow-building-as-module.patch | 28 ++ ...depends-on-instead-of-select-MFD_RP1.patch | 59 +++ ...950-1262-Update-touch-PiTFT-overlays.patch | 435 ++++++++++++++++++ ...dts-rp1-Boost-the-I2C-drive-strength.patch | 95 ++++ ...dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch | 75 +++ ...-16bit-sample-support-in-clock-consu.patch | 33 ++ ...t-for-AMP4-Pro-to-the-DAC-Plus-drive.patch | 114 +++++ ...-adds-support-for-Hifiberry-AMP4-Pro.patch | 130 ++++++ ...ro-fix-16bit-sample-support-in-clock.patch | 38 ++ ...lays-Correct-some-compatible-strings.patch | 72 +++ ...ys-Delete-deprecated-overlay-mpu6050.patch | 57 +++ ...e-Increase-default-size-of-embedded-.patch | 36 ++ ...is7xx-Don-t-spin-if-no-data-received.patch | 26 ++ ...-support-for-Interlude-Audio-Digital.patch | 196 ++++++++ ...ded-for-Interlude-Audio-Digital-and-.patch | 179 +++++++ ...nable-V3D-to-use-different-PAGE_SIZE.patch | 118 +++++ ...dau1977-adc-Replace-use-of-i2c-label.patch | 25 + ...Add-IQaudio-CodecZero-to-hat_map.dts.patch | 24 + ...erry-DAC8X-to-the-simple-card-driver.patch | 82 ++++ ...initions-for-HiFiBerry-8-channel-DAC.patch | 113 +++++ ...ix-lbm-size-calculation-for-yuv-6012.patch | 31 ++ ...add-waveshare-4inch-dsi-lcd-C-driver.patch | 41 ++ ...-waveshare-4inch-dsi-lcd-C-dtoverlay.patch | 22 + ...veshare-11.9inch-touch-orientation-e.patch | 22 + ...veshare-4inch-dsi-lcd-C-parameters-t.patch | 21 + ...cific-clk-producer-consumer-overlays.patch | 223 +++++++++ ...overlays-hat_map-Add-Hifiberry-cards.patch | 96 ++++ ...ample-support-for-Hifiberry-DACplusA.patch | 31 ++ ...s_clk_producer-as-default-for-Hifibe.patch | 79 ++++ ...-make-trigger-mode-more-configurable.patch | 77 ++++ ...vice-tree-overlays-to-support-trigge.patch | 129 ++++++ 50 files changed, 3529 insertions(+), 224 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0905-drm-v3d-Improve-MMU-support-for-larger-pages.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-1226-i2c-designware-Look-for-CNT-values-in-DT.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-1227-dts-rp1-Add-I2C-timings.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1247-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1248-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1249-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1250-Pisound-Read-out-the-SPI-speed-to-use-from-the-Devic.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1253-Harmonizing-the-improvement-on-backup-switchover-mod.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1254-Add-pcie-32bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1257-i2c-designware-Use-SCL-rise-and-fall-times-in-DT.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1258-i2c-designware-Support-non-standard-bus-speeds.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1259-ARM-dts-rp1-Add-I2C-timings.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1260-iommu-bcm2712-don-t-allow-building-as-module.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1261-drm-rp1-depends-on-instead-of-select-MFD_RP1.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1262-Update-touch-PiTFT-overlays.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1263-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1264-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1265-ASoC-DACplus-fix-16bit-sample-support-in-clock-consu.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1266-ASoC-adds-support-for-AMP4-Pro-to-the-DAC-Plus-drive.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1267-DT-overlays-adds-support-for-Hifiberry-AMP4-Pro.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1268-ASoC-DACplusADCPro-fix-16bit-sample-support-in-clock.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1269-overlays-Correct-some-compatible-strings.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1270-overlays-Delete-deprecated-overlay-mpu6050.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1271-drivers-media-cfe-Increase-default-size-of-embedded-.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1274-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1276-Impliment-driver-support-for-Interlude-Audio-Digital.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1279-drm-v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1280-overlays-adau1977-adc-Replace-use-of-i2c-label.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1282-ASOc-Add-HiFiBerry-DAC8X-to-the-simple-card-driver.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1283-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1285-vc4-hvs-Fix-lbm-size-calculation-for-yuv-6012.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1287-Dtoverlay-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1288-Dtoverlay-fix-waveshare-11.9inch-touch-orientation-e.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1289-Dtoverlay-Add-waveshare-4inch-dsi-lcd-C-parameters-t.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1290-Overlays-Add-specific-clk-producer-consumer-overlays.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1291-overlays-hat_map-Add-Hifiberry-cards.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1293-overlays-Sets-i2s_clk_producer-as-default-for-Hifibe.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1294-imx477-make-trigger-mode-more-configurable.patch create mode 100644 target/linux/bcm27xx/patches-6.1/950-1295-imx477-Update-device-tree-overlays-to-support-trigge.patch diff --git a/target/linux/bcm27xx/bcm2708/config-6.1 b/target/linux/bcm27xx/bcm2708/config-6.1 index af5d0183ec..d874eb9f8a 100644 --- a/target/linux/bcm27xx/bcm2708/config-6.1 +++ b/target/linux/bcm27xx/bcm2708/config-6.1 @@ -169,6 +169,7 @@ CONFIG_FW_CACHE=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_CLOCKEVENTS=y @@ -229,6 +230,7 @@ CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_MAC_PARTITION=y CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6 CONFIG_MAILBOX=y # CONFIG_MAILBOX_TEST is not set CONFIG_MDIO_BUS=y @@ -290,6 +292,7 @@ CONFIG_PAGE_SIZE_LESS_THAN_64KB=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM2835=y CONFIG_PM=y diff --git a/target/linux/bcm27xx/bcm2709/config-6.1 b/target/linux/bcm27xx/bcm2709/config-6.1 index 58d695cff3..4dcca5dd04 100644 --- a/target/linux/bcm27xx/bcm2709/config-6.1 +++ b/target/linux/bcm27xx/bcm2709/config-6.1 @@ -206,6 +206,7 @@ CONFIG_FW_CACHE=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y CONFIG_GENERIC_BUG=y @@ -287,6 +288,7 @@ CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_MAC_PARTITION=y CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6 CONFIG_MAILBOX=y # CONFIG_MAILBOX_TEST is not set CONFIG_MDIO_BCM_UNIMAC=y @@ -367,6 +369,7 @@ CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM2835=y diff --git a/target/linux/bcm27xx/bcm2710/config-6.1 b/target/linux/bcm27xx/bcm2710/config-6.1 index e5b357f2fa..8f262671c7 100644 --- a/target/linux/bcm27xx/bcm2710/config-6.1 +++ b/target/linux/bcm27xx/bcm2710/config-6.1 @@ -213,6 +213,7 @@ CONFIG_FW_CACHE=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y @@ -286,6 +287,7 @@ CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_MAC_PARTITION=y CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6 CONFIG_MAILBOX=y # CONFIG_MAILBOX_TEST is not set CONFIG_MDIO_BUS=y @@ -358,6 +360,7 @@ CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM2835=y diff --git a/target/linux/bcm27xx/bcm2711/config-6.1 b/target/linux/bcm27xx/bcm2711/config-6.1 index 2feb6e9aea..1556ae5593 100644 --- a/target/linux/bcm27xx/bcm2711/config-6.1 +++ b/target/linux/bcm27xx/bcm2711/config-6.1 @@ -213,6 +213,7 @@ CONFIG_FW_CACHE=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y @@ -287,6 +288,7 @@ CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_MAC_PARTITION=y CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6 CONFIG_MAILBOX=y # CONFIG_MAILBOX_TEST is not set CONFIG_MDIO_BCM_UNIMAC=y @@ -362,6 +364,7 @@ CONFIG_PCI_MSI=y CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM2835=y diff --git a/target/linux/bcm27xx/bcm2712/config-6.1 b/target/linux/bcm27xx/bcm2712/config-6.1 index ddd29f78fb..ed2b623cfe 100644 --- a/target/linux/bcm27xx/bcm2712/config-6.1 +++ b/target/linux/bcm27xx/bcm2712/config-6.1 @@ -256,6 +256,7 @@ CONFIG_FW_CACHE=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y CONFIG_GCC11_NO_ARRAY_BOUNDS=y +CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ARCH_TOPOLOGY=y @@ -360,6 +361,7 @@ CONFIG_MACB_PCI=y CONFIG_MACB_USE_HWSTAMP=y CONFIG_MAC_PARTITION=y CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6 CONFIG_MAILBOX=y # CONFIG_MAILBOX_TEST is not set CONFIG_MDIO_BCM_UNIMAC=y @@ -460,6 +462,7 @@ CONFIG_PCI_MSI_IRQ_DOMAIN=y CONFIG_PCI_STUB=y CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYLIB=y +CONFIG_PHYLIB_LEDS=y CONFIG_PHYLINK=y CONFIG_PHYS_ADDR_T_64BIT=y # CONFIG_PHY_BRCM_SATA is not set diff --git a/target/linux/bcm27xx/patches-6.1/950-0905-drm-v3d-Improve-MMU-support-for-larger-pages.patch b/target/linux/bcm27xx/patches-6.1/950-0905-drm-v3d-Improve-MMU-support-for-larger-pages.patch deleted file mode 100644 index 3c53996ff0..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0905-drm-v3d-Improve-MMU-support-for-larger-pages.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 12c7ea43b930976f35ce75d11fd3f55438868e13 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 4 Aug 2023 11:26:10 +0100 -Subject: [PATCH] drm/v3d: Improve MMU support for larger pages - -The built-in MMU driver went most of the way towards supporting larger -kernel pages, but dropped the ball when it comes to calculating indexes -into the page table. Fix it. - -Signed-off-by: Phil Elwell ---- - drivers/gpu/drm/v3d/v3d_mmu.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - ---- a/drivers/gpu/drm/v3d/v3d_mmu.c -+++ b/drivers/gpu/drm/v3d/v3d_mmu.c -@@ -22,6 +22,7 @@ - #include "v3d_regs.h" - - #define V3D_MMU_PAGE_SHIFT 12 -+#define V3D_PAGE_FACTOR (PAGE_SIZE >> V3D_MMU_PAGE_SHIFT) - - /* Note: All PTEs for the 1MB superpage must be filled with the - * superpage bit set. -@@ -88,7 +89,7 @@ void v3d_mmu_insert_ptes(struct v3d_bo * - { - struct drm_gem_shmem_object *shmem_obj = &bo->base; - struct v3d_dev *v3d = to_v3d_dev(shmem_obj->base.dev); -- u32 page = bo->node.start; -+ u32 page = bo->node.start * V3D_PAGE_FACTOR; - u32 page_prot = V3D_PTE_WRITEABLE | V3D_PTE_VALID; - struct sg_dma_page_iter dma_iter; - -@@ -98,13 +99,13 @@ void v3d_mmu_insert_ptes(struct v3d_bo * - u32 pte = page_prot | page_address; - u32 i; - -- BUG_ON(page_address + (PAGE_SIZE >> V3D_MMU_PAGE_SHIFT) >= -+ BUG_ON(page_address + V3D_PAGE_FACTOR >= - BIT(24)); -- for (i = 0; i < PAGE_SIZE >> V3D_MMU_PAGE_SHIFT; i++) -+ for (i = 0; i < V3D_PAGE_FACTOR; i++) - v3d->pt[page++] = pte + i; - } - -- WARN_ON_ONCE(page - bo->node.start != -+ WARN_ON_ONCE(page - (bo->node.start * V3D_PAGE_FACTOR) != - shmem_obj->base.size >> V3D_MMU_PAGE_SHIFT); - - if (v3d_mmu_flush_all(v3d)) -@@ -115,10 +116,10 @@ void v3d_mmu_remove_ptes(struct v3d_bo * - { - struct v3d_dev *v3d = to_v3d_dev(bo->base.base.dev); - u32 npages = bo->base.base.size >> V3D_MMU_PAGE_SHIFT; -- u32 page; -+ u32 page = bo->node.start * V3D_PAGE_FACTOR; - -- for (page = bo->node.start; page < bo->node.start + npages; page++) -- v3d->pt[page] = 0; -+ while (npages--) -+ v3d->pt[page++] = 0; - - if (v3d_mmu_flush_all(v3d)) - dev_err(v3d->drm.dev, "MMU flush timeout\n"); diff --git a/target/linux/bcm27xx/patches-6.1/950-1226-i2c-designware-Look-for-CNT-values-in-DT.patch b/target/linux/bcm27xx/patches-6.1/950-1226-i2c-designware-Look-for-CNT-values-in-DT.patch deleted file mode 100644 index ccba16ad8e..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-1226-i2c-designware-Look-for-CNT-values-in-DT.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 0a09088e24c013ef608b1bb79501ef890cefc767 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 19 Dec 2023 11:16:25 +0000 -Subject: [PATCH] i2c: designware: Look for *CNT values in DT - -The i2c-designware driver supports reading precise timing values from -ACPI, but the Device Tree support relies on a combination of standard -rise and fall times and hard-coded minimum timings. The result of this -is that it is difficult to get optimum timings, particularly given that -the values are bus speed-specific and only one set can be stored in -DT at a time. - -Add support for initialisation from DT that is similar to that for -ACPI. - -Signed-off-by: Phil Elwell ---- - drivers/i2c/busses/i2c-designware-platdrv.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - ---- a/drivers/i2c/busses/i2c-designware-platdrv.c -+++ b/drivers/i2c/busses/i2c-designware-platdrv.c -@@ -132,9 +132,18 @@ static int mscc_twi_set_sda_hold_time(st - return 0; - } - -+static void dw_i2c_read_of_cnt(struct device_node *np, const char *name, u16 *pval) -+{ -+ u32 val; -+ -+ if (!of_property_read_u32(np, name, &val)) -+ *pval = (u16)val; -+} -+ - static int dw_i2c_of_configure(struct platform_device *pdev) - { - struct dw_i2c_dev *dev = platform_get_drvdata(pdev); -+ struct device_node *np = pdev->dev.of_node; - - switch (dev->flags & MODEL_MASK) { - case MODEL_MSCC_OCELOT: -@@ -146,6 +155,15 @@ static int dw_i2c_of_configure(struct pl - break; - } - -+ dw_i2c_read_of_cnt(np, "snps,ss_hcnt", &dev->ss_hcnt); -+ dw_i2c_read_of_cnt(np, "snps,ss_lcnt", &dev->ss_lcnt); -+ dw_i2c_read_of_cnt(np, "snps,fs_hcnt", &dev->fs_hcnt); -+ dw_i2c_read_of_cnt(np, "snps,fs_lcnt", &dev->fs_lcnt); -+ dw_i2c_read_of_cnt(np, "snps,fp_hcnt", &dev->fp_hcnt); -+ dw_i2c_read_of_cnt(np, "snps,fp_lcnt", &dev->fp_lcnt); -+ dw_i2c_read_of_cnt(np, "snps,hs_hcnt", &dev->hs_hcnt); -+ dw_i2c_read_of_cnt(np, "snps,hs_lcnt", &dev->hs_lcnt); -+ - return 0; - } - diff --git a/target/linux/bcm27xx/patches-6.1/950-1227-dts-rp1-Add-I2C-timings.patch b/target/linux/bcm27xx/patches-6.1/950-1227-dts-rp1-Add-I2C-timings.patch deleted file mode 100644 index 892f31ec9f..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-1227-dts-rp1-Add-I2C-timings.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 660d569b1a623e4b64350e608bbf8bc2cc6332e9 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 19 Dec 2023 11:27:20 +0000 -Subject: [PATCH] dts: rp1: Add I2C timings - -Signed-off-by: Phil Elwell ---- - arch/arm/boot/dts/rp1.dtsi | 42 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 42 insertions(+) - ---- a/arch/arm/boot/dts/rp1.dtsi -+++ b/arch/arm/boot/dts/rp1.dtsi -@@ -305,6 +305,12 @@ - compatible = "snps,designware-i2c"; - interrupts = ; - clocks = <&rp1_clocks RP1_CLK_SYS>; -+ snps,ss_hcnt = <978>; -+ snps,ss_lcnt = <990>; -+ snps,fs_hcnt = <200>; -+ snps,fs_lcnt = <268>; -+ snps,fp_hcnt = <60>; -+ snps,fp_lcnt = <107>; - status = "disabled"; - }; - -@@ -313,6 +319,12 @@ - compatible = "snps,designware-i2c"; - interrupts = ; - clocks = <&rp1_clocks RP1_CLK_SYS>; -+ snps,ss_hcnt = <978>; -+ snps,ss_lcnt = <990>; -+ snps,fs_hcnt = <200>; -+ snps,fs_lcnt = <268>; -+ snps,fp_hcnt = <60>; -+ snps,fp_lcnt = <107>; - status = "disabled"; - }; - -@@ -321,6 +333,12 @@ - compatible = "snps,designware-i2c"; - interrupts = ; - clocks = <&rp1_clocks RP1_CLK_SYS>; -+ snps,ss_hcnt = <978>; -+ snps,ss_lcnt = <990>; -+ snps,fs_hcnt = <200>; -+ snps,fs_lcnt = <268>; -+ snps,fp_hcnt = <60>; -+ snps,fp_lcnt = <107>; - status = "disabled"; - }; - -@@ -329,6 +347,12 @@ - compatible = "snps,designware-i2c"; - interrupts = ; - clocks = <&rp1_clocks RP1_CLK_SYS>; -+ snps,ss_hcnt = <978>; -+ snps,ss_lcnt = <990>; -+ snps,fs_hcnt = <200>; -+ snps,fs_lcnt = <268>; -+ snps,fp_hcnt = <60>; -+ snps,fp_lcnt = <107>; - status = "disabled"; - }; - -@@ -337,6 +361,12 @@ - compatible = "snps,designware-i2c"; - interrupts = ; - clocks = <&rp1_clocks RP1_CLK_SYS>; -+ snps,ss_hcnt = <978>; -+ snps,ss_lcnt = <990>; -+ snps,fs_hcnt = <200>; -+ snps,fs_lcnt = <268>; -+ snps,fp_hcnt = <60>; -+ snps,fp_lcnt = <107>; - status = "disabled"; - }; - -@@ -345,6 +375,12 @@ - compatible = "snps,designware-i2c"; - interrupts = ; - clocks = <&rp1_clocks RP1_CLK_SYS>; -+ snps,ss_hcnt = <978>; -+ snps,ss_lcnt = <990>; -+ snps,fs_hcnt = <200>; -+ snps,fs_lcnt = <268>; -+ snps,fp_hcnt = <60>; -+ snps,fp_lcnt = <107>; - status = "disabled"; - }; - -@@ -353,6 +389,12 @@ - compatible = "snps,designware-i2c"; - interrupts = ; - clocks = <&rp1_clocks RP1_CLK_SYS>; -+ snps,ss_hcnt = <978>; -+ snps,ss_lcnt = <990>; -+ snps,fs_hcnt = <200>; -+ snps,fs_lcnt = <268>; -+ snps,fp_hcnt = <60>; -+ snps,fp_lcnt = <107>; - status = "disabled"; - }; - diff --git a/target/linux/bcm27xx/patches-6.1/950-1247-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch b/target/linux/bcm27xx/patches-6.1/950-1247-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch new file mode 100644 index 0000000000..1e2893381d --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1247-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch @@ -0,0 +1,45 @@ +From d8e53e0b83c947123c38c81d2fb5162c86d26fb5 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Thu, 4 Jan 2024 12:39:33 +0000 +Subject: [PATCH 1247/1295] drm/vc4: Optimise vc4_hvs_dlist_free_work to only + read frcnt and active once + +vc4_hvs_dlist_free_work was iterating through the list of stale +dlist entries and reading the frame count and active flags from +the hardware for each one. + +Read the frame count and active flags once, and then use the +cached value in the loop. + +Signed-off-by: Dave Stevenson +--- + drivers/gpu/drm/vc4/vc4_hvs.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_hvs.c ++++ b/drivers/gpu/drm/vc4/vc4_hvs.c +@@ -796,14 +796,19 @@ static void vc4_hvs_dlist_free_work(stru + struct vc4_hvs *hvs = container_of(work, struct vc4_hvs, free_dlist_work); + struct vc4_hvs_dlist_allocation *cur, *next; + unsigned long flags; ++ bool active[3]; ++ u8 frcnt[3]; ++ int i; ++ + + spin_lock_irqsave(&hvs->mm_lock, flags); ++ for (i = 0; i < 3; i++) { ++ frcnt[i] = vc4_hvs_get_fifo_frame_count(hvs, i); ++ active[i] = vc4_hvs_check_channel_active(hvs, i); ++ } + list_for_each_entry_safe(cur, next, &hvs->stale_dlist_entries, node) { +- u8 frcnt; +- +- frcnt = vc4_hvs_get_fifo_frame_count(hvs, cur->channel); +- if (vc4_hvs_check_channel_active(hvs, cur->channel) && +- !vc4_hvs_frcnt_lte(cur->target_frame_count, frcnt)) ++ if (active[cur->channel] && ++ !vc4_hvs_frcnt_lte(cur->target_frame_count, frcnt[cur->channel])) + continue; + + vc4_hvs_free_dlist_entry_locked(hvs, cur); diff --git a/target/linux/bcm27xx/patches-6.1/950-1248-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch b/target/linux/bcm27xx/patches-6.1/950-1248-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch new file mode 100644 index 0000000000..27497483da --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1248-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch @@ -0,0 +1,69 @@ +From c0d4ab94e37991db311b0d4e955a349e359fc73a Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 17 Jan 2024 18:36:11 +0000 +Subject: [PATCH 1248/1295] drm/vc4: Flush stale dlist entries if allocation + fails + +This is largely for debug at present. +For reasons unknown we are not getting the end of frame interrupts +that should trigger a sweep of stale dlist entries. + +On allocation failure clear out ALL stale entries, and retry the +allocation. Log the interrupt status so we have debug regarding +whether the HVS believes the interrupt is enabled. + +Signed-off-by: Dave Stevenson +--- + drivers/gpu/drm/vc4/vc4_hvs.c | 27 ++++++++++++++++++++++++--- + 1 file changed, 24 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_hvs.c ++++ b/drivers/gpu/drm/vc4/vc4_hvs.c +@@ -634,6 +634,9 @@ static void vc4_hvs_irq_clear_eof(struct + hvs->eof_irq[channel].enabled = false; + } + ++static void vc4_hvs_free_dlist_entry_locked(struct vc4_hvs *hvs, ++ struct vc4_hvs_dlist_allocation *alloc); ++ + static struct vc4_hvs_dlist_allocation * + vc4_hvs_alloc_dlist_entry(struct vc4_hvs *hvs, + unsigned int channel, +@@ -642,6 +645,7 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs + struct vc4_dev *vc4 = hvs->vc4; + struct drm_device *dev = &vc4->base; + struct vc4_hvs_dlist_allocation *alloc; ++ struct vc4_hvs_dlist_allocation *cur, *next; + unsigned long flags; + int ret; + +@@ -659,9 +663,26 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs + dlist_count); + spin_unlock_irqrestore(&hvs->mm_lock, flags); + if (ret) { +- drm_err(dev, "Failed to allocate DLIST entry. Requested size=%zu. ret=%d\n", +- dlist_count, ret); +- return ERR_PTR(ret); ++ drm_err(dev, "Failed to allocate DLIST entry. Requested size=%zu. ret=%d. DISPCTRL is %08x\n", ++ dlist_count, ret, HVS_READ(SCALER_DISPCTRL)); ++ ++ /* This should never happen as stale entries should get released ++ * as the frame counter interrupt triggers. ++ * However we've seen this fail for reasons currently unknown. ++ * Free all stale entries now so we should be able to complete ++ * this allocation. ++ */ ++ spin_lock_irqsave(&hvs->mm_lock, flags); ++ list_for_each_entry_safe(cur, next, &hvs->stale_dlist_entries, node) { ++ vc4_hvs_free_dlist_entry_locked(hvs, cur); ++ } ++ ++ ret = drm_mm_insert_node(&hvs->dlist_mm, &alloc->mm_node, ++ dlist_count); ++ spin_unlock_irqrestore(&hvs->mm_lock, flags); ++ ++ if (ret) ++ return ERR_PTR(ret); + } + + alloc->channel = channel; diff --git a/target/linux/bcm27xx/patches-6.1/950-1249-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch b/target/linux/bcm27xx/patches-6.1/950-1249-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch new file mode 100644 index 0000000000..73f308bba3 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1249-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch @@ -0,0 +1,55 @@ +From cd62562b276b5724d1c75ea1465937a5bd9037db Mon Sep 17 00:00:00 2001 +From: Giedrius +Date: Fri, 19 Jan 2024 10:55:55 +0000 +Subject: [PATCH 1249/1295] Pisound: Don't export the button GPIO via sysfs + GPIO class. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Giedrius Trainavičius +--- + sound/soc/bcm/pisound.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +--- a/sound/soc/bcm/pisound.c ++++ b/sound/soc/bcm/pisound.c +@@ -857,7 +857,6 @@ static int pisnd_ctl_uninit(void) + + static struct gpio_desc *osr0, *osr1, *osr2; + static struct gpio_desc *reset; +-static struct gpio_desc *button; + + static int pisnd_hw_params( + struct snd_pcm_substream *substream, +@@ -1016,8 +1015,6 @@ static int pisnd_init_gpio(struct device + + reset = gpiod_get_index(dev, "reset", 0, GPIOD_ASIS); + +- button = gpiod_get_index(dev, "button", 0, GPIOD_ASIS); +- + gpiod_direction_output(osr0, 1); + gpiod_direction_output(osr1, 1); + gpiod_direction_output(osr2, 1); +@@ -1029,8 +1026,6 @@ static int pisnd_init_gpio(struct device + gpiod_set_value(osr2, false); + gpiod_set_value(reset, true); + +- gpiod_export(button, false); +- + return 0; + } + +@@ -1039,11 +1034,9 @@ static int pisnd_uninit_gpio(void) + int i; + + struct gpio_desc **gpios[] = { +- &osr0, &osr1, &osr2, &reset, &button, ++ &osr0, &osr1, &osr2, &reset, + }; + +- gpiod_unexport(button); +- + for (i = 0; i < ARRAY_SIZE(gpios); ++i) { + if (*gpios[i] == NULL) { + printd("weird, GPIO[%d] is NULL already\n", i); diff --git a/target/linux/bcm27xx/patches-6.1/950-1250-Pisound-Read-out-the-SPI-speed-to-use-from-the-Devic.patch b/target/linux/bcm27xx/patches-6.1/950-1250-Pisound-Read-out-the-SPI-speed-to-use-from-the-Devic.patch new file mode 100644 index 0000000000..5da78175b1 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1250-Pisound-Read-out-the-SPI-speed-to-use-from-the-Devic.patch @@ -0,0 +1,94 @@ +From 273139b285f7a1a825eb689943626a0172b8802b Mon Sep 17 00:00:00 2001 +From: Giedrius +Date: Mon, 22 Jan 2024 13:26:58 +0000 +Subject: [PATCH 1250/1295] Pisound: Read out the SPI speed to use from the + Device Tree. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Giedrius Trainavičius +--- + sound/soc/bcm/pisound.c | 31 ++++++++++++++++++++++++++----- + 1 file changed, 26 insertions(+), 5 deletions(-) + +--- a/sound/soc/bcm/pisound.c ++++ b/sound/soc/bcm/pisound.c +@@ -1,6 +1,6 @@ + /* + * Pisound Linux kernel module. +- * Copyright (C) 2016-2020 Vilniaus Blokas UAB, https://blokas.io/pisound ++ * Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -142,14 +142,14 @@ static void pisnd_input_trigger(struct s + } + } + +-static struct snd_rawmidi_ops pisnd_output_ops = { ++static const struct snd_rawmidi_ops pisnd_output_ops = { + .open = pisnd_output_open, + .close = pisnd_output_close, + .trigger = pisnd_output_trigger, + .drain = pisnd_output_drain, + }; + +-static struct snd_rawmidi_ops pisnd_input_ops = { ++static const struct snd_rawmidi_ops pisnd_input_ops = { + .open = pisnd_input_open, + .close = pisnd_input_close, + .trigger = pisnd_input_trigger, +@@ -226,6 +226,7 @@ static char g_id[25]; + enum { MAX_VERSION_STR_LEN = 6 }; + static char g_fw_version[MAX_VERSION_STR_LEN]; + static char g_hw_version[MAX_VERSION_STR_LEN]; ++static u32 g_spi_speed_hz; + + static uint8_t g_ledFlashDuration; + static bool g_ledFlashDurationChanged; +@@ -329,7 +330,7 @@ static void spi_transfer(const uint8_t * + transfer.tx_buf = txbuf; + transfer.rx_buf = rxbuf; + transfer.len = len; +- transfer.speed_hz = 150000; ++ transfer.speed_hz = g_spi_speed_hz; + transfer.delay.value = 10; + transfer.delay.unit = SPI_DELAY_UNIT_USECS; + +@@ -646,6 +647,26 @@ static int pisnd_spi_init(struct device + memset(g_fw_version, 0, sizeof(g_fw_version)); + memset(g_hw_version, 0, sizeof(g_hw_version)); + ++ g_spi_speed_hz = 150000; ++ if (dev->of_node) { ++ struct device_node *spi_node; ++ ++ spi_node = of_parse_phandle( ++ dev->of_node, ++ "spi-controller", ++ 0 ++ ); ++ ++ if (spi_node) { ++ ret = of_property_read_u32(spi_node, "spi-speed-hz", &g_spi_speed_hz); ++ if (ret != 0) ++ printe("Failed reading spi-speed-hz! (%d)\n", ret); ++ ++ of_node_put(spi_node); ++ } ++ } ++ printi("Using SPI speed: %u\n", g_spi_speed_hz); ++ + spi = pisnd_spi_find_device(); + + if (spi != NULL) { +@@ -950,7 +971,7 @@ static int pisnd_startup(struct snd_pcm_ + return 0; + } + +-static struct snd_soc_ops pisnd_ops = { ++static const struct snd_soc_ops pisnd_ops = { + .startup = pisnd_startup, + .hw_params = pisnd_hw_params, + }; diff --git a/target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch b/target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch new file mode 100644 index 0000000000..b0ddd8f5ab --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch @@ -0,0 +1,129 @@ +From 92123f0abd5e24c150b54c56261813ced432ac87 Mon Sep 17 00:00:00 2001 +From: Giedrius +Date: Mon, 22 Jan 2024 13:29:24 +0000 +Subject: [PATCH 1251/1295] Pisound: Set the spi-speed-hz for Pisound in the + Device Tree overlay, and specify spi-speed-hz override for Pi 5. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Giedrius Trainavičius +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 8 ++++- + arch/arm/boot/dts/overlays/overlay_map.dts | 10 ++++++ + .../arm/boot/dts/overlays/pisound-overlay.dts | 4 ++- + .../boot/dts/overlays/pisound-pi5-overlay.dts | 31 +++++++++++++++++++ + 5 files changed, 52 insertions(+), 2 deletions(-) + create mode 100644 arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -192,6 +192,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + piscreen.dtbo \ + piscreen2r.dtbo \ + pisound.dtbo \ ++ pisound-pi5.dtbo \ + pitft22.dtbo \ + pitft28-capacitive.dtbo \ + pitft28-resistive.dtbo \ +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -3486,11 +3486,17 @@ Params: speed Display + + + Name: pisound +-Info: Configures the Blokas Labs pisound card ++Info: Configures the Blokas Labs Pisound card + Load: dtoverlay=pisound + Params: + + ++Name: pisound-pi5 ++Info: Pi 5 specific overlay override for Blokas Labs Pisound card, see pisound ++Load: dtoverlay=pisound-pi5 ++Params: ++ ++ + Name: pitft22 + Info: Adafruit PiTFT 2.2" screen + Load: dtoverlay=pitft22,= +--- a/arch/arm/boot/dts/overlays/overlay_map.dts ++++ b/arch/arm/boot/dts/overlays/overlay_map.dts +@@ -203,6 +203,16 @@ + renamed = "miniuart-bt"; + }; + ++ pisound { ++ bcm2835; ++ bcm2711; ++ bcm2712 = "pisound-pi5"; ++ }; ++ ++ pisound-pi5 { ++ bcm2712; ++ }; ++ + pwm1 { + bcm2711; + }; +--- a/arch/arm/boot/dts/overlays/pisound-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pisound-overlay.dts +@@ -1,6 +1,6 @@ + /* + * Pisound Linux kernel module. +- * Copyright (C) 2016-2017 Vilniaus Blokas UAB, https://blokas.io/pisound ++ * Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -56,6 +56,7 @@ + compatible = "blokaslabs,pisound-spi"; + reg = <0>; + spi-max-frequency = <1000000>; ++ spi-speed-hz = <150000>; + }; + }; + }; +@@ -76,6 +77,7 @@ + __overlay__ { + compatible = "blokaslabs,pisound"; + i2s-controller = <&i2s_clk_consumer>; ++ spi-controller = <&pisound_spi>; + status = "okay"; + + pinctrl-names = "default"; +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts +@@ -0,0 +1,31 @@ ++/* ++ * Pisound Linux kernel module. ++ * Copyright (C) 2016-2024 Vilniaus Blokas UAB, https://blokas.io/pisound ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; version 2 of the ++ * License. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++#include "pisound-overlay.dts" ++ ++&pisound_spi { ++ spi-speed-hz = <100000>; ++}; ++ ++/ { ++ compatible = "brcm,bcm2712"; ++}; diff --git a/target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch b/target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch new file mode 100644 index 0000000000..9fabd9fd13 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch @@ -0,0 +1,51 @@ +From f85acc3d0fb33ce5c92578dca7b1345915f744ff Mon Sep 17 00:00:00 2001 +From: Tiago Freire <41837236+tiagofreire-pt@users.noreply.github.com> +Date: Tue, 23 Jan 2024 12:10:24 +0000 +Subject: [PATCH 1252/1295] Improvement on backup-switchover-mode overlay value + definitions (#5884) + +For the RV3028 RTC, the definitions for its `backup-switchover-mode` overlay +were not intelligible neither complete/exhaustive. + +Accordingly to the https://github.com/raspberrypi/linux/issues/2912#issuecomment-477670051 +these one here proposed should be correct. + +`/boot/config.txt` should be as a configuration example, for rv3028, on a + Uputronics GPS Extension HAT: + + # For GPS Expansion Board from Uputronics + dtparam=i2c_arm=on + dtoverlay=i2c-rtc,rv3028,backup-switchover-mode=3 + dtoverlay=pps-gpio,gpiopin=18 + init_uart_baud=115200 + +From my tests (`sudo rmmod rtc_rv3028 && sudo i2cget -y 1 0x52 0x37`): + +`Default from factory`: `0x10` +`Mode 0`: `0x10` +`Mode 1`: `0x14` +`Mode 2`: `0x18` +`Mode 3`: `0x1c` + +`Mode 3`: `0x1c` is consistent with the manufacturer configuration script: http://store.uputronics.com/files/configure-rv3028.sh +--- + arch/arm/boot/dts/overlays/README | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -2106,7 +2106,13 @@ Params: abx80x Select o + source + + backup-switchover-mode Backup power supply switch mode. Must be 0 for +- off or 1 for Vdd < VBackup (RV3028, RV3032) ++ "Switchover disabled", 1 for "Direct Switching" ++ (if Vdd < VBackup), 2 for "Standby ++ Mode" (if Vdd < Vbackup, ++ does not draw current) or 3 for ++ "Level Switching" (if Vdd < Vbackup ++ and Vdd < Vddsw and Vbackup > Vddsw) ++ (RV3028, RV3032) + + + Name: i2c-rtc-gpio diff --git a/target/linux/bcm27xx/patches-6.1/950-1253-Harmonizing-the-improvement-on-backup-switchover-mod.patch b/target/linux/bcm27xx/patches-6.1/950-1253-Harmonizing-the-improvement-on-backup-switchover-mod.patch new file mode 100644 index 0000000000..b5fe17b959 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1253-Harmonizing-the-improvement-on-backup-switchover-mod.patch @@ -0,0 +1,30 @@ +From f2ada4aa6b1d214c67b7efe874a408be9b4eaf3f Mon Sep 17 00:00:00 2001 +From: Tiago Freire <41837236+tiagofreire-pt@users.noreply.github.com> +Date: Wed, 24 Jan 2024 10:03:03 +0000 +Subject: [PATCH 1253/1295] Harmonizing the improvement on + backup-switchover-mode overlay value definitions + +On the followup of https://github.com/raspberrypi/linux/pull/5884, I missed a second duplicate definition. Now, harmonized the entire document. + +Signed-off-by: Tiago Freire <41837236+tiagofreire-pt@users.noreply.github.com> +--- + arch/arm/boot/dts/overlays/README | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -2184,7 +2184,13 @@ Params: abx80x Select o + source + + backup-switchover-mode Backup power supply switch mode. Must be 0 for +- off or 1 for Vdd < VBackup (RV3028, RV3032) ++ "Switchover disabled", 1 for "Direct Switching" ++ (if Vdd < VBackup), 2 for "Standby ++ Mode" (if Vdd < Vbackup, ++ does not draw current) or 3 for ++ "Level Switching" (if Vdd < Vbackup ++ and Vdd < Vddsw and Vbackup > Vddsw) ++ (RV3028, RV3032) + + i2c_gpio_sda GPIO used for I2C data (default "23") + diff --git a/target/linux/bcm27xx/patches-6.1/950-1254-Add-pcie-32bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch b/target/linux/bcm27xx/patches-6.1/950-1254-Add-pcie-32bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch new file mode 100644 index 0000000000..2127d2ca4f --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1254-Add-pcie-32bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch @@ -0,0 +1,85 @@ +From 1cdbd99f402b76c61632d09a49b20ce90af0cc72 Mon Sep 17 00:00:00 2001 +From: Rodrigo Rosmaninho +Date: Tue, 23 Jan 2024 18:50:19 +0000 +Subject: [PATCH 1254/1295] Add pcie-32bit-dma-overlay-pi5 to enable 32bit DMA + on the Pi 5's external PCIe + +Changes dma-ranges in the pcie1 component of the bcm2712 dts in order to ensure that the DMA addressing space is 32bits, at the expense of having to bounce buffers. + +Signed-off-by: Rodrigo Rosmaninho +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 +++++ + arch/arm/boot/dts/overlays/overlay_map.dts | 5 ++++ + .../overlays/pcie-32bit-dma-pi5-overlay.dts | 26 +++++++++++++++++++ + 4 files changed, 38 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/pcie-32bit-dma-pi5-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -182,6 +182,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + pca953x.dtbo \ + pcf857x.dtbo \ + pcie-32bit-dma.dtbo \ ++ pcie-32bit-dma-pi5.dtbo \ + pibell.dtbo \ + pifacedigital.dtbo \ + pifi-40.dtbo \ +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -3388,6 +3388,12 @@ Load: dtoverlay=pcie-32bit-dma + Params: + + ++Name: pcie-32bit-dma-pi5 ++Info: Force PCIe config to support 32bit DMA addresses at the expense of ++ having to bounce buffers (on the Pi 5). ++Load: dtoverlay=pcie-32bit-dma-pi5 ++Params: ++ + [ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ] + + +--- a/arch/arm/boot/dts/overlays/overlay_map.dts ++++ b/arch/arm/boot/dts/overlays/overlay_map.dts +@@ -185,6 +185,11 @@ + + pcie-32bit-dma { + bcm2711; ++ bcm2712 = "pcie-32bit-dma-pi5"; ++ }; ++ ++ pcie-32bit-dma-pi5 { ++ bcm2712; + }; + + pi3-act-led { +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/pcie-32bit-dma-pi5-overlay.dts +@@ -0,0 +1,26 @@ ++/* ++ * pcie-32bit-dma-pi5-overlay.dts ++ */ ++ ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2712"; ++ ++ fragment@0 { ++ target = <&pcie1>; ++ __overlay__ { ++ /* ++ * The size of the range is rounded up to a power of 2, ++ * so the range ends up being 0-4GB, and the MSI vector ++ * gets pushed beyond 4GB. ++ */ ++ #address-cells = <3>; ++ #size-cells = <2>; ++ dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 ++ 0x0 0x80000000>; ++ }; ++ }; ++ ++}; diff --git a/target/linux/bcm27xx/patches-6.1/950-1257-i2c-designware-Use-SCL-rise-and-fall-times-in-DT.patch b/target/linux/bcm27xx/patches-6.1/950-1257-i2c-designware-Use-SCL-rise-and-fall-times-in-DT.patch new file mode 100644 index 0000000000..3aa719cc80 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1257-i2c-designware-Use-SCL-rise-and-fall-times-in-DT.patch @@ -0,0 +1,91 @@ +From b660279cc83aff2018cecfc3fb55757a8d64f607 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 16 Jan 2024 15:54:22 +0000 +Subject: [PATCH 1257/1295] i2c: designware: Use SCL rise and fall times in DT + +Calculate the HCNT and LCNT values for all modes using the rise and +fall times of SCL, the aim being a 50/50 mark/space ratio. + +Signed-off-by: Phil Elwell +--- + drivers/i2c/busses/i2c-designware-master.c | 26 ++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +--- a/drivers/i2c/busses/i2c-designware-master.c ++++ b/drivers/i2c/busses/i2c-designware-master.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -37,6 +38,22 @@ static void i2c_dw_configure_fifo_master + regmap_write(dev->map, DW_IC_CON, dev->master_cfg); + } + ++static u16 clock_calc(struct dw_i2c_dev *dev, bool want_high) ++{ ++ struct i2c_timings *t = &dev->timings; ++ u32 wanted_speed = t->bus_freq_hz; ++ u32 clk_khz = i2c_dw_clk_rate(dev); ++ u32 extra_ns = want_high ? t->scl_fall_ns : t->scl_rise_ns; ++ u32 extra_cycles = (u32)div_u64((u64)clk_khz * extra_ns, 1000000); ++ u32 period = div_u64((u64)clk_khz * 1000 + wanted_speed - 1, wanted_speed); ++ u32 cycles = (period + want_high)/2 - extra_cycles; ++ ++ if (cycles > 0xffff) ++ cycles = 0xffff; ++ ++ return (u16)cycles; ++} ++ + static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) + { + u32 comp_param1; +@@ -44,6 +61,7 @@ static int i2c_dw_set_timings_master(str + struct i2c_timings *t = &dev->timings; + const char *fp_str = ""; + u32 ic_clk; ++ u32 hcnt, lcnt; + int ret; + + ret = i2c_dw_acquire_lock(dev); +@@ -59,6 +77,9 @@ static int i2c_dw_set_timings_master(str + sda_falling_time = t->sda_fall_ns ?: 300; /* ns */ + scl_falling_time = t->scl_fall_ns ?: 300; /* ns */ + ++ hcnt = clock_calc(dev, true); ++ lcnt = clock_calc(dev, false); ++ + /* Calculate SCL timing parameters for standard mode if not set */ + if (!dev->ss_hcnt || !dev->ss_lcnt) { + ic_clk = i2c_dw_clk_rate(dev); +@@ -74,6 +95,8 @@ static int i2c_dw_set_timings_master(str + scl_falling_time, + 0); /* No offset */ + } ++ dev->ss_hcnt = hcnt; ++ dev->ss_lcnt = lcnt; + dev_dbg(dev->dev, "Standard Mode HCNT:LCNT = %d:%d\n", + dev->ss_hcnt, dev->ss_lcnt); + +@@ -124,6 +147,8 @@ static int i2c_dw_set_timings_master(str + scl_falling_time, + 0); /* No offset */ + } ++ dev->fs_hcnt = hcnt; ++ dev->fs_lcnt = lcnt; + dev_dbg(dev->dev, "Fast Mode%s HCNT:LCNT = %d:%d\n", + fp_str, dev->fs_hcnt, dev->fs_lcnt); + +@@ -152,6 +177,8 @@ static int i2c_dw_set_timings_master(str + scl_falling_time, + 0); /* No offset */ + } ++ dev->hs_hcnt = hcnt; ++ dev->hs_lcnt = lcnt; + dev_dbg(dev->dev, "High Speed Mode HCNT:LCNT = %d:%d\n", + dev->hs_hcnt, dev->hs_lcnt); + } diff --git a/target/linux/bcm27xx/patches-6.1/950-1258-i2c-designware-Support-non-standard-bus-speeds.patch b/target/linux/bcm27xx/patches-6.1/950-1258-i2c-designware-Support-non-standard-bus-speeds.patch new file mode 100644 index 0000000000..fc24d508e0 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1258-i2c-designware-Support-non-standard-bus-speeds.patch @@ -0,0 +1,80 @@ +From 6868dba87e2765042ac376a4a8427b9b981cd410 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 16 Jan 2024 16:03:14 +0000 +Subject: [PATCH 1258/1295] i2c: designware: Support non-standard bus speeds + +Add support for non-standard bus speeds by treating them as detuned +versions of the slowest standard speed not less than the requested +speed. + +Signed-off-by: Phil Elwell +--- + drivers/i2c/busses/i2c-designware-common.c | 27 ++++++++++++++++++++++ + drivers/i2c/busses/i2c-designware-core.h | 1 + + drivers/i2c/busses/i2c-designware-master.c | 2 +- + 3 files changed, 29 insertions(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-designware-common.c ++++ b/drivers/i2c/busses/i2c-designware-common.c +@@ -318,6 +318,9 @@ void i2c_dw_adjust_bus_speed(struct dw_i + { + u32 acpi_speed = i2c_dw_acpi_round_bus_speed(dev->dev); + struct i2c_timings *t = &dev->timings; ++ u32 wanted_speed; ++ u32 legal_speed = 0; ++ int i; + + /* + * Find bus speed from the "clock-frequency" device property, ACPI +@@ -329,6 +332,30 @@ void i2c_dw_adjust_bus_speed(struct dw_i + t->bus_freq_hz = max(t->bus_freq_hz, acpi_speed); + else + t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ; ++ ++ wanted_speed = t->bus_freq_hz; ++ ++ /* For unsupported speeds, scale down the lowest speed which is faster. */ ++ for (i = 0; i < ARRAY_SIZE(supported_speeds); i++) { ++ /* supported speeds is in decreasing order */ ++ if (wanted_speed == supported_speeds[i]) { ++ legal_speed = 0; ++ break; ++ } ++ if (wanted_speed > supported_speeds[i]) ++ break; ++ ++ legal_speed = supported_speeds[i]; ++ } ++ ++ if (legal_speed) { ++ /* ++ * Pretend this was the requested speed, but preserve the preferred ++ * speed so the clock counts can be scaled. ++ */ ++ t->bus_freq_hz = legal_speed; ++ dev->wanted_bus_speed = wanted_speed; ++ } + } + EXPORT_SYMBOL_GPL(i2c_dw_adjust_bus_speed); + +--- a/drivers/i2c/busses/i2c-designware-core.h ++++ b/drivers/i2c/busses/i2c-designware-core.h +@@ -287,6 +287,7 @@ struct dw_i2c_dev { + u16 fp_lcnt; + u16 hs_hcnt; + u16 hs_lcnt; ++ u32 wanted_bus_speed; + int (*acquire_lock)(void); + void (*release_lock)(void); + int semaphore_idx; +--- a/drivers/i2c/busses/i2c-designware-master.c ++++ b/drivers/i2c/busses/i2c-designware-master.c +@@ -41,7 +41,7 @@ static void i2c_dw_configure_fifo_master + static u16 clock_calc(struct dw_i2c_dev *dev, bool want_high) + { + struct i2c_timings *t = &dev->timings; +- u32 wanted_speed = t->bus_freq_hz; ++ u32 wanted_speed = dev->wanted_bus_speed ?: t->bus_freq_hz; + u32 clk_khz = i2c_dw_clk_rate(dev); + u32 extra_ns = want_high ? t->scl_fall_ns : t->scl_rise_ns; + u32 extra_cycles = (u32)div_u64((u64)clk_khz * extra_ns, 1000000); diff --git a/target/linux/bcm27xx/patches-6.1/950-1259-ARM-dts-rp1-Add-I2C-timings.patch b/target/linux/bcm27xx/patches-6.1/950-1259-ARM-dts-rp1-Add-I2C-timings.patch new file mode 100644 index 0000000000..adf7cc25bc --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1259-ARM-dts-rp1-Add-I2C-timings.patch @@ -0,0 +1,78 @@ +From 4c7a8e9e40d915c61df188d6b9f82836b616bd4f Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 16 Jan 2024 16:05:18 +0000 +Subject: [PATCH 1259/1295] ARM: dts: rp1: Add I2C timings + +Add SCL rise and fall times, to allow the derivation of timings at +arbitrary speeds. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/rp1.dtsi | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/arch/arm/boot/dts/rp1.dtsi ++++ b/arch/arm/boot/dts/rp1.dtsi +@@ -305,6 +305,8 @@ + compatible = "snps,designware-i2c"; + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_SYS>; ++ i2c-scl-rising-time-ns = <65>; ++ i2c-scl-falling-time-ns = <100>; + status = "disabled"; + }; + +@@ -313,6 +315,8 @@ + compatible = "snps,designware-i2c"; + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_SYS>; ++ i2c-scl-rising-time-ns = <65>; ++ i2c-scl-falling-time-ns = <100>; + status = "disabled"; + }; + +@@ -321,6 +325,8 @@ + compatible = "snps,designware-i2c"; + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_SYS>; ++ i2c-scl-rising-time-ns = <65>; ++ i2c-scl-falling-time-ns = <100>; + status = "disabled"; + }; + +@@ -329,6 +335,8 @@ + compatible = "snps,designware-i2c"; + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_SYS>; ++ i2c-scl-rising-time-ns = <65>; ++ i2c-scl-falling-time-ns = <100>; + status = "disabled"; + }; + +@@ -337,6 +345,8 @@ + compatible = "snps,designware-i2c"; + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_SYS>; ++ i2c-scl-rising-time-ns = <65>; ++ i2c-scl-falling-time-ns = <100>; + status = "disabled"; + }; + +@@ -345,6 +355,8 @@ + compatible = "snps,designware-i2c"; + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_SYS>; ++ i2c-scl-rising-time-ns = <65>; ++ i2c-scl-falling-time-ns = <100>; + status = "disabled"; + }; + +@@ -353,6 +365,8 @@ + compatible = "snps,designware-i2c"; + interrupts = ; + clocks = <&rp1_clocks RP1_CLK_SYS>; ++ i2c-scl-rising-time-ns = <65>; ++ i2c-scl-falling-time-ns = <100>; + status = "disabled"; + }; + diff --git a/target/linux/bcm27xx/patches-6.1/950-1260-iommu-bcm2712-don-t-allow-building-as-module.patch b/target/linux/bcm27xx/patches-6.1/950-1260-iommu-bcm2712-don-t-allow-building-as-module.patch new file mode 100644 index 0000000000..98790267f6 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1260-iommu-bcm2712-don-t-allow-building-as-module.patch @@ -0,0 +1,28 @@ +From 86450c7dc4df99c3b16677cb00c2d3caf01a40f6 Mon Sep 17 00:00:00 2001 +From: Ratchanan Srirattanamet +Date: Tue, 30 Jan 2024 14:09:00 +0700 +Subject: [PATCH 1260/1295] iommu/bcm2712: don't allow building as module + +Since bcm2712-iommu{,-cache}.c doesn't have usual module descriptors +such as `MODULE_LICENSE`, configuring this as 'M' fails the build with +`ERROR: modpost: missing MODULE_LICENSE() in <...>/bcm2712-iommu.o`. +Since it seems like the code is not intended to be built as a module +anyway (it registers the driver with `builtin_platform_driver()`), don't +allow building this code as a module. + +Signed-off-by: Ratchanan Srirattanamet +--- + drivers/iommu/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iommu/Kconfig ++++ b/drivers/iommu/Kconfig +@@ -507,7 +507,7 @@ config SPRD_IOMMU + Say Y here if you want to use the multimedia devices listed above. + + config BCM2712_IOMMU +- tristate "BCM2712 IOMMU driver" ++ bool "BCM2712 IOMMU driver" + depends on ARM64 && ARCH_BCM + select IOMMU_API + help diff --git a/target/linux/bcm27xx/patches-6.1/950-1261-drm-rp1-depends-on-instead-of-select-MFD_RP1.patch b/target/linux/bcm27xx/patches-6.1/950-1261-drm-rp1-depends-on-instead-of-select-MFD_RP1.patch new file mode 100644 index 0000000000..9e6755b378 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1261-drm-rp1-depends-on-instead-of-select-MFD_RP1.patch @@ -0,0 +1,59 @@ +From 57695002a68bdd4c077ea2173b64aeee6e1ef24f Mon Sep 17 00:00:00 2001 +From: Ratchanan Srirattanamet +Date: Fri, 26 Jan 2024 18:49:42 +0700 +Subject: [PATCH 1261/1295] drm/rp1: depends on, instead of select, MFD_RP1 + +According to kconfig-language.txt [1], select should be used only for +"non-visible symbols ... and for symbols with no dependencies". Since +MFD_RP1 both is visible and has a dependency, "select" should not be +used and "depends on" should be used instead. + +In particular, this fixes the build of this kernel tree on NixOS, where +its kernel config system will try to answer 'M' to as many config as +possible. + +[1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html + +Signed-off-by: Ratchanan Srirattanamet +--- + drivers/gpu/drm/rp1/rp1-dpi/Kconfig | 3 +-- + drivers/gpu/drm/rp1/rp1-dsi/Kconfig | 3 +-- + drivers/gpu/drm/rp1/rp1-vec/Kconfig | 3 +-- + 3 files changed, 3 insertions(+), 6 deletions(-) + +--- a/drivers/gpu/drm/rp1/rp1-dpi/Kconfig ++++ b/drivers/gpu/drm/rp1/rp1-dpi/Kconfig +@@ -1,8 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0-only + config DRM_RP1_DPI + tristate "DRM Support for RP1 DPI" +- depends on DRM +- select MFD_RP1 ++ depends on DRM && MFD_RP1 + select DRM_GEM_DMA_HELPER + select DRM_KMS_HELPER + select DRM_VRAM_HELPER +--- a/drivers/gpu/drm/rp1/rp1-dsi/Kconfig ++++ b/drivers/gpu/drm/rp1/rp1-dsi/Kconfig +@@ -1,8 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0-only + config DRM_RP1_DSI + tristate "DRM Support for RP1 DSI" +- depends on DRM +- select MFD_RP1 ++ depends on DRM && MFD_RP1 + select DRM_GEM_DMA_HELPER + select DRM_KMS_HELPER + select DRM_MIPI_DSI +--- a/drivers/gpu/drm/rp1/rp1-vec/Kconfig ++++ b/drivers/gpu/drm/rp1/rp1-vec/Kconfig +@@ -1,8 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0-only + config DRM_RP1_VEC + tristate "DRM Support for RP1 VEC" +- depends on DRM +- select MFD_RP1 ++ depends on DRM && MFD_RP1 + select DRM_GEM_DMA_HELPER + select DRM_KMS_HELPER + select DRM_VRAM_HELPER diff --git a/target/linux/bcm27xx/patches-6.1/950-1262-Update-touch-PiTFT-overlays.patch b/target/linux/bcm27xx/patches-6.1/950-1262-Update-touch-PiTFT-overlays.patch new file mode 100644 index 0000000000..43c275fde1 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1262-Update-touch-PiTFT-overlays.patch @@ -0,0 +1,435 @@ +From 1c2a93ce0e1cf6d278cf565346183d7592cfbb24 Mon Sep 17 00:00:00 2001 +From: Melissa LeBlanc-Williams +Date: Fri, 26 Jan 2024 14:41:42 -0800 +Subject: [PATCH 1262/1295] Update touch PiTFT overlays + +Expose the invert and swap touch parameters on 2.8" and 3.5" resistive touchscreens. Add +the DRM parameter to the PiTFT 2.2" and 2.8" Capacitive overlay in the same +way it is on the resistive overlays. Change the DRM driver to `adafruit,yx240qv29` +because the rotations are consistent with the FBTFT Driver. Fix the override size parameters +on the 2.8" capacitive PiTFT. + +Signed-off-by: Melissa LeBlanc-Williams +--- + arch/arm/boot/dts/overlays/README | 20 +++ + .../arm/boot/dts/overlays/pitft22-overlay.dts | 102 +++++++------- + .../overlays/pitft28-capacitive-overlay.dts | 132 +++++++++--------- + .../overlays/pitft28-resistive-overlay.dts | 12 +- + .../overlays/pitft35-resistive-overlay.dts | 10 +- + 5 files changed, 156 insertions(+), 120 deletions(-) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -3526,6 +3526,10 @@ Params: speed Display + + debug Debug output level {0-7} + ++ drm Force the use of the mi0283qt DRM driver (by ++ default the ili9340 framebuffer driver will ++ be used in preference if available) ++ + + Name: pitft28-capacitive + Info: Adafruit PiTFT 2.8" capacitive touch screen +@@ -3538,6 +3542,10 @@ Params: speed Display + + debug Debug output level {0-7} + ++ drm Force the use of the mi0283qt DRM driver (by ++ default the ili9340 framebuffer driver will ++ be used in preference if available) ++ + touch-sizex Touchscreen size x (default 240) + + touch-sizey Touchscreen size y (default 320) +@@ -3564,6 +3572,12 @@ Params: speed Display + default the ili9340 framebuffer driver will + be used in preference if available) + ++ touch-invx Touchscreen inverted x axis ++ ++ touch-invy Touchscreen inverted y axis ++ ++ touch-swapxy Touchscreen swapped x y axis ++ + + Name: pitft35-resistive + Info: Adafruit PiTFT 3.5" resistive touch screen +@@ -3580,6 +3594,12 @@ Params: speed Display + default the fb_hx8357d framebuffer driver will + be used in preference if available) + ++ touch-invx Touchscreen inverted x axis ++ ++ touch-invy Touchscreen inverted y axis ++ ++ touch-swapxy Touchscreen swapped x y axis ++ + + Name: pps-gpio + Info: Configures the pps-gpio (pulse-per-second time signal via GPIO). +--- a/arch/arm/boot/dts/overlays/pitft22-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts +@@ -7,63 +7,65 @@ + /plugin/; + + / { +- compatible = "brcm,bcm2835"; ++ compatible = "brcm,bcm2835"; + +- fragment@0 { +- target = <&spidev0>; +- __overlay__ { +- status = "disabled"; +- }; ++ fragment@0 { ++ target = <&spidev0>; ++ __overlay__ { ++ status = "disabled"; ++ }; + }; + +- fragment@1 { +- target = <&spidev1>; +- __overlay__ { +- status = "disabled"; +- }; +- }; +- +- fragment@2 { +- target = <&gpio>; +- __overlay__ { +- pitft_pins: pitft_pins { +- brcm,pins = <25>; +- brcm,function = <1>; /* out */ +- brcm,pull = <0>; /* none */ +- }; +- }; +- }; +- +- fragment@3 { +- target = <&spi0>; +- __overlay__ { +- /* needed to avoid dtc warning */ +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- +- pitft: pitft@0{ +- compatible = "ilitek,ili9340"; +- reg = <0>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pitft_pins>; +- +- spi-max-frequency = <32000000>; +- rotate = <90>; +- fps = <25>; +- bgr; +- buswidth = <8>; +- dc-gpios = <&gpio 25 0>; +- debug = <0>; +- }; +- +- }; +- }; +- +- __overrides__ { +- speed = <&pitft>,"spi-max-frequency:0"; +- rotate = <&pitft>,"rotate:0"; +- fps = <&pitft>,"fps:0"; +- debug = <&pitft>,"debug:0"; +- }; ++ fragment@1 { ++ target = <&spidev1>; ++ __overlay__ { ++ status = "disabled"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&gpio>; ++ __overlay__ { ++ pitft_pins: pitft_pins { ++ brcm,pins = <25>; ++ brcm,function = <1>; /* out */ ++ brcm,pull = <0>; /* none */ ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&spi0>; ++ __overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pitft: pitft@0{ ++ compatible = "ilitek,ili9340"; ++ reg = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pitft_pins>; ++ ++ spi-max-frequency = <32000000>; ++ rotate = <90>; ++ fps = <25>; ++ bgr; ++ buswidth = <8>; ++ dc-gpios = <&gpio 25 0>; ++ debug = <0>; ++ }; ++ ++ }; ++ }; ++ ++ __overrides__ { ++ speed = <&pitft>,"spi-max-frequency:0"; ++ rotate = <&pitft>,"rotate:0", /* fbtft */ ++ <&pitft>,"rotation:0"; /* drm */ ++ fps = <&pitft>,"fps:0"; ++ debug = <&pitft>,"debug:0"; ++ drm = <&pitft>,"compatible=adafruit,yx240qv29"; ++ }; + }; +--- a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts +@@ -7,14 +7,14 @@ + /plugin/; + + / { +- compatible = "brcm,bcm2835"; ++ compatible = "brcm,bcm2835"; + +- fragment@0 { +- target = <&spi0>; +- __overlay__ { +- status = "okay"; +- }; +- }; ++ fragment@0 { ++ target = <&spi0>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; + + fragment@1 { + target = <&spidev0>; +@@ -23,69 +23,71 @@ + }; + }; + +- fragment@2 { +- target = <&gpio>; +- __overlay__ { +- pitft_pins: pitft_pins { +- brcm,pins = <24 25>; +- brcm,function = <0 1>; /* in out */ +- brcm,pull = <2 0>; /* pullup none */ +- }; +- }; +- }; +- +- fragment@3 { +- target = <&spi0>; +- __overlay__ { +- /* needed to avoid dtc warning */ +- #address-cells = <1>; +- #size-cells = <0>; +- +- pitft: pitft@0{ +- compatible = "ilitek,ili9340"; +- reg = <0>; +- pinctrl-names = "default"; +- pinctrl-0 = <&pitft_pins>; +- +- spi-max-frequency = <32000000>; +- rotate = <90>; +- fps = <25>; +- bgr; +- buswidth = <8>; +- dc-gpios = <&gpio 25 0>; +- debug = <0>; +- }; +- }; +- }; +- +- fragment@4 { +- target = <&i2c1>; +- __overlay__ { +- /* needed to avoid dtc warning */ +- #address-cells = <1>; +- #size-cells = <0>; +- +- ft6236: ft6236@38 { +- compatible = "focaltech,ft6236"; +- reg = <0x38>; +- +- interrupt-parent = <&gpio>; +- interrupts = <24 2>; +- touchscreen-size-x = <240>; +- touchscreen-size-y = <320>; +- }; +- }; +- }; +- +- __overrides__ { +- speed = <&pitft>,"spi-max-frequency:0"; +- rotate = <&pitft>,"rotate:0"; +- fps = <&pitft>,"fps:0"; +- debug = <&pitft>,"debug:0"; +- touch-sizex = <&ft6236>,"touchscreen-size-x?"; +- touch-sizey = <&ft6236>,"touchscreen-size-y?"; +- touch-invx = <&ft6236>,"touchscreen-inverted-x?"; +- touch-invy = <&ft6236>,"touchscreen-inverted-y?"; +- touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?"; +- }; ++ fragment@2 { ++ target = <&gpio>; ++ __overlay__ { ++ pitft_pins: pitft_pins { ++ brcm,pins = <24 25>; ++ brcm,function = <0 1>; /* in out */ ++ brcm,pull = <2 0>; /* pullup none */ ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&spi0>; ++ __overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ pitft: pitft@0{ ++ compatible = "ilitek,ili9340"; ++ reg = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pitft_pins>; ++ ++ spi-max-frequency = <32000000>; ++ rotate = <90>; ++ fps = <25>; ++ bgr; ++ buswidth = <8>; ++ dc-gpios = <&gpio 25 0>; ++ debug = <0>; ++ }; ++ }; ++ }; ++ ++ fragment@4 { ++ target = <&i2c1>; ++ __overlay__ { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ ft6236: ft6236@38 { ++ compatible = "focaltech,ft6236"; ++ reg = <0x38>; ++ ++ interrupt-parent = <&gpio>; ++ interrupts = <24 2>; ++ touchscreen-size-x = <240>; ++ touchscreen-size-y = <320>; ++ }; ++ }; ++ }; ++ ++ __overrides__ { ++ speed = <&pitft>,"spi-max-frequency:0"; ++ rotate = <&pitft>,"rotate:0", /* fbtft */ ++ <&pitft>,"rotation:0"; /* drm */ ++ fps = <&pitft>,"fps:0"; ++ debug = <&pitft>,"debug:0"; ++ drm = <&pitft>,"compatible=adafruit,yx240qv29"; ++ touch-sizex = <&ft6236>,"touchscreen-size-x:0"; ++ touch-sizey = <&ft6236>,"touchscreen-size-y:0"; ++ touch-invx = <&ft6236>,"touchscreen-inverted-x?"; ++ touch-invy = <&ft6236>,"touchscreen-inverted-y?"; ++ touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?"; ++ }; + }; +--- a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts +@@ -49,7 +49,7 @@ + #size-cells = <0>; + + pitft: pitft@0{ +- compatible = "ilitek,ili9340", "multi-inno,mi0283qt"; ++ compatible = "ilitek,ili9340"; + reg = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pitft_pins>; +@@ -64,6 +64,9 @@ + }; + + pitft_ts@1 { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #interrupt-cells = <1>; + compatible = "st,stmpe610"; + reg = <1>; + +@@ -72,7 +75,7 @@ + interrupt-parent = <&gpio>; + interrupt-controller; + +- stmpe_touchscreen { ++ stmpe_touchscreen: stmpe_touchscreen { + compatible = "st,stmpe-ts"; + st,sample-time = <4>; + st,mod-12b = <1>; +@@ -115,6 +118,9 @@ + <&pitft>,"rotation:0"; /* drm */ + fps = <&pitft>,"fps:0"; + debug = <&pitft>,"debug:0"; +- drm = <&pitft>,"compatible=multi-inno,mi0283qt"; ++ drm = <&pitft>,"compatible=adafruit,yx240qv29"; ++ touch-invx = <&stmpe_touchscreen>,"touchscreen-inverted-x?"; ++ touch-invy = <&stmpe_touchscreen>,"touchscreen-inverted-y?"; ++ touch-swapxy = <&stmpe_touchscreen>,"touchscreen-swapped-x-y?"; + }; + }; +--- a/arch/arm/boot/dts/overlays/pitft35-resistive-overlay.dts ++++ b/arch/arm/boot/dts/overlays/pitft35-resistive-overlay.dts +@@ -49,7 +49,7 @@ + #size-cells = <0>; + + pitft: pitft@0{ +- compatible = "himax,hx8357d", "adafruit,yx350hv15"; ++ compatible = "himax,hx8357d"; + reg = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pitft_pins>; +@@ -64,6 +64,9 @@ + }; + + pitft_ts@1 { ++ /* needed to avoid dtc warning */ ++ #address-cells = <1>; ++ #interrupt-cells = <1>; + compatible = "st,stmpe610"; + reg = <1>; + +@@ -72,7 +75,7 @@ + interrupt-parent = <&gpio>; + interrupt-controller; + +- stmpe_touchscreen { ++ stmpe_touchscreen: stmpe_touchscreen { + compatible = "st,stmpe-ts"; + st,sample-time = <4>; + st,mod-12b = <1>; +@@ -117,5 +120,8 @@ + debug = <&pitft>,"debug:0"; + drm = <&pitft>,"compatible=adafruit,yx350hv15", + <&pitft>,"backlight:0=",<&backlight>; ++ touch-invx = <&stmpe_touchscreen>,"touchscreen-inverted-x?"; ++ touch-invy = <&stmpe_touchscreen>,"touchscreen-inverted-y?"; ++ touch-swapxy = <&stmpe_touchscreen>,"touchscreen-swapped-x-y?"; + }; + }; diff --git a/target/linux/bcm27xx/patches-6.1/950-1263-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch b/target/linux/bcm27xx/patches-6.1/950-1263-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch new file mode 100644 index 0000000000..55ce6523db --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1263-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch @@ -0,0 +1,95 @@ +From ea9b088747d379256e2582dd5c29638bf4ff9928 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 31 Jan 2024 17:20:07 +0000 +Subject: [PATCH 1263/1295] ARM: dts: rp1: Boost the I2C drive strength + +Boosting the drive strength on I2C pins allows SCL to achieve safe +voltage swings, even at 1MHz. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/rp1.dtsi | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/arch/arm/boot/dts/rp1.dtsi ++++ b/arch/arm/boot/dts/rp1.dtsi +@@ -650,66 +650,79 @@ + rp1_i2c4_34_35: rp1_i2c4_34_35 { + function = "i2c4"; + pins = "gpio34", "gpio35"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c6_38_39: rp1_i2c6_38_39 { + function = "i2c6"; + pins = "gpio38", "gpio39"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c4_40_41: rp1_i2c4_40_41 { + function = "i2c4"; + pins = "gpio40", "gpio41"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c5_44_45: rp1_i2c5_44_45 { + function = "i2c5"; + pins = "gpio44", "gpio45"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c0_0_1: rp1_i2c0_0_1 { + function = "i2c0"; + pins = "gpio0", "gpio1"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c0_8_9: rp1_i2c0_8_9 { + function = "i2c0"; + pins = "gpio8", "gpio9"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c1_2_3: rp1_i2c1_2_3 { + function = "i2c1"; + pins = "gpio2", "gpio3"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c1_10_11: rp1_i2c1_10_11 { + function = "i2c1"; + pins = "gpio10", "gpio11"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c2_4_5: rp1_i2c2_4_5 { + function = "i2c2"; + pins = "gpio4", "gpio5"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c2_12_13: rp1_i2c2_12_13 { + function = "i2c2"; + pins = "gpio12", "gpio13"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c3_6_7: rp1_i2c3_6_7 { + function = "i2c3"; + pins = "gpio6", "gpio7"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c3_14_15: rp1_i2c3_14_15 { + function = "i2c3"; + pins = "gpio14", "gpio15"; ++ drive-strength = <12>; + bias-pull-up; + }; + rp1_i2c3_22_23: rp1_i2c3_22_23 { + function = "i2c3"; + pins = "gpio22", "gpio23"; ++ drive-strength = <12>; + bias-pull-up; + }; + diff --git a/target/linux/bcm27xx/patches-6.1/950-1264-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch b/target/linux/bcm27xx/patches-6.1/950-1264-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch new file mode 100644 index 0000000000..7052239224 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1264-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch @@ -0,0 +1,75 @@ +From 15dedc2ad5a9073b8639881680672214f605a5c6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 31 Jan 2024 17:44:02 +0000 +Subject: [PATCH 1264/1295] ARM: dts: rp1: Add a safe I2C SDA hold time + +Failing to set a reasonable SDA hold time can cause SDA to change too +close to the falling edge of SCL. 300ns is the recommended minimum +interval between the two at 100kHz and 400kHz, and also seems to +work at 1MHz, so use that. + +See: https://github.com/raspberrypi/linux/issues/5914 + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/rp1.dtsi | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/arch/arm/boot/dts/rp1.dtsi ++++ b/arch/arm/boot/dts/rp1.dtsi +@@ -307,6 +307,7 @@ + clocks = <&rp1_clocks RP1_CLK_SYS>; + i2c-scl-rising-time-ns = <65>; + i2c-scl-falling-time-ns = <100>; ++ i2c-sda-hold-time-ns = <300>; + status = "disabled"; + }; + +@@ -317,6 +318,7 @@ + clocks = <&rp1_clocks RP1_CLK_SYS>; + i2c-scl-rising-time-ns = <65>; + i2c-scl-falling-time-ns = <100>; ++ i2c-sda-hold-time-ns = <300>; + status = "disabled"; + }; + +@@ -327,6 +329,7 @@ + clocks = <&rp1_clocks RP1_CLK_SYS>; + i2c-scl-rising-time-ns = <65>; + i2c-scl-falling-time-ns = <100>; ++ i2c-sda-hold-time-ns = <300>; + status = "disabled"; + }; + +@@ -337,6 +340,7 @@ + clocks = <&rp1_clocks RP1_CLK_SYS>; + i2c-scl-rising-time-ns = <65>; + i2c-scl-falling-time-ns = <100>; ++ i2c-sda-hold-time-ns = <300>; + status = "disabled"; + }; + +@@ -347,6 +351,7 @@ + clocks = <&rp1_clocks RP1_CLK_SYS>; + i2c-scl-rising-time-ns = <65>; + i2c-scl-falling-time-ns = <100>; ++ i2c-sda-hold-time-ns = <300>; + status = "disabled"; + }; + +@@ -357,6 +362,7 @@ + clocks = <&rp1_clocks RP1_CLK_SYS>; + i2c-scl-rising-time-ns = <65>; + i2c-scl-falling-time-ns = <100>; ++ i2c-sda-hold-time-ns = <300>; + status = "disabled"; + }; + +@@ -367,6 +373,7 @@ + clocks = <&rp1_clocks RP1_CLK_SYS>; + i2c-scl-rising-time-ns = <65>; + i2c-scl-falling-time-ns = <100>; ++ i2c-sda-hold-time-ns = <300>; + status = "disabled"; + }; + diff --git a/target/linux/bcm27xx/patches-6.1/950-1265-ASoC-DACplus-fix-16bit-sample-support-in-clock-consu.patch b/target/linux/bcm27xx/patches-6.1/950-1265-ASoC-DACplus-fix-16bit-sample-support-in-clock-consu.patch new file mode 100644 index 0000000000..ba1b3edda5 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1265-ASoC-DACplus-fix-16bit-sample-support-in-clock-consu.patch @@ -0,0 +1,33 @@ +From 89bd4e64da3345c2764a42875b99c96fa8931967 Mon Sep 17 00:00:00 2001 +From: Joerg Schambacher +Date: Thu, 1 Feb 2024 17:32:44 +0100 +Subject: [PATCH 1265/1295] ASoC: DACplus - fix 16bit sample support in clock + consumer mode + +The former code did not adjust the physical sample width when +in clock consumer mode and has taken the fixed 32 bit default. +This has caused the audio to be played at half its frequency due to +the fixed bclk_ratio of 64. + +Signed-off-by: Joerg Schambacher +--- + sound/soc/bcm/hifiberry_dacplus.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/sound/soc/bcm/hifiberry_dacplus.c ++++ b/sound/soc/bcm/hifiberry_dacplus.c +@@ -279,13 +279,11 @@ static int snd_rpi_hifiberry_dacplus_hw_ + int ret = 0; + struct snd_soc_pcm_runtime *rtd = substream->private_data; + int channels = params_channels(params); +- int width = 32; ++ int width = snd_pcm_format_physical_width(params_format(params)); + + if (snd_rpi_hifiberry_is_dacpro) { + struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; + +- width = snd_pcm_format_physical_width(params_format(params)); +- + snd_rpi_hifiberry_dacplus_set_sclk(component, + params_rate(params)); + diff --git a/target/linux/bcm27xx/patches-6.1/950-1266-ASoC-adds-support-for-AMP4-Pro-to-the-DAC-Plus-drive.patch b/target/linux/bcm27xx/patches-6.1/950-1266-ASoC-adds-support-for-AMP4-Pro-to-the-DAC-Plus-drive.patch new file mode 100644 index 0000000000..84251f2800 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1266-ASoC-adds-support-for-AMP4-Pro-to-the-DAC-Plus-drive.patch @@ -0,0 +1,114 @@ +From d58c054ba30b313bacbb7d19f559ecb4e3bb5c76 Mon Sep 17 00:00:00 2001 +From: Joerg Schambacher +Date: Fri, 19 Jan 2024 10:58:39 +0100 +Subject: [PATCH 1266/1295] ASoC: adds support for AMP4 Pro to the DAC Plus + driver + +The AMP4 Pro is a I2S master mode capable amplifier with +clean onboard clock generators. +We can share the card driver between TAS575x amplifiers +and the PCM512x DACs as they are SW compatible. +From a HW perspective though we need to limit the sample +rates to the standard audio rates to avoid running the +onboard clocks through the PLL. Using the PLL would require +even a different HW. +DAI/stream name are also set accordingly to allow the user +a convenient identification of the soundcard + +Needs the pcm512x driver with TAS575x support (already in +upstream kernel). + +Signed-off-by: Joerg Schambacher +--- + sound/soc/bcm/hifiberry_dacplus.c | 41 ++++++++++++++++++++++++++++--- + 1 file changed, 38 insertions(+), 3 deletions(-) + +--- a/sound/soc/bcm/hifiberry_dacplus.c ++++ b/sound/soc/bcm/hifiberry_dacplus.c +@@ -58,10 +58,21 @@ static bool leds_off; + static bool auto_mute; + static int mute_ext_ctl; + static int mute_ext; ++static bool tas_device; + static struct gpio_desc *snd_mute_gpio; + static struct gpio_desc *snd_reset_gpio; + static struct snd_soc_card snd_rpi_hifiberry_dacplus; + ++static const u32 master_dai_rates[] = { ++ 44100, 48000, 88200, 96000, ++ 176400, 192000, 352800, 384000, ++}; ++ ++static const struct snd_pcm_hw_constraint_list constraints_master = { ++ .count = ARRAY_SIZE(master_dai_rates), ++ .list = master_dai_rates, ++}; ++ + static int snd_rpi_hifiberry_dacplus_mute_set(int mute) + { + gpiod_set_value_cansleep(snd_mute_gpio, mute); +@@ -197,8 +208,13 @@ static int snd_rpi_hifiberry_dacplus_ini + if (snd_rpi_hifiberry_is_dacpro) { + struct snd_soc_dai_link *dai = rtd->dai_link; + +- dai->name = "HiFiBerry DAC+ Pro"; +- dai->stream_name = "HiFiBerry DAC+ Pro HiFi"; ++ if (tas_device) { ++ dai->name = "HiFiBerry AMP4 Pro"; ++ dai->stream_name = "HiFiBerry AMP4 Pro HiFi"; ++ } else { ++ dai->name = "HiFiBerry DAC+ Pro"; ++ dai->stream_name = "HiFiBerry DAC+ Pro HiFi"; ++ } + dai->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF + | SND_SOC_DAIFMT_CBM_CFM; + +@@ -303,6 +319,18 @@ static int snd_rpi_hifiberry_dacplus_sta + { + struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; ++ int ret; ++ ++ if (tas_device && !slave) { ++ ret = snd_pcm_hw_constraint_list(substream->runtime, 0, ++ SNDRV_PCM_HW_PARAM_RATE, ++ &constraints_master); ++ if (ret < 0) { ++ dev_err(rtd->card->dev, ++ "Cannot apply constraints for sample rates\n"); ++ return ret; ++ } ++ } + + if (auto_mute) + gpiod_set_value_cansleep(snd_mute_gpio, 0); +@@ -324,7 +352,7 @@ static void snd_rpi_hifiberry_dacplus_sh + } + + /* machine stream operations */ +-static struct snd_soc_ops snd_rpi_hifiberry_dacplus_ops = { ++static const struct snd_soc_ops snd_rpi_hifiberry_dacplus_ops = { + .hw_params = snd_rpi_hifiberry_dacplus_hw_params, + .startup = snd_rpi_hifiberry_dacplus_startup, + .shutdown = snd_rpi_hifiberry_dacplus_shutdown, +@@ -394,6 +422,7 @@ static int snd_rpi_hifiberry_dacplus_pro + struct snd_soc_card *card = &snd_rpi_hifiberry_dacplus; + int len; + struct device_node *tpa_node; ++ struct device_node *tas_node; + struct property *tpa_prop; + struct of_changeset ocs; + struct property *pp; +@@ -430,6 +459,12 @@ static int snd_rpi_hifiberry_dacplus_pro + } + } + ++ tas_node = of_find_compatible_node(NULL, NULL, "ti,tas5756"); ++ if (tas_node) { ++ tas_device = true; ++ dev_info(&pdev->dev, "TAS5756 device found!\n"); ++ }; ++ + snd_rpi_hifiberry_dacplus.dev = &pdev->dev; + if (pdev->dev.of_node) { + struct device_node *i2s_node; diff --git a/target/linux/bcm27xx/patches-6.1/950-1267-DT-overlays-adds-support-for-Hifiberry-AMP4-Pro.patch b/target/linux/bcm27xx/patches-6.1/950-1267-DT-overlays-adds-support-for-Hifiberry-AMP4-Pro.patch new file mode 100644 index 0000000000..49429bca06 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1267-DT-overlays-adds-support-for-Hifiberry-AMP4-Pro.patch @@ -0,0 +1,130 @@ +From 98ac9b84709dc01ee936b6fe79eaac5e3a4aa6e7 Mon Sep 17 00:00:00 2001 +From: Joerg Schambacher +Date: Fri, 19 Jan 2024 10:44:22 +0100 +Subject: [PATCH 1267/1295] DT-overlays: adds support for Hifiberry AMP4 Pro + +The AMP4 Pro uses a TI TAS5756 amplifier in master mode +and requires the DAC Plus card driver and the +pcm512x component driver with TAS support. + +Signed-off-by: Joerg Schambacher +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 28 +++++++++ + .../overlays/hifiberry-amp4pro-overlay.dts | 63 +++++++++++++++++++ + 3 files changed, 92 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp4pro-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -86,6 +86,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + hifiberry-amp.dtbo \ + hifiberry-amp100.dtbo \ + hifiberry-amp3.dtbo \ ++ hifiberry-amp4pro.dtbo \ + hifiberry-dac.dtbo \ + hifiberry-dacplus.dtbo \ + hifiberry-dacplusadc.dtbo \ +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1738,6 +1738,34 @@ Load: dtoverlay=hifiberry-amp3 + Params: + + ++Name: hifiberry-amp4pro ++Info: Configures the HifiBerry AMP4 Pro audio card ++Load: dtoverlay=hifiberry-amp4pro,= ++Params: 24db_digital_gain Allow gain to be applied via the TAS5756 ++ Digital volume control. Enable with ++ "dtoverlay=hifiberry-amp4pro,24db_digital_gain" ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24dB_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) ++ slave Force the amp into slave mode, using Pi as ++ master for bit clock and frame clock. ++ leds_off If set to 'true' the onboard indicator LEDs ++ are switched off at all times. ++ auto_mute If set to 'true' the amplifier is automatically ++ muted when it is not playing. ++ mute_ext_ctl The amplifier's HW mute control is enabled ++ in ALSA mixer and set to . ++ Will be overwritten by ALSA user settings. ++ ++ + Name: hifiberry-dac + Info: Configures the HifiBerry DAC audio cards + Load: dtoverlay=hifiberry-dac +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/hifiberry-amp4pro-overlay.dts +@@ -0,0 +1,63 @@ ++// Definitions for HiFiBerry AMP4PRO ++/dts-v1/; ++/plugin/; ++#include ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target-path = "/"; ++ __overlay__ { ++ dacpro_osc: dacpro_osc { ++ compatible = "hifiberry,dacpro-clk"; ++ #clock-cells = <0>; ++ }; ++ }; ++ }; ++ ++ frag1: fragment@1 { ++ target = <&i2s_clk_consumer>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ tas5756@4d { ++ #sound-dai-cells = <0>; ++ compatible = "ti,tas5756"; ++ reg = <0x4d>; ++ clocks = <&dacpro_osc>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&sound>; ++ hifiberry_dacplus: __overlay__ { ++ compatible = "hifiberry,hifiberry-dacplus"; ++ i2s-controller = <&i2s_clk_consumer>; ++ status = "okay"; ++ mute-gpio = <&gpio 4 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ __overrides__ { ++ 24db_digital_gain = ++ <&hifiberry_dacplus>,"hifiberry-amp4,24db_digital_gain?"; ++ leds_off = <&hifiberry_dacplus>,"hifiberry-amp4,leds_off?"; ++ mute_ext_ctl = <&hifiberry_dacplus>,"hifiberry-amp4,mute_ext_ctl:0"; ++ auto_mute = <&hifiberry_dacplus>,"hifiberry-amp4,auto_mute?"; ++ slave = <&hifiberry_dacplus>,"hifiberry-dacplus,slave?", ++ <&frag1>,"target:0=",<&i2s_clk_producer>, ++ <&hifiberry_dacplus>,"i2s-controller:0=",<&i2s_clk_producer>; ++ }; ++}; diff --git a/target/linux/bcm27xx/patches-6.1/950-1268-ASoC-DACplusADCPro-fix-16bit-sample-support-in-clock.patch b/target/linux/bcm27xx/patches-6.1/950-1268-ASoC-DACplusADCPro-fix-16bit-sample-support-in-clock.patch new file mode 100644 index 0000000000..f608e5ee7d --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1268-ASoC-DACplusADCPro-fix-16bit-sample-support-in-clock.patch @@ -0,0 +1,38 @@ +From ba86793796525f8276fafbaf9d31d5156a2cfcb5 Mon Sep 17 00:00:00 2001 +From: Joerg Schambacher +Date: Fri, 2 Feb 2024 08:51:06 +0100 +Subject: [PATCH 1268/1295] ASoC: DACplusADCPro - fix 16bit sample support in + clock consumer mode + +The former code did not adjust the physical sample width when in +clock consumer mode and has taken the fixed 32 bit default. This +has caused the audio to be played at half its frequency due to +the fixed bclk_ratio of 64. + +Problem appears only on PI5 as on the former PIs the I2S module +did simply run at fixed 64x rate. + +Signed-off-by: Joerg Schambacher +--- + sound/soc/bcm/hifiberry_dacplusadcpro.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/sound/soc/bcm/hifiberry_dacplusadcpro.c ++++ b/sound/soc/bcm/hifiberry_dacplusadcpro.c +@@ -383,15 +383,13 @@ static int snd_rpi_hifiberry_dacplusadcp + int ret = 0; + struct snd_soc_pcm_runtime *rtd = substream->private_data; + int channels = params_channels(params); +- int width = 32; ++ int width = snd_pcm_format_physical_width(params_format(params)); + struct snd_soc_component *dac = asoc_rtd_to_codec(rtd, 0)->component; + struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); + struct snd_soc_dai_driver *drv = dai->driver; + const struct snd_soc_dai_ops *ops = drv->ops; + + if (snd_rpi_hifiberry_is_dacpro) { +- width = snd_pcm_format_physical_width(params_format(params)); +- + snd_rpi_hifiberry_dacplusadcpro_set_sclk(dac, + params_rate(params)); + diff --git a/target/linux/bcm27xx/patches-6.1/950-1269-overlays-Correct-some-compatible-strings.patch b/target/linux/bcm27xx/patches-6.1/950-1269-overlays-Correct-some-compatible-strings.patch new file mode 100644 index 0000000000..f29e20d7bf --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1269-overlays-Correct-some-compatible-strings.patch @@ -0,0 +1,72 @@ +From 707f6e221946ec2025e8f0e2fedf92016ed8a5b7 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 2 Feb 2024 14:08:14 +0000 +Subject: [PATCH 1269/1295] overlays: Correct some compatible strings + +More thorough overlay testing has identified some Pi 4-specific +overlays that has "brcm,bcm2835" compatible strings. Correct them. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/midi-uart2-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/midi-uart3-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/midi-uart4-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/midi-uart5-overlay.dts | 2 +- + arch/arm/boot/dts/overlays/ramoops-pi4-overlay.dts | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +--- a/arch/arm/boot/dts/overlays/midi-uart2-overlay.dts ++++ b/arch/arm/boot/dts/overlays/midi-uart2-overlay.dts +@@ -12,7 +12,7 @@ + */ + + /{ +- compatible = "brcm,bcm2835"; ++ compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; +--- a/arch/arm/boot/dts/overlays/midi-uart3-overlay.dts ++++ b/arch/arm/boot/dts/overlays/midi-uart3-overlay.dts +@@ -12,7 +12,7 @@ + */ + + /{ +- compatible = "brcm,bcm2835"; ++ compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; +--- a/arch/arm/boot/dts/overlays/midi-uart4-overlay.dts ++++ b/arch/arm/boot/dts/overlays/midi-uart4-overlay.dts +@@ -12,7 +12,7 @@ + */ + + /{ +- compatible = "brcm,bcm2835"; ++ compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; +--- a/arch/arm/boot/dts/overlays/midi-uart5-overlay.dts ++++ b/arch/arm/boot/dts/overlays/midi-uart5-overlay.dts +@@ -12,7 +12,7 @@ + */ + + /{ +- compatible = "brcm,bcm2835"; ++ compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; +--- a/arch/arm/boot/dts/overlays/ramoops-pi4-overlay.dts ++++ b/arch/arm/boot/dts/overlays/ramoops-pi4-overlay.dts +@@ -2,7 +2,7 @@ + /plugin/; + + / { +- compatible = "brcm,bcm2835"; ++ compatible = "brcm,bcm2711"; + + fragment@0 { + target = <&rmem>; diff --git a/target/linux/bcm27xx/patches-6.1/950-1270-overlays-Delete-deprecated-overlay-mpu6050.patch b/target/linux/bcm27xx/patches-6.1/950-1270-overlays-Delete-deprecated-overlay-mpu6050.patch new file mode 100644 index 0000000000..3f1864f4ec --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1270-overlays-Delete-deprecated-overlay-mpu6050.patch @@ -0,0 +1,57 @@ +From 223d1247c0b0c0659a65949b6b9c3de53fd14223 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 2 Feb 2024 14:14:47 +0000 +Subject: [PATCH 1270/1295] overlays: Delete deprecated overlay mpu6050 + +The mpu6050 overlay has been deprecated for a year (when we were still +shipping rpi-5.15.y). Delete it. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/Makefile | 1 - + .../arm/boot/dts/overlays/mpu6050-overlay.dts | 29 ------------------- + 2 files changed, 30 deletions(-) + delete mode 100644 arch/arm/boot/dts/overlays/mpu6050-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -172,7 +172,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + mipi-dbi-spi.dtbo \ + mlx90640.dtbo \ + mmc.dtbo \ +- mpu6050.dtbo \ + mz61581.dtbo \ + ov2311.dtbo \ + ov5647.dtbo \ +--- a/arch/arm/boot/dts/overlays/mpu6050-overlay.dts ++++ /dev/null +@@ -1,29 +0,0 @@ +-// Definitions for MPU6050 +-/dts-v1/; +-/plugin/; +- +-/ { +- compatible = "brcm,bcm2835"; +- +- fragment@0 { +- target = <&i2c1>; +- __overlay__ { +- #address-cells = <1>; +- #size-cells = <0>; +- status = "okay"; +- clock-frequency = <400000>; +- +- mpu6050: mpu6050@68 { +- compatible = "invensense,mpu6050"; +- reg = <0x68>; +- interrupt-parent = <&gpio>; +- interrupts = <4 1>; +- }; +- }; +- }; +- +- __overrides__ { +- interrupt = <&mpu6050>,"interrupts:0"; +- addr = <&mpu6050>,"reg:0"; +- }; +-}; diff --git a/target/linux/bcm27xx/patches-6.1/950-1271-drivers-media-cfe-Increase-default-size-of-embedded-.patch b/target/linux/bcm27xx/patches-6.1/950-1271-drivers-media-cfe-Increase-default-size-of-embedded-.patch new file mode 100644 index 0000000000..90cfdc4ebe --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1271-drivers-media-cfe-Increase-default-size-of-embedded-.patch @@ -0,0 +1,36 @@ +From beba81b0b77268f72d717ab8ec98afe11a176ee0 Mon Sep 17 00:00:00 2001 +From: Naushir Patuck +Date: Mon, 5 Feb 2024 12:12:17 +0000 +Subject: [PATCH 1271/1295] drivers: media: cfe: Increase default size of + embedded buffer + +Increase the size of the default embedded buffer to 16k. This is done to +match what is advertised by the IMX219 driver and workaround a problem +where the embedded stream is not actually used. Without full streams API +support, the media pipeline validation will fail in these circumstances. + +Signed-off-by: Naushir Patuck +--- + drivers/media/platform/raspberrypi/rp1_cfe/cfe.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c ++++ b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c +@@ -93,7 +93,7 @@ MODULE_PARM_DESC(verbose_debug, "verbose + #define MIN_WIDTH 16 + #define MIN_HEIGHT 16 + /* Default size of the embedded buffer */ +-#define DEFAULT_EMBEDDED_SIZE 8192 ++#define DEFAULT_EMBEDDED_SIZE 16384 + + const struct v4l2_mbus_framefmt cfe_default_format = { + .width = 640, +@@ -107,7 +107,7 @@ const struct v4l2_mbus_framefmt cfe_defa + }; + + const struct v4l2_mbus_framefmt cfe_default_meta_format = { +- .width = 8192, ++ .width = DEFAULT_EMBEDDED_SIZE, + .height = 1, + .code = MEDIA_BUS_FMT_SENSOR_DATA, + .field = V4L2_FIELD_NONE, diff --git a/target/linux/bcm27xx/patches-6.1/950-1274-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch b/target/linux/bcm27xx/patches-6.1/950-1274-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch new file mode 100644 index 0000000000..e469b44880 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1274-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch @@ -0,0 +1,26 @@ +From 58c600f728f2787e905eff2f678fa9cf09694004 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Fri, 2 Feb 2024 15:41:29 +0000 +Subject: [PATCH 1274/1295] serial: sc16is7xx: Don't spin if no data received + +There are multiple causes of interrupts, errors being one, and only the +receipt of data warrants continued polling. + +See: https://github.com/raspberrypi/linux/issues/2676 + +Signed-off-by: Phil Elwell +--- + drivers/tty/serial/sc16is7xx.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/tty/serial/sc16is7xx.c ++++ b/drivers/tty/serial/sc16is7xx.c +@@ -762,6 +762,8 @@ static bool sc16is7xx_port_irq(struct sc + + if (rxlen) + sc16is7xx_handle_rx(port, rxlen, iir); ++ else ++ rc = false; + break; + /* CTSRTS interrupt comes only when CTS goes inactive */ + case SC16IS7XX_IIR_CTSRTS_SRC: diff --git a/target/linux/bcm27xx/patches-6.1/950-1276-Impliment-driver-support-for-Interlude-Audio-Digital.patch b/target/linux/bcm27xx/patches-6.1/950-1276-Impliment-driver-support-for-Interlude-Audio-Digital.patch new file mode 100644 index 0000000000..ff638aed61 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1276-Impliment-driver-support-for-Interlude-Audio-Digital.patch @@ -0,0 +1,196 @@ +From fb21611efd7cd916646d9ab2988c3af08f139761 Mon Sep 17 00:00:00 2001 +From: Ben Payne +Date: Tue, 13 Feb 2024 14:55:14 -0800 +Subject: [PATCH 1276/1295] Impliment driver support for Interlude Audio + Digital Hat + +Implementing driver support for +Interlude audio's WM8805 based digital hat +by leveraging existing drivers +--- + sound/soc/bcm/rpi-wm8804-soundcard.c | 139 +++++++++++++++++++++++++++ + 1 file changed, 139 insertions(+) + +--- a/sound/soc/bcm/rpi-wm8804-soundcard.c ++++ b/sound/soc/bcm/rpi-wm8804-soundcard.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -65,6 +66,10 @@ struct snd_rpi_wm8804_drvdata { + static struct gpio_desc *snd_clk44gpio; + static struct gpio_desc *snd_clk48gpio; + static int wm8804_samplerate = 0; ++static struct gpio_desc *led_gpio_1; ++static struct gpio_desc *led_gpio_2; ++static struct gpio_desc *led_gpio_3; ++static struct gpio_desc *custom_reset; + + /* Forward declarations */ + static struct snd_soc_dai_link snd_allo_digione_dai[]; +@@ -74,6 +79,37 @@ static struct snd_soc_card snd_rpi_wm880 + #define CLK_44EN_RATE 22579200UL + #define CLK_48EN_RATE 24576000UL + ++static const char * const wm8805_input_select_text[] = { ++ "Rx 0", ++ "Rx 1", ++ "Rx 2", ++ "Rx 3", ++ "Rx 4", ++ "Rx 5", ++ "Rx 6", ++ "Rx 7" ++}; ++ ++static const unsigned int wm8805_input_channel_select_value[] = { ++ 0, 1, 2, 3, 4, 5, 6, 7 ++}; ++ ++static const struct soc_enum wm8805_input_channel_sel[] = { ++ SOC_VALUE_ENUM_SINGLE(WM8804_PLL6, 0, 7, ARRAY_SIZE(wm8805_input_select_text), ++ wm8805_input_select_text, wm8805_input_channel_select_value), ++}; ++ ++static const struct snd_kcontrol_new wm8805_input_controls_card[] = { ++ SOC_ENUM("Select Input Channel", wm8805_input_channel_sel[0]), ++}; ++ ++static int wm8805_add_input_controls(struct snd_soc_component *component) ++{ ++ snd_soc_add_component_controls(component, wm8805_input_controls_card, ++ ARRAY_SIZE(wm8805_input_controls_card)); ++ return 0; ++} ++ + static unsigned int snd_rpi_wm8804_enable_clock(unsigned int samplerate) + { + switch (samplerate) { +@@ -187,6 +223,53 @@ static struct snd_soc_ops snd_rpi_wm8804 + .hw_params = snd_rpi_wm8804_hw_params, + }; + ++static int snd_interlude_audio_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ int ret = snd_rpi_wm8804_hw_params(substream, params); ++ int samplerate = params_rate(params); ++ ++ switch (samplerate) { ++ case 44100: ++ gpiod_set_value_cansleep(led_gpio_1, 1); ++ gpiod_set_value_cansleep(led_gpio_2, 0); ++ gpiod_set_value_cansleep(led_gpio_3, 0); ++ break; ++ case 48000: ++ gpiod_set_value_cansleep(led_gpio_1, 1); ++ gpiod_set_value_cansleep(led_gpio_2, 0); ++ gpiod_set_value_cansleep(led_gpio_3, 0); ++ break; ++ case 88200: ++ gpiod_set_value_cansleep(led_gpio_1, 0); ++ gpiod_set_value_cansleep(led_gpio_2, 1); ++ gpiod_set_value_cansleep(led_gpio_3, 0); ++ break; ++ case 96000: ++ gpiod_set_value_cansleep(led_gpio_1, 0); ++ gpiod_set_value_cansleep(led_gpio_2, 1); ++ gpiod_set_value_cansleep(led_gpio_3, 0); ++ break; ++ case 176400: ++ gpiod_set_value_cansleep(led_gpio_1, 0); ++ gpiod_set_value_cansleep(led_gpio_2, 0); ++ gpiod_set_value_cansleep(led_gpio_3, 1); ++ break; ++ case 192000: ++ gpiod_set_value_cansleep(led_gpio_1, 0); ++ gpiod_set_value_cansleep(led_gpio_2, 0); ++ gpiod_set_value_cansleep(led_gpio_3, 1); ++ break; ++ default: ++ break; ++ } ++ return ret; ++} ++ ++const struct snd_soc_ops interlude_audio_digital_dai_ops = { ++ .hw_params = snd_interlude_audio_hw_params, ++}; ++ + SND_SOC_DAILINK_DEFS(justboom_digi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_EMPTY()), +@@ -287,6 +370,60 @@ static struct snd_rpi_wm8804_drvdata drv + .probe = snd_hifiberry_digi_probe, + }; + ++SND_SOC_DAILINK_DEFS(interlude_audio_digital, ++ DAILINK_COMP_ARRAY(COMP_EMPTY()), ++ DAILINK_COMP_ARRAY(COMP_EMPTY()), ++ DAILINK_COMP_ARRAY(COMP_EMPTY())); ++ ++static int snd_interlude_audio_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; ++ int ret; ++ ++ ret = wm8805_add_input_controls(component); ++ if (ret != 0) ++ pr_err("failed to add input controls"); ++ ++ return 0; ++} ++ ++ ++static struct snd_soc_dai_link snd_interlude_audio_digital_dai[] = { ++{ ++ .name = "Interlude Audio Digital", ++ .stream_name = "Interlude Audio Digital HiFi", ++ .init = snd_interlude_audio_init, ++ .ops = &interlude_audio_digital_dai_ops, ++ SND_SOC_DAILINK_REG(interlude_audio_digital), ++}, ++}; ++ ++ ++static int snd_interlude_audio_digital_probe(struct platform_device *pdev) ++{ ++ if (IS_ERR(snd_clk44gpio) || IS_ERR(snd_clk48gpio)) ++ return 0; ++ ++ custom_reset = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW); ++ gpiod_set_value_cansleep(custom_reset, 0); ++ mdelay(10); ++ gpiod_set_value_cansleep(custom_reset, 1); ++ ++ snd_interlude_audio_digital_dai->name = "Interlude Audio Digital"; ++ snd_interlude_audio_digital_dai->stream_name = "Interlude Audio Digital HiFi"; ++ led_gpio_1 = devm_gpiod_get(&pdev->dev, "led1", GPIOD_OUT_LOW); ++ led_gpio_2 = devm_gpiod_get(&pdev->dev, "led2", GPIOD_OUT_LOW); ++ led_gpio_3 = devm_gpiod_get(&pdev->dev, "led3", GPIOD_OUT_LOW); ++ return 0; ++} ++ ++ ++static struct snd_rpi_wm8804_drvdata drvdata_interlude_audio_digital = { ++ .card_name = "snd_IA_Digital_Hat", ++ .dai = snd_interlude_audio_digital_dai, ++ .probe = snd_interlude_audio_digital_probe, ++}; ++ + static const struct of_device_id snd_rpi_wm8804_of_match[] = { + { .compatible = "justboom,justboom-digi", + .data = (void *) &drvdata_justboom_digi }, +@@ -296,6 +433,8 @@ static const struct of_device_id snd_rpi + .data = (void *) &drvdata_allo_digione }, + { .compatible = "hifiberry,hifiberry-digi", + .data = (void *) &drvdata_hifiberry_digi }, ++ { .compatible = "interludeaudio,interludeaudio-digital", ++ .data = (void *) &drvdata_interlude_audio_digital }, + {}, + }; + diff --git a/target/linux/bcm27xx/patches-6.1/950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch b/target/linux/bcm27xx/patches-6.1/950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch new file mode 100644 index 0000000000..2c4196ad4d --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch @@ -0,0 +1,179 @@ +From d787ecf50d7a6ec32f8e1afcb8559600396c0f45 Mon Sep 17 00:00:00 2001 +From: Ben Payne +Date: Tue, 13 Feb 2024 14:56:28 -0800 +Subject: [PATCH 1277/1295] Add overlays needed for Interlude Audio Digital and + Analog hats + +Adding 2 new overlays for use with +Interlude Audio's Digital and Analog hats +adding descriptions for both in README +adding changes to Makefile to include both DT's +--- + arch/arm/boot/dts/overlays/Makefile | 2 + + arch/arm/boot/dts/overlays/README | 12 +++ + .../interludeaudio-analog-overlay.dts | 73 +++++++++++++++++++ + .../interludeaudio-digital-overlay.dts | 49 +++++++++++++ + 4 files changed, 136 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -131,6 +131,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + imx477.dtbo \ + imx519.dtbo \ + imx708.dtbo \ ++ interludeaudio-analog.dtbo \ ++ interludeaudio-digital.dtbo \ + iqaudio-codec.dtbo \ + iqaudio-dac.dtbo \ + iqaudio-dacplus.dtbo \ +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -2708,6 +2708,18 @@ Params: rotation Mounting + 450000000 (default), 447000000, 453000000. + + ++Name: interludeaudio-analog ++Info: Configures Interlude Audio Analog Hat audio card ++Load: dtoverlay=interludeaudio-analog,= ++Params: gpiopin GPIO pin for codec reset ++ ++ ++Name: interludeaudio-digital ++Info: Configures Interlude Audio Digital Hat audio card ++Load: dtoverlay=interludeaudio-digital ++Params: ++ ++ + Name: iqaudio-codec + Info: Configures the IQaudio Codec audio card + Load: dtoverlay=iqaudio-codec +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts +@@ -0,0 +1,73 @@ ++// Definitions for Interlude audio analog hat ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "simple-audio-card"; ++ i2s-controller = <&i2s_clk_consumer>; ++ status = "okay"; ++ ++ simple-audio-card,name = "snd_IA_Analog_Hat"; ++ ++ simple-audio-card,widgets = ++ "Line", "Line In", ++ "Line", "Line Out"; ++ ++ simple-audio-card,routing = ++ "Line Out","AOUTA+", ++ "Line Out","AOUTA-", ++ "Line Out","AOUTB+", ++ "Line Out","AOUTB-", ++ "AINA","Line In", ++ "AINB","Line In"; ++ ++ simple-audio-card,format = "i2s"; ++ ++ simple-audio-card,bitclock-master = <&sound_master>; ++ simple-audio-card,frame-master = <&sound_master>; ++ ++ simple-audio-card,cpu { ++ sound-dai = <&i2s>; ++ dai-tdm-slot-num = <2>; ++ dai-tdm-slot-width = <32>; ++ }; ++ ++ sound_master: simple-audio-card,codec { ++ sound-dai = <&cs4271>; ++ system-clock-frequency = <24576000>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s_clk_consumer>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ cs4271: cs4271@10 { ++ #sound-dai-cells = <0>; ++ compatible = "cirrus,cs4271"; ++ reg = <0x10>; ++ status = "okay"; ++ reset-gpio = <&gpio 24 0>; /* Pin 26, active high */ ++ }; ++ }; ++ }; ++ __overrides__ { ++ gpiopin = <&cs4271>,"reset-gpio:4"; ++ }; ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts +@@ -0,0 +1,49 @@ ++// Definitions for Interlude Audio Digital Hat ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target = <&i2s_clk_consumer>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ wm8804@3b { ++ #sound-dai-cells = <0>; ++ compatible = "wlf,wm8804"; ++ reg = <0x3b>; ++ PVDD-supply = <&vdd_3v3_reg>; ++ DVDD-supply = <&vdd_3v3_reg>; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ ++ fragment@2 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "interludeaudio,interludeaudio-digital"; ++ i2s-controller = <&i2s_clk_consumer>; ++ status = "okay"; ++ clock44-gpio = <&gpio 22 0>; ++ clock48-gpio = <&gpio 27 0>; ++ led1-gpio = <&gpio 13 0>; ++ led2-gpio = <&gpio 12 0>; ++ led3-gpio = <&gpio 6 0>; ++ reset-gpio = <&gpio 23 0>; ++ }; ++ }; ++ ++}; diff --git a/target/linux/bcm27xx/patches-6.1/950-1279-drm-v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch b/target/linux/bcm27xx/patches-6.1/950-1279-drm-v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch new file mode 100644 index 0000000000..39d4ce9067 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1279-drm-v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch @@ -0,0 +1,118 @@ +From eb06d31da3e2025a2e578d8de9843e24b68137a6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ma=C3=ADra=20Canal?= +Date: Tue, 13 Feb 2024 15:26:44 -0300 +Subject: [PATCH 1279/1295] drm/v3d: Enable V3D to use different PAGE_SIZE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Currently, the V3D driver uses PAGE_SHIFT over the assumption that +PAGE_SHIFT = 12, as the PAGE_SIZE = 4KB. But, the RPi 5 is using +PAGE_SIZE = 16KB, so the MMU PAGE_SHIFT is different than the system's +PAGE_SHIFT. + +Enable V3D to be used in system's with any PAGE_SIZE by making sure that +everything MMU-related uses the MMU page shift. + +Signed-off-by: Maíra Canal +--- + drivers/gpu/drm/v3d/v3d_bo.c | 12 ++++++------ + drivers/gpu/drm/v3d/v3d_debugfs.c | 2 +- + drivers/gpu/drm/v3d/v3d_drv.h | 2 ++ + drivers/gpu/drm/v3d/v3d_irq.c | 2 +- + drivers/gpu/drm/v3d/v3d_mmu.c | 2 -- + 5 files changed, 10 insertions(+), 10 deletions(-) + +--- a/drivers/gpu/drm/v3d/v3d_bo.c ++++ b/drivers/gpu/drm/v3d/v3d_bo.c +@@ -37,7 +37,7 @@ void v3d_free_object(struct drm_gem_obje + + mutex_lock(&v3d->bo_lock); + v3d->bo_stats.num_allocated--; +- v3d->bo_stats.pages_allocated -= obj->size >> PAGE_SHIFT; ++ v3d->bo_stats.pages_allocated -= obj->size >> V3D_MMU_PAGE_SHIFT; + mutex_unlock(&v3d->bo_lock); + + spin_lock(&v3d->mm_lock); +@@ -106,8 +106,8 @@ v3d_bo_create_finish(struct drm_gem_obje + * lifetime of the BO. + */ + ret = drm_mm_insert_node_generic(&v3d->mm, &bo->node, +- obj->size >> PAGE_SHIFT, +- GMP_GRANULARITY >> PAGE_SHIFT, 0, 0); ++ obj->size >> V3D_MMU_PAGE_SHIFT, ++ GMP_GRANULARITY >> V3D_MMU_PAGE_SHIFT, 0, 0); + spin_unlock(&v3d->mm_lock); + if (ret) + return ret; +@@ -115,7 +115,7 @@ v3d_bo_create_finish(struct drm_gem_obje + /* Track stats for /debug/dri/n/bo_stats. */ + mutex_lock(&v3d->bo_lock); + v3d->bo_stats.num_allocated++; +- v3d->bo_stats.pages_allocated += obj->size >> PAGE_SHIFT; ++ v3d->bo_stats.pages_allocated += obj->size >> V3D_MMU_PAGE_SHIFT; + mutex_unlock(&v3d->bo_lock); + + v3d_mmu_insert_ptes(bo); +@@ -183,7 +183,7 @@ int v3d_create_bo_ioctl(struct drm_devic + if (IS_ERR(bo)) + return PTR_ERR(bo); + +- args->offset = bo->node.start << PAGE_SHIFT; ++ args->offset = bo->node.start << V3D_MMU_PAGE_SHIFT; + + ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle); + drm_gem_object_put(&bo->base.base); +@@ -228,7 +228,7 @@ int v3d_get_bo_offset_ioctl(struct drm_d + } + bo = to_v3d_bo(gem_obj); + +- args->offset = bo->node.start << PAGE_SHIFT; ++ args->offset = bo->node.start << V3D_MMU_PAGE_SHIFT; + + drm_gem_object_put(gem_obj); + return 0; +--- a/drivers/gpu/drm/v3d/v3d_debugfs.c ++++ b/drivers/gpu/drm/v3d/v3d_debugfs.c +@@ -220,7 +220,7 @@ static int v3d_debugfs_bo_stats(struct s + seq_printf(m, "allocated bos: %d\n", + v3d->bo_stats.num_allocated); + seq_printf(m, "allocated bo size (kb): %ld\n", +- (long)v3d->bo_stats.pages_allocated << (PAGE_SHIFT - 10)); ++ (long)v3d->bo_stats.pages_allocated << (V3D_MMU_PAGE_SHIFT - 10)); + mutex_unlock(&v3d->bo_lock); + + return 0; +--- a/drivers/gpu/drm/v3d/v3d_drv.h ++++ b/drivers/gpu/drm/v3d/v3d_drv.h +@@ -19,6 +19,8 @@ struct reset_control; + + #define GMP_GRANULARITY (128 * 1024) + ++#define V3D_MMU_PAGE_SHIFT 12 ++ + #define V3D_MAX_QUEUES (V3D_CACHE_CLEAN + 1) + + static inline char * +--- a/drivers/gpu/drm/v3d/v3d_irq.c ++++ b/drivers/gpu/drm/v3d/v3d_irq.c +@@ -70,7 +70,7 @@ v3d_overflow_mem_work(struct work_struct + list_add_tail(&bo->unref_head, &v3d->bin_job->render->unref_list); + spin_unlock_irqrestore(&v3d->job_lock, irqflags); + +- V3D_CORE_WRITE(0, V3D_PTB_BPOA, bo->node.start << PAGE_SHIFT); ++ V3D_CORE_WRITE(0, V3D_PTB_BPOA, bo->node.start << V3D_MMU_PAGE_SHIFT); + V3D_CORE_WRITE(0, V3D_PTB_BPOS, obj->size); + + out: +--- a/drivers/gpu/drm/v3d/v3d_mmu.c ++++ b/drivers/gpu/drm/v3d/v3d_mmu.c +@@ -21,8 +21,6 @@ + #include "v3d_drv.h" + #include "v3d_regs.h" + +-#define V3D_MMU_PAGE_SHIFT 12 +- + /* Note: All PTEs for the 1MB superpage must be filled with the + * superpage bit set. + */ diff --git a/target/linux/bcm27xx/patches-6.1/950-1280-overlays-adau1977-adc-Replace-use-of-i2c-label.patch b/target/linux/bcm27xx/patches-6.1/950-1280-overlays-adau1977-adc-Replace-use-of-i2c-label.patch new file mode 100644 index 0000000000..bb28d9369e --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1280-overlays-adau1977-adc-Replace-use-of-i2c-label.patch @@ -0,0 +1,25 @@ +From aa00918b9562daa3b776600f48d8264b20fd54f6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Sun, 18 Feb 2024 15:31:50 +0000 +Subject: [PATCH 1280/1295] overlays: adau1977-adc: Replace use of i2c label + +The label 'i2c' is no longer created by the firmware - i2c_arm or +i2c1 should be used instead. Replace the last occurrence of &i2c with +&i2c1. + +Signed-off-by: Phil Elwell +--- + arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts ++++ b/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts +@@ -6,7 +6,7 @@ + compatible = "brcm,bcm2835"; + + fragment@0 { +- target = <&i2c>; ++ target = <&i2c1>; + + __overlay__ { + #address-cells = <1>; diff --git a/target/linux/bcm27xx/patches-6.1/950-1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch b/target/linux/bcm27xx/patches-6.1/950-1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch new file mode 100644 index 0000000000..399c293e1f --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch @@ -0,0 +1,24 @@ +From afd5f659b0453e4c710ce5cf74c577563ff16239 Mon Sep 17 00:00:00 2001 +From: Andrew Scheller +Date: Tue, 20 Feb 2024 17:53:03 +0000 +Subject: [PATCH 1281/1295] Add IQaudio CodecZero to hat_map.dts + +Fixes https://github.com/raspberrypi/Pi-Codec/issues/9 +--- + arch/arm/boot/dts/overlays/hat_map.dts | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm/boot/dts/overlays/hat_map.dts ++++ b/arch/arm/boot/dts/overlays/hat_map.dts +@@ -6,6 +6,11 @@ + overlay = "iqaudio-codec"; + }; + ++ iqaudio-pi-codeczero { ++ uuid = [ e15c739c 877d 4e29 ab36 4dc73c21127c ]; ++ overlay = "iqaudio-codec"; ++ }; ++ + pisound { + uuid = [ a7ee5d28 da03 41f5 bbd7 20438a4bec5d ]; + overlay = "pisound"; diff --git a/target/linux/bcm27xx/patches-6.1/950-1282-ASOc-Add-HiFiBerry-DAC8X-to-the-simple-card-driver.patch b/target/linux/bcm27xx/patches-6.1/950-1282-ASOc-Add-HiFiBerry-DAC8X-to-the-simple-card-driver.patch new file mode 100644 index 0000000000..dadd8123be --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1282-ASOc-Add-HiFiBerry-DAC8X-to-the-simple-card-driver.patch @@ -0,0 +1,82 @@ +From d4acd8b7ea890c01453cdcf9b04a999ca04dfd2a Mon Sep 17 00:00:00 2001 +From: j-schambacher +Date: Wed, 28 Feb 2024 11:25:14 +0100 +Subject: [PATCH 1282/1295] ASOc: Add HiFiBerry DAC8X to the simple card driver + +Defines the settings for the 8 channel version of the standard +DAC by overwriting the number of channels in the DAI defs. +It can run in 8ch mode only on PI5 using the 4 lane data output +of the designware I2S0 module. + +Signed-off-by: j-schambacher +--- + sound/soc/bcm/Kconfig | 5 +++-- + sound/soc/bcm/rpi-simple-soundcard.c | 33 ++++++++++++++++++++++++++++ + 2 files changed, 36 insertions(+), 2 deletions(-) + +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -40,11 +40,12 @@ config SND_BCM2708_SOC_GOOGLEVOICEHAT_SO + Say Y or M if you want to add support for voiceHAT soundcard. + + config SND_BCM2708_SOC_HIFIBERRY_DAC +- tristate "Support for HifiBerry DAC" ++ tristate "Support for HifiBerry DAC and DAC8X" + select SND_SOC_PCM5102A + select SND_RPI_SIMPLE_SOUNDCARD + help +- Say Y or M if you want to add support for HifiBerry DAC. ++ Say Y or M if you want to add support for HifiBerry DAC and DAC8X. ++ Note: DAC8X only works on PI5 + + config SND_BCM2708_SOC_HIFIBERRY_DACPLUS + tristate "Support for HifiBerry DAC+" +--- a/sound/soc/bcm/rpi-simple-soundcard.c ++++ b/sound/soc/bcm/rpi-simple-soundcard.c +@@ -316,6 +316,37 @@ static struct snd_rpi_simple_drvdata drv + .dai = snd_hifiberry_dac_dai, + }; + ++static int hifiberry_dac8x_init(struct snd_soc_pcm_runtime *rtd) ++{ ++ struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); ++ ++ /* override the defaults to reflect 4 x PCM5102A on the card ++ * and limit the sample rate to 192ksps ++ */ ++ codec_dai->driver->playback.channels_max = 8; ++ codec_dai->driver->playback.rates = SNDRV_PCM_RATE_8000_192000; ++ ++ return 0; ++} ++ ++static struct snd_soc_dai_link snd_hifiberry_dac8x_dai[] = { ++ { ++ .name = "HifiBerry DAC8x", ++ .stream_name = "HifiBerry DAC8x HiFi", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | ++ SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBS_CFS, ++ .init = hifiberry_dac8x_init, ++ SND_SOC_DAILINK_REG(hifiberry_dac), ++ }, ++}; ++ ++static struct snd_rpi_simple_drvdata drvdata_hifiberry_dac8x = { ++ .card_name = "snd_rpi_hifiberry_dac8x", ++ .dai = snd_hifiberry_dac8x_dai, ++ .fixed_bclk_ratio = 64, ++}; ++ + SND_SOC_DAILINK_DEFS(dionaudio_kiwi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC("pcm1794a-codec", "pcm1794a-hifi")), +@@ -417,6 +448,8 @@ static const struct of_device_id snd_rpi + .data = (void *) &drvdata_hifiberry_amp3 }, + { .compatible = "hifiberry,hifiberry-dac", + .data = (void *) &drvdata_hifiberry_dac }, ++ { .compatible = "hifiberry,hifiberry-dac8x", ++ .data = (void *) &drvdata_hifiberry_dac8x }, + { .compatible = "dionaudio,dionaudio-kiwi", + .data = (void *) &drvdata_dionaudio_kiwi }, + { .compatible = "rpi,rpi-dac", &drvdata_rpi_dac}, diff --git a/target/linux/bcm27xx/patches-6.1/950-1283-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch b/target/linux/bcm27xx/patches-6.1/950-1283-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch new file mode 100644 index 0000000000..b383b744e7 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1283-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch @@ -0,0 +1,113 @@ +From 813135a7ff3f0c2b91dc06a5b3f8deac15570466 Mon Sep 17 00:00:00 2001 +From: j-schambacher +Date: Wed, 28 Feb 2024 11:34:05 +0100 +Subject: [PATCH 1283/1295] Overlays: Add definitions for HiFiBerry 8 channel + DAC8X + +Dedicated overlay claiming all 4 data lanes of the designware +I2S0 module to drive 4x PCM5102. THe devices share BCLK and +LRCLK, therefore all outputs will always run at the same +samplerate and format. + +Compatible only with PI5! + +Signed-off-by: j-schambacher +--- + arch/arm/boot/dts/overlays/Makefile | 1 + + arch/arm/boot/dts/overlays/README | 6 +++ + .../dts/overlays/hifiberry-dac8x-overlay.dts | 50 +++++++++++++++++++ + arch/arm/boot/dts/overlays/overlay_map.dts | 4 ++ + 4 files changed, 61 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -88,6 +88,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + hifiberry-amp3.dtbo \ + hifiberry-amp4pro.dtbo \ + hifiberry-dac.dtbo \ ++ hifiberry-dac8x.dtbo \ + hifiberry-dacplus.dtbo \ + hifiberry-dacplusadc.dtbo \ + hifiberry-dacplusadcpro.dtbo \ +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1772,6 +1772,12 @@ Load: dtoverlay=hifiberry-dac + Params: + + ++Name: hifiberry-dac8x ++Info: Configures the HifiBerry DAC8X audio cards (only on PI5) ++Load: dtoverlay=hifiberry-dac8x ++Params: ++ ++ + Name: hifiberry-dacplus + Info: Configures the HifiBerry DAC+ audio card + Load: dtoverlay=hifiberry-dacplus,= +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts +@@ -0,0 +1,50 @@ ++// Definitions for HiFiBerry DAC8x ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2712"; ++ ++ fragment@0 { ++ target = <&gpio>; ++ __overlay__ { ++ rp1_i2s0_dac8x: rp1_i2s0_dac8x { ++ function = "i2s0"; ++ pins = "gpio18", "gpio19", "gpio21", ++ "gpio23", "gpio25", "gpio27"; ++ bias-disable; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s_clk_producer>; ++ __overlay__ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rp1_i2s0_dac8x>; ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target-path = "/"; ++ __overlay__ { ++ pcm5102a-codec { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5102a"; ++ status = "okay"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&sound>; ++ __overlay__ { ++ compatible = "hifiberry,hifiberry-dac8x"; ++ i2s-controller = <&i2s_clk_producer>; ++ status = "okay"; ++ }; ++ }; ++ ++}; +--- a/arch/arm/boot/dts/overlays/overlay_map.dts ++++ b/arch/arm/boot/dts/overlays/overlay_map.dts +@@ -48,6 +48,10 @@ + bcm2712; + }; + ++ hifiberry-dac8x { ++ bcm2712; ++ }; ++ + highperi { + bcm2711; + }; diff --git a/target/linux/bcm27xx/patches-6.1/950-1285-vc4-hvs-Fix-lbm-size-calculation-for-yuv-6012.patch b/target/linux/bcm27xx/patches-6.1/950-1285-vc4-hvs-Fix-lbm-size-calculation-for-yuv-6012.patch new file mode 100644 index 0000000000..cb4681909e --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1285-vc4-hvs-Fix-lbm-size-calculation-for-yuv-6012.patch @@ -0,0 +1,31 @@ +From c0169f2c197d005aff8acfbc618de6e7f6b1ab94 Mon Sep 17 00:00:00 2001 +From: Florian Wesch +Date: Tue, 5 Mar 2024 15:17:56 +0100 +Subject: [PATCH 1285/1295] vc4/hvs: Fix lbm size calculation for yuv (#6012) + +The code was reducing the number of components by one when we were not +blending with alpha. But that only makes sense if the components include +alpha. + +For YUV, we were reducing the number of components for Y from one to zero +which resulted in no lbm space being allocated. + +Fixes: https://github.com/raspberrypi/linux/issues/5912 + +Signed-off-by: Dom Cobley +Co-authored-by: Dom Cobley +--- + drivers/gpu/drm/vc4/vc4_plane.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/vc4/vc4_plane.c ++++ b/drivers/gpu/drm/vc4/vc4_plane.c +@@ -733,7 +733,7 @@ static unsigned int vc4_lbm_channel_size + if (!components) + return 0; + +- if (state->alpha != DRM_BLEND_ALPHA_OPAQUE) ++ if (state->alpha != DRM_BLEND_ALPHA_OPAQUE && info->has_alpha) + components -= 1; + + words = width * wpc * components; diff --git a/target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch b/target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch new file mode 100644 index 0000000000..4bda41a791 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch @@ -0,0 +1,41 @@ +From 50da59d237df59b38c5e3c375b3df8fabbda1069 Mon Sep 17 00:00:00 2001 +From: Eng33 +Date: Fri, 8 Mar 2024 18:36:37 +0800 +Subject: [PATCH 1286/1295] Driver:add waveshare 4inch dsi lcd (C) driver + +Signed-off-by: Eng33 +--- + drivers/gpu/drm/panel/panel-waveshare-dsi.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +--- a/drivers/gpu/drm/panel/panel-waveshare-dsi.c ++++ b/drivers/gpu/drm/panel/panel-waveshare-dsi.c +@@ -138,6 +138,18 @@ static const struct drm_display_mode ws_ + .vtotal = 1480 + 60 + 60 + 60, + }; + ++static const struct drm_display_mode ws_panel_4_mode = { ++ .clock = 50000, ++ .hdisplay = 720, ++ .hsync_start = 720 + 32, ++ .hsync_end = 720 + 32 + 200, ++ .htotal = 720 + 32 + 200 + 120, ++ .vdisplay = 720, ++ .vsync_start = 720 + 8, ++ .vsync_end = 720 + 8 + 4, ++ .vtotal = 720 + 8 + 4 + 16, ++}; ++ + static struct ws_panel *panel_to_ts(struct drm_panel *panel) + { + return container_of(panel, struct ws_panel, base); +@@ -399,6 +411,9 @@ static const struct of_device_id ws_pane + .compatible = "waveshare,11.9inch-panel", + .data = &ws_panel_11_9_mode, + }, { ++ .compatible = "waveshare,4inch-panel", ++ .data = &ws_panel_4_mode, ++ }, { + /* sentinel */ + } + }; diff --git a/target/linux/bcm27xx/patches-6.1/950-1287-Dtoverlay-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch b/target/linux/bcm27xx/patches-6.1/950-1287-Dtoverlay-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch new file mode 100644 index 0000000000..605ad842cf --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1287-Dtoverlay-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch @@ -0,0 +1,22 @@ +From bb2f912c94d11a0f0b5f13c91793fa9f79eb92aa Mon Sep 17 00:00:00 2001 +From: Eng33 +Date: Fri, 8 Mar 2024 18:37:03 +0800 +Subject: [PATCH 1287/1295] Dtoverlay:add waveshare 4inch dsi lcd (C) dtoverlay + +Signed-off-by: Eng33 +--- + .../boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts +@@ -112,6 +112,9 @@ + <&touch>, "touchscreen-size-y:0=1480", + <&touch>, "touchscreen-inverted-x?", + <&touch>, "touchscreen-swapped-x-y?"; ++ 4_0_inchC = <&panel>, "compatible=waveshare,4inch-panel", ++ <&touch>, "touchscreen-size-x:0=720", ++ <&touch>, "touchscreen-size-y:0=720"; + i2c1 = <&i2c_frag>, "target:0=",<&i2c1>, + <0>, "-3-4+5"; + disable_touch = <&touch>, "status=disabled"; diff --git a/target/linux/bcm27xx/patches-6.1/950-1288-Dtoverlay-fix-waveshare-11.9inch-touch-orientation-e.patch b/target/linux/bcm27xx/patches-6.1/950-1288-Dtoverlay-fix-waveshare-11.9inch-touch-orientation-e.patch new file mode 100644 index 0000000000..868c162cc4 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1288-Dtoverlay-fix-waveshare-11.9inch-touch-orientation-e.patch @@ -0,0 +1,22 @@ +From 29cc64d7d94f9a6ee0e97e8009b832514d2525e0 Mon Sep 17 00:00:00 2001 +From: Eng33 +Date: Fri, 8 Mar 2024 18:38:33 +0800 +Subject: [PATCH 1288/1295] Dtoverlay:fix waveshare 11.9inch touch orientation + error + +Signed-off-by: Eng33 +--- + .../boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts | 2 -- + 1 file changed, 2 deletions(-) + +--- a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts ++++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts +@@ -108,8 +108,6 @@ + <&touch>, "touchscreen-inverted-x?", + <&touch>, "touchscreen-swapped-x-y?"; + 11_9_inch = <&panel>, "compatible=waveshare,11.9inch-panel", +- <&touch>, "touchscreen-size-x:0=320", +- <&touch>, "touchscreen-size-y:0=1480", + <&touch>, "touchscreen-inverted-x?", + <&touch>, "touchscreen-swapped-x-y?"; + 4_0_inchC = <&panel>, "compatible=waveshare,4inch-panel", diff --git a/target/linux/bcm27xx/patches-6.1/950-1289-Dtoverlay-Add-waveshare-4inch-dsi-lcd-C-parameters-t.patch b/target/linux/bcm27xx/patches-6.1/950-1289-Dtoverlay-Add-waveshare-4inch-dsi-lcd-C-parameters-t.patch new file mode 100644 index 0000000000..ea72100e52 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1289-Dtoverlay-Add-waveshare-4inch-dsi-lcd-C-parameters-t.patch @@ -0,0 +1,21 @@ +From 8db8a2b856a24dd30b201c9af3238cedaf5f0c58 Mon Sep 17 00:00:00 2001 +From: Eng33 +Date: Mon, 11 Mar 2024 10:00:23 +0800 +Subject: [PATCH 1289/1295] Dtoverlay:Add waveshare 4inch dsi lcd (C) + parameters to the README + +Signed-off-by: Eng33 +--- + arch/arm/boot/dts/overlays/README | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -5011,6 +5011,7 @@ Load: dtoverlay=vc4-kms-dsi-waveshare- + Params: 2_8_inch 2.8" 480x640 + 3_4_inch 3.4" 800x800 round + 4_0_inch 4.0" 480x800 ++ 4_0_inchC 4.0" 720x720 + 7_0_inchC 7.0" C 1024x600 + 7_9_inch 7.9" 400x1280 + 8_0_inch 8.0" 1280x800 diff --git a/target/linux/bcm27xx/patches-6.1/950-1290-Overlays-Add-specific-clk-producer-consumer-overlays.patch b/target/linux/bcm27xx/patches-6.1/950-1290-Overlays-Add-specific-clk-producer-consumer-overlays.patch new file mode 100644 index 0000000000..477276a59a --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1290-Overlays-Add-specific-clk-producer-consumer-overlays.patch @@ -0,0 +1,223 @@ +From 9e31e8ce44ef11cabcb1b95830e1fdd8a9655ad3 Mon Sep 17 00:00:00 2001 +From: j-schambacher +Date: Mon, 11 Mar 2024 15:32:28 +0100 +Subject: [PATCH 1290/1295] Overlays:Add specific clk-producer/-consumer + overlays for Hifiberry DAC+ + +As the easy switching of the I2S module bewteen clock producer/consumer +on the PI5 is not possible, two specific DT-overlays are introduced. +The DAC+PRO boards with onboard clocks use the -PRO overlay, the boards +without oscillators the -STD version. +The "hifiberry-dacplus,slave" parameter in the -STD overlay disables +the automatic clock detection inside the hifiberry-dacplus driver. + +The former hifiberry-dacplus overlay is kept for compatibility but +will be deprecated. + +Signed-off-by: j-schambacher +--- + arch/arm/boot/dts/overlays/Makefile | 2 + + arch/arm/boot/dts/overlays/README | 42 ++++++++++++ + .../hifiberry-dacplus-pro-overlay.dts | 64 ++++++++++++++++++ + .../hifiberry-dacplus-std-overlay.dts | 65 +++++++++++++++++++ + 4 files changed, 173 insertions(+) + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-pro-overlay.dts + create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-std-overlay.dts + +--- a/arch/arm/boot/dts/overlays/Makefile ++++ b/arch/arm/boot/dts/overlays/Makefile +@@ -90,6 +90,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ + hifiberry-dac.dtbo \ + hifiberry-dac8x.dtbo \ + hifiberry-dacplus.dtbo \ ++ hifiberry-dacplus-pro.dtbo \ ++ hifiberry-dacplus-std.dtbo \ + hifiberry-dacplusadc.dtbo \ + hifiberry-dacplusadcpro.dtbo \ + hifiberry-dacplusdsp.dtbo \ +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1801,6 +1801,48 @@ Params: 24db_digital_gain Allow ga + are switched off at all times. + + ++Name: hifiberry-dacplus-pro ++Info: Configures the HifiBerry DAC+ PRO audio card (onboard clocks) ++Load: dtoverlay=hifiberry-dacplus-pro,= ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ "dtoverlay=hifiberry-dacplus,24db_digital_gain" ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24dB_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) ++ leds_off If set to 'true' the onboard indicator LEDs ++ are switched off at all times. ++ ++ ++Name: hifiberry-dacplus-std ++Info: Configures the HifiBerry DAC+ standard audio card (no onboard clocks) ++Load: dtoverlay=hifiberry-dacplus-std,= ++Params: 24db_digital_gain Allow gain to be applied via the PCM512x codec ++ Digital volume control. Enable with ++ "dtoverlay=hifiberry-dacplus,24db_digital_gain" ++ (The default behaviour is that the Digital ++ volume control is limited to a maximum of ++ 0dB. ie. it can attenuate but not provide ++ gain. For most users, this will be desired ++ as it will prevent clipping. By appending ++ the 24dB_digital_gain parameter, the Digital ++ volume control will allow up to 24dB of ++ gain. If this parameter is enabled, it is the ++ responsibility of the user to ensure that ++ the Digital volume control is set to a value ++ that does not result in clipping/distortion!) ++ leds_off If set to 'true' the onboard indicator LEDs ++ are switched off at all times. ++ ++ + Name: hifiberry-dacplusadc + Info: Configures the HifiBerry DAC+ADC audio card + Load: dtoverlay=hifiberry-dacplusadc,= +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-pro-overlay.dts +@@ -0,0 +1,64 @@ ++// Definitions for HiFiBerry DAC+ PRO, with onboard clocks ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target-path = "/"; ++ __overlay__ { ++ dacpro_osc: dacpro_osc { ++ compatible = "hifiberry,dacpro-clk"; ++ #clock-cells = <0>; ++ }; ++ }; ++ }; ++ ++ frag1: fragment@1 { ++ target = <&i2s_clk_consumer>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4d { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4d>; ++ clocks = <&dacpro_osc>; ++ AVDD-supply = <&vdd_3v3_reg>; ++ DVDD-supply = <&vdd_3v3_reg>; ++ CPVDD-supply = <&vdd_3v3_reg>; ++ status = "okay"; ++ }; ++ hpamp: hpamp@60 { ++ compatible = "ti,tpa6130a2"; ++ reg = <0x60>; ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&sound>; ++ hifiberry_dacplus: __overlay__ { ++ compatible = "hifiberry,hifiberry-dacplus"; ++ i2s-controller = <&i2s_clk_consumer>; ++ status = "okay"; ++ }; ++ }; ++ ++ __overrides__ { ++ 24db_digital_gain = ++ <&hifiberry_dacplus>,"hifiberry,24db_digital_gain?"; ++ leds_off = <&hifiberry_dacplus>,"hifiberry-dacplus,leds_off?"; ++ }; ++}; +--- /dev/null ++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-std-overlay.dts +@@ -0,0 +1,65 @@ ++// Definitions for HiFiBerry DAC+ Standard w/o onboard clocks ++/dts-v1/; ++/plugin/; ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ ++ fragment@0 { ++ target-path = "/"; ++ __overlay__ { ++ dacpro_osc: dacpro_osc { ++ compatible = "hifiberry,dacpro-clk"; ++ #clock-cells = <0>; ++ }; ++ }; ++ }; ++ ++ fragment@1 { ++ target = <&i2s_clk_producer>; ++ __overlay__ { ++ status = "okay"; ++ }; ++ }; ++ ++ fragment@2 { ++ target = <&i2c1>; ++ __overlay__ { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ pcm5122@4d { ++ #sound-dai-cells = <0>; ++ compatible = "ti,pcm5122"; ++ reg = <0x4d>; ++ clocks = <&dacpro_osc>; ++ AVDD-supply = <&vdd_3v3_reg>; ++ DVDD-supply = <&vdd_3v3_reg>; ++ CPVDD-supply = <&vdd_3v3_reg>; ++ status = "okay"; ++ }; ++ hpamp: hpamp@60 { ++ compatible = "ti,tpa6130a2"; ++ reg = <0x60>; ++ status = "disabled"; ++ }; ++ }; ++ }; ++ ++ fragment@3 { ++ target = <&sound>; ++ hifiberry_dacplus: __overlay__ { ++ compatible = "hifiberry,hifiberry-dacplus"; ++ i2s-controller = <&i2s_clk_producer>; ++ hifiberry-dacplus,slave; ++ status = "okay"; ++ }; ++ }; ++ ++ __overrides__ { ++ 24db_digital_gain = ++ <&hifiberry_dacplus>,"hifiberry,24db_digital_gain?"; ++ leds_off = <&hifiberry_dacplus>,"hifiberry-dacplus,leds_off?"; ++ }; ++}; diff --git a/target/linux/bcm27xx/patches-6.1/950-1291-overlays-hat_map-Add-Hifiberry-cards.patch b/target/linux/bcm27xx/patches-6.1/950-1291-overlays-hat_map-Add-Hifiberry-cards.patch new file mode 100644 index 0000000000..2e25c3c302 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1291-overlays-hat_map-Add-Hifiberry-cards.patch @@ -0,0 +1,96 @@ +From fae2848e87c2696d1eeaeb3f449ad871874b699f Mon Sep 17 00:00:00 2001 +From: j-schambacher +Date: Tue, 12 Mar 2024 10:59:48 +0100 +Subject: [PATCH 1291/1295] overlays:hat_map: Add Hifiberry cards + +Adds all available Hifberry cards' UUIDs to the hat_map file. + +Signed-off-by: j-schambacher +--- + arch/arm/boot/dts/overlays/hat_map.dts | 75 ++++++++++++++++++++++++++ + 1 file changed, 75 insertions(+) + +--- a/arch/arm/boot/dts/overlays/hat_map.dts ++++ b/arch/arm/boot/dts/overlays/hat_map.dts +@@ -1,6 +1,81 @@ + /dts-v1/; + + / { ++ hifiberry-amp100-1 { ++ uuid = [ 5eb863b8 12f9 41ad 978f 4cee1b3eca62 ]; ++ overlay = "hifiberry-amp100"; ++ }; ++ ++ hifiberry-amp100-2 { ++ uuid = [ b1a57dbe 8b52 447f 939e 1baf72157d79 ]; ++ overlay = "hifiberry-amp100"; ++ }; ++ ++ hifiberry-amp4pro { ++ uuid = [ 3619722a c92d 4092 95bd 493a2903e933 ]; ++ overlay = "hifiberry-amp4pro"; ++ }; ++ ++ hifiberry-amp4 { ++ uuid = [ fcb6ec42 a182 419d a314 7eeae416f608 ]; ++ overlay = "hifiberry-dacplus-std"; ++ }; ++ ++ hifiberry-dac2proadc { ++ uuid = [ 30660215 dbb2 4c57 953f 099370b63e2e ]; ++ overlay = "hifiberry-dacplusadcpro"; ++ }; ++ ++ hifiberry-dac2hd { ++ uuid = [ 482ad277 5586 480c 88e7 85ae89c4e501 ]; ++ overlay = "hifiberry-dacplushd"; ++ }; ++ ++ hifiberry-dac2pro { ++ uuid = [ ebf9cfc4 6d77 4880 89fd 353690467dfc ]; ++ overlay = "hifiberry-dacplus-pro"; ++ }; ++ ++ hifiberry-dac8x { ++ uuid = [ f65985f9 5354 4457 ae3b 3da39ba2cf6d ]; ++ overlay = "hifiberry-dac8x"; ++ }; ++ ++ hifiberry-dacplus-amp2-1 { ++ uuid = [ 81cac43d 27c6 4a1e a0b2 c70b4e608ab6 ]; ++ overlay = "hifiberry-dacplus-std"; ++ }; ++ ++ hifiberry-dacplus-amp2-2 { ++ uuid = [ ef586afc 2efa 47a0 be2e 95a7d952fe98 ]; ++ overlay = "hifiberry-dacplus-std"; ++ }; ++ ++ hifiberry-digiplus-pro { ++ uuid = [ 2154f80b 0f92 45e4 96db c1643ec2b46b ]; ++ overlay = "hifiberry-digi-pro"; ++ }; ++ ++ hifiberry-dacplusadcpro { ++ uuid = [ 36e3d3da 1ed9 468b aea3 cd165f6820f0 ]; ++ overlay = "hifiberry-dacplusadcpro"; ++ }; ++ ++ hifiberry-digi2pro { ++ uuid = [ 5af941bb 4dcf 4eac 82a8 e36e84fcabef ]; ++ overlay = "hifiberry-digi-pro"; ++ }; ++ ++ hifiberry-digi2standard { ++ uuid = [ 7c980a0e 9d15 40af 9f40 bddfbd3aee8c ]; ++ overlay = "hifiberry-digi"; ++ }; ++ ++ hifiberry-dsp2x4 { ++ uuid = [ 8f287583 429d 4206 a751 862264bbda63 ]; ++ overlay = "hifiberry-dacplus-dsp"; ++ }; ++ + iqaudio-pi-codecplus { + uuid = [ dc1c9594 c1ab 4c6c acda a88dc59a3c5b ]; + overlay = "iqaudio-codec"; diff --git a/target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch b/target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch new file mode 100644 index 0000000000..95c954ab5c --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch @@ -0,0 +1,31 @@ +From f87bf7dfa65cce1d46800c0769351fef59abba55 Mon Sep 17 00:00:00 2001 +From: j-schambacher +Date: Wed, 13 Mar 2024 10:31:18 +0100 +Subject: [PATCH 1292/1295] ASoC: Fix 16bit sample support for Hifiberry + DACplusADC + +Same issue as #5919. +'width' needs to be set independent of clocking mode. + +Signed-off-by: j-schambacher +--- + sound/soc/bcm/hifiberry_dacplusadc.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/sound/soc/bcm/hifiberry_dacplusadc.c ++++ b/sound/soc/bcm/hifiberry_dacplusadc.c +@@ -229,13 +229,11 @@ static int snd_rpi_hifiberry_dacplusadc_ + int ret = 0; + struct snd_soc_pcm_runtime *rtd = substream->private_data; + int channels = params_channels(params); +- int width = 32; ++ int width = snd_pcm_format_width(params_format(params)); + + if (snd_rpi_hifiberry_is_dacpro) { + struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; + +- width = snd_pcm_format_physical_width(params_format(params)); +- + snd_rpi_hifiberry_dacplusadc_set_sclk(component, + params_rate(params)); + diff --git a/target/linux/bcm27xx/patches-6.1/950-1293-overlays-Sets-i2s_clk_producer-as-default-for-Hifibe.patch b/target/linux/bcm27xx/patches-6.1/950-1293-overlays-Sets-i2s_clk_producer-as-default-for-Hifibe.patch new file mode 100644 index 0000000000..f1b39eb540 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1293-overlays-Sets-i2s_clk_producer-as-default-for-Hifibe.patch @@ -0,0 +1,79 @@ +From 5d1972f99f893ac9394d2a795a3b21385b9e34a5 Mon Sep 17 00:00:00 2001 +From: j-schambacher +Date: Wed, 13 Mar 2024 10:11:27 +0100 +Subject: [PATCH 1293/1295] overlays: Sets i2s_clk_producer as default for + Hifiberry DACplusADC + +As we have never released a (standard) DACplusADC board with onboard +clocks, we can simply use a fixed setup avoiding incompatibilities +with Pi5 during driver init. Setting 'hifiberry-dacplusadc,slave' in +the overlays disables the failing clock probing mechanism. + +Removes 'slave' parameter description from README which is still +supported but not needed. + +Signed-off-by: j-schambacher +--- + arch/arm/boot/dts/overlays/README | 4 +--- + .../dts/overlays/hifiberry-dacplusadc-overlay.dts | 12 +++++------- + 2 files changed, 6 insertions(+), 10 deletions(-) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -1773,7 +1773,7 @@ Params: + + + Name: hifiberry-dac8x +-Info: Configures the HifiBerry DAC8X audio cards (only on PI5) ++Info: Configures the HifiBerry DAC8X audio cards (only on Pi5) + Load: dtoverlay=hifiberry-dac8x + Params: + +@@ -1860,8 +1860,6 @@ Params: 24db_digital_gain Allow ga + responsibility of the user to ensure that + the Digital volume control is set to a value + that does not result in clipping/distortion!) +- slave Force DAC+ADC into slave mode, using Pi as +- master for bit clock and frame clock. + leds_off If set to 'true' the onboard indicator LEDs + are switched off at all times. + +--- a/arch/arm/boot/dts/overlays/hifiberry-dacplusadc-overlay.dts ++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplusadc-overlay.dts +@@ -1,4 +1,4 @@ +-// Definitions for HiFiBerry DAC+ADC ++// Definitions for HiFiBerry DAC+ADC, no onboard clocks + /dts-v1/; + /plugin/; + +@@ -15,8 +15,8 @@ + }; + }; + +- frag1: fragment@1 { +- target = <&i2s_clk_consumer>; ++ fragment@1 { ++ target = <&i2s_clk_producer>; + __overlay__ { + status = "okay"; + }; +@@ -58,7 +58,8 @@ + target = <&sound>; + hifiberry_dacplusadc: __overlay__ { + compatible = "hifiberry,hifiberry-dacplusadc"; +- i2s-controller = <&i2s_clk_consumer>; ++ i2s-controller = <&i2s_clk_producer>; ++ hifiberry-dacplusadc,slave; + status = "okay"; + }; + }; +@@ -66,9 +67,6 @@ + __overrides__ { + 24db_digital_gain = + <&hifiberry_dacplusadc>,"hifiberry,24db_digital_gain?"; +- slave = <&hifiberry_dacplusadc>,"hifiberry-dacplusadc,slave?", +- <&frag1>,"target:0=",<&i2s_clk_producer>, +- <&hifiberry_dacplusadc>,"i2s-controller:0=",<&i2s_clk_producer>; + leds_off = <&hifiberry_dacplusadc>,"hifiberry-dacplusadc,leds_off?"; + }; + }; diff --git a/target/linux/bcm27xx/patches-6.1/950-1294-imx477-make-trigger-mode-more-configurable.patch b/target/linux/bcm27xx/patches-6.1/950-1294-imx477-make-trigger-mode-more-configurable.patch new file mode 100644 index 0000000000..584782d25a --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1294-imx477-make-trigger-mode-more-configurable.patch @@ -0,0 +1,77 @@ +From f4102d30e760482e9f2fc94dcf8ce223afef3230 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Erik=20Bot=C3=B6?= +Date: Fri, 9 Feb 2024 18:37:46 +0100 +Subject: [PATCH 1294/1295] imx477: make trigger-mode more configurable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Allow trigger-mode to be overridden using device tree so that it can be +set per camera. Previously the mode could only be changed using a module +parameter, which would then affect all cameras. + +Signed-off-by: Erik Botö +--- + drivers/media/i2c/imx477.c | 19 ++++++++++++++----- + 1 file changed, 14 insertions(+), 5 deletions(-) + +--- a/drivers/media/i2c/imx477.c ++++ b/drivers/media/i2c/imx477.c +@@ -1124,6 +1124,9 @@ struct imx477 { + /* Current mode */ + const struct imx477_mode *mode; + ++ /* Trigger mode */ ++ int trigger_mode_of; ++ + /* + * Mutex for serialized access: + * Protect sensor module set pad format and start/stop streaming safely. +@@ -1711,7 +1714,7 @@ static int imx477_start_streaming(struct + struct i2c_client *client = v4l2_get_subdevdata(&imx477->sd); + const struct imx477_reg_list *reg_list; + const struct imx477_reg_list *extra_regs; +- int ret; ++ int ret, tm; + + if (!imx477->common_regs_written) { + ret = imx477_write_regs(imx477, mode_common_regs, +@@ -1748,14 +1751,15 @@ static int imx477_start_streaming(struct + return ret; + + /* Set vsync trigger mode: 0=standalone, 1=source, 2=sink */ ++ tm = (imx477->trigger_mode_of >= 0) ? imx477->trigger_mode_of : trigger_mode; + imx477_write_reg(imx477, IMX477_REG_MC_MODE, +- IMX477_REG_VALUE_08BIT, (trigger_mode > 0) ? 1 : 0); ++ IMX477_REG_VALUE_08BIT, (tm > 0) ? 1 : 0); + imx477_write_reg(imx477, IMX477_REG_MS_SEL, +- IMX477_REG_VALUE_08BIT, (trigger_mode <= 1) ? 1 : 0); ++ IMX477_REG_VALUE_08BIT, (tm <= 1) ? 1 : 0); + imx477_write_reg(imx477, IMX477_REG_XVS_IO_CTRL, +- IMX477_REG_VALUE_08BIT, (trigger_mode == 1) ? 1 : 0); ++ IMX477_REG_VALUE_08BIT, (tm == 1) ? 1 : 0); + imx477_write_reg(imx477, IMX477_REG_EXTOUT_EN, +- IMX477_REG_VALUE_08BIT, (trigger_mode == 1) ? 1 : 0); ++ IMX477_REG_VALUE_08BIT, (tm == 1) ? 1 : 0); + + /* set stream on register */ + return imx477_write_reg(imx477, IMX477_REG_MODE_SELECT, +@@ -2187,6 +2191,7 @@ static int imx477_probe(struct i2c_clien + struct imx477 *imx477; + const struct of_device_id *match; + int ret; ++ u32 tm_of; + + imx477 = devm_kzalloc(&client->dev, sizeof(*imx477), GFP_KERNEL); + if (!imx477) +@@ -2204,6 +2209,10 @@ static int imx477_probe(struct i2c_clien + if (imx477_check_hwcfg(dev)) + return -EINVAL; + ++ /* Default the trigger mode from OF to -1, which means invalid */ ++ ret = of_property_read_u32(dev->of_node, "trigger-mode", &tm_of); ++ imx477->trigger_mode_of = (ret == 0) ? tm_of : -1; ++ + /* Get system clock (xclk) */ + imx477->xclk = devm_clk_get(dev, NULL); + if (IS_ERR(imx477->xclk)) { diff --git a/target/linux/bcm27xx/patches-6.1/950-1295-imx477-Update-device-tree-overlays-to-support-trigge.patch b/target/linux/bcm27xx/patches-6.1/950-1295-imx477-Update-device-tree-overlays-to-support-trigge.patch new file mode 100644 index 0000000000..d9df79412b --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/950-1295-imx477-Update-device-tree-overlays-to-support-trigge.patch @@ -0,0 +1,129 @@ +From d02bd251d7f85e3aec02e5752df2f44a35961360 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Erik=20Bot=C3=B6?= +Date: Fri, 9 Feb 2024 18:41:24 +0100 +Subject: [PATCH 1295/1295] imx477: Update device tree overlays to support + trigger-mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Also create generic overrides in camera-mux-N-port, that can be extended +to configure vsync modes for cameras supporting this. + +Example usages (to be combined with camera_auto_detect=0): +dtoverlay=imx477,cam0,sync-source +dtoverlay=imx477,sync-sink +dtoverlay=camera-mux-2port,cam1-imx477,cam1-sync-sink +dtoverlay=camera-mux-4port,cam3-imx477,cam3-sync-sink + +Signed-off-by: Erik Botö +--- + arch/arm/boot/dts/overlays/README | 16 ++++++++++++++++ + .../dts/overlays/camera-mux-2port-overlay.dts | 5 +++++ + .../dts/overlays/camera-mux-4port-overlay.dts | 9 +++++++++ + arch/arm/boot/dts/overlays/imx378-overlay.dts | 7 +++++++ + arch/arm/boot/dts/overlays/imx477-overlay.dts | 7 +++++++ + 5 files changed, 44 insertions(+) + +--- a/arch/arm/boot/dts/overlays/README ++++ b/arch/arm/boot/dts/overlays/README +@@ -862,6 +862,10 @@ Params: cam0-arducam-64mp Select A + cam1-ov7251 Select OV7251 for camera on port 1 + cam1-ov9281 Select OV9281 for camera on port 1 + cam1-imx290-clk-freq Set clock frequency for an IMX290 on port 1 ++ cam0-sync-source Set camera on port 0 as vsync source ++ cam0-sync-sink Set camera on port 0 as vsync sink ++ cam1-sync-source Set camera on port 1 as vsync source ++ cam1-sync-sink Set camera on port 1 as vsync sink + + cam0 Connect the mux to CAM0 port (default is CAM1) + +@@ -923,6 +927,14 @@ Params: cam0-arducam-64mp Select A + cam3-ov7251 Select OV7251 for camera on port 3 + cam3-ov9281 Select OV9281 for camera on port 3 + cam3-imx290-clk-freq Set clock frequency for an IMX290 on port 3 ++ cam0-sync-source Set camera on port 0 as vsync source ++ cam0-sync-sink Set camera on port 0 as vsync sink ++ cam1-sync-source Set camera on port 1 as vsync source ++ cam1-sync-sink Set camera on port 1 as vsync sink ++ cam2-sync-source Set camera on port 2 as vsync source ++ cam2-sync-sink Set camera on port 2 as vsync sink ++ cam3-sync-source Set camera on port 3 as vsync source ++ cam3-sync-sink Set camera on port 3 as vsync sink + + cam0 Connect the mux to CAM0 port (default is CAM1) + +@@ -2676,6 +2688,8 @@ Params: rotation Mounting + Compute Module (CSI0, i2c_vc, and cam0_reg). + always-on Leave the regulator powered up, to stop the + camera clamping I/Os such as XVS to 0V. ++ sync-source Configure as vsync source ++ sync-sink Configure as vsync sink + + + Name: imx462 +@@ -2716,6 +2730,8 @@ Params: rotation Mounting + Compute Module (CSI0, i2c_vc, and cam0_reg). + always-on Leave the regulator powered up, to stop the + camera clamping I/Os such as XVS to 0V. ++ sync-source Configure as vsync source ++ sync-sink Configure as vsync sink + + + Name: imx519 +--- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts ++++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts +@@ -536,5 +536,10 @@ + + cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, + <&csi_frag>, "target:0=",<&csi0>; ++ ++ cam0-sync-source = <&imx477_0>, "trigger-mode:0=1"; ++ cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2"; ++ cam1-sync-source = <&imx477_1>, "trigger-mode:0=1"; ++ cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2"; + }; + }; +--- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts ++++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts +@@ -939,5 +939,14 @@ + + cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>, + <&csi_frag>, "target:0=",<&csi0>; ++ ++ cam0-sync-source = <&imx477_0>, "trigger-mode:0=1"; ++ cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2"; ++ cam1-sync-source = <&imx477_1>, "trigger-mode:0=1"; ++ cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2"; ++ cam2-sync-source = <&imx477_2>, "trigger-mode:0=1"; ++ cam2-sync-sink = <&imx477_2>, "trigger-mode:0=2"; ++ cam3-sync-source = <&imx477_3>, "trigger-mode:0=1"; ++ cam3-sync-sink = <&imx477_3>, "trigger-mode:0=2"; + }; + }; +--- a/arch/arm/boot/dts/overlays/imx378-overlay.dts ++++ b/arch/arm/boot/dts/overlays/imx378-overlay.dts +@@ -8,3 +8,10 @@ + &cam_node { + compatible = "sony,imx378"; + }; ++ ++/{ ++ __overrides__ { ++ sync-sink = <&cam_node>,"trigger-mode:0=2"; ++ sync-source = <&cam_node>,"trigger-mode:0=1"; ++ }; ++}; +--- a/arch/arm/boot/dts/overlays/imx477-overlay.dts ++++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts +@@ -8,3 +8,10 @@ + &cam_node { + compatible = "sony,imx477"; + }; ++ ++/{ ++ __overrides__ { ++ sync-sink = <&cam_node>,"trigger-mode:0=2"; ++ sync-source = <&cam_node>,"trigger-mode:0=1"; ++ }; ++}; From 65123335189e4600d7986e3d2fa461e6c823fb2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 6 Apr 2024 17:56:37 +0200 Subject: [PATCH 09/11] bcm27xx: bcm2712: backport RP1 interrupt affinity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support for setting the CPU affinity on RP1 has been added to RPi linux v6.6 Signed-off-by: Álvaro Fernández Rojas --- ...d-rp1-Support-interrupt-CPU-affinity.patch | 35 +++++++++++++ ...1-Use-the-correct-per-bank-GPIO-base.patch | 30 +++++++++++ ...-Allow-legacy-brcm-pins-on-all-banks.patch | 47 +++++++++++++++++ ...l-rp1-Support-interrupt-CPU-affinity.patch | 52 +++++++++++++++++++ ...1-Clear-events-when-setting-IRQ-type.patch | 31 +++++++++++ 5 files changed, 195 insertions(+) create mode 100644 target/linux/bcm27xx/patches-6.1/961-1-mfd-rp1-Support-interrupt-CPU-affinity.patch create mode 100644 target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch create mode 100644 target/linux/bcm27xx/patches-6.1/961-3-pinctrl-rp1-Allow-legacy-brcm-pins-on-all-banks.patch create mode 100644 target/linux/bcm27xx/patches-6.1/961-4-pinctrl-rp1-Support-interrupt-CPU-affinity.patch create mode 100644 target/linux/bcm27xx/patches-6.1/961-5-pinctrl-rp1-Clear-events-when-setting-IRQ-type.patch diff --git a/target/linux/bcm27xx/patches-6.1/961-1-mfd-rp1-Support-interrupt-CPU-affinity.patch b/target/linux/bcm27xx/patches-6.1/961-1-mfd-rp1-Support-interrupt-CPU-affinity.patch new file mode 100644 index 0000000000..3d0aa360bf --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/961-1-mfd-rp1-Support-interrupt-CPU-affinity.patch @@ -0,0 +1,35 @@ +From 877cf6ae71c8eb9315014b3b379d9519ae6401b4 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 3 Apr 2024 23:15:28 +0100 +Subject: [PATCH 1/5] mfd: rp1: Support interrupt CPU affinity + +See: https://github.com/raspberrypi/linux/issues/6077 + +Signed-off-by: Phil Elwell +--- + drivers/mfd/rp1.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/mfd/rp1.c ++++ b/drivers/mfd/rp1.c +@@ -141,11 +141,20 @@ static int rp1_irq_set_type(struct irq_d + return ret; + } + ++static int rp1_irq_set_affinity(struct irq_data *irqd, const struct cpumask *dest, bool force) ++{ ++ struct rp1_dev *rp1 = irqd->domain->host_data; ++ struct irq_data *pcie_irqd = rp1->pcie_irqds[irqd->hwirq]; ++ ++ return msi_domain_set_affinity(pcie_irqd, dest, force); ++} ++ + static struct irq_chip rp1_irq_chip = { + .name = "rp1_irq_chip", + .irq_mask = rp1_mask_irq, + .irq_unmask = rp1_unmask_irq, + .irq_set_type = rp1_irq_set_type, ++ .irq_set_affinity = rp1_irq_set_affinity, + }; + + static void rp1_chained_handle_irq(struct irq_desc *desc) diff --git a/target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch b/target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch new file mode 100644 index 0000000000..213df3f7fb --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch @@ -0,0 +1,30 @@ +From d11b1d7f7df4bd1a5ab4df35b2a5c8569f2eacbe Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 4 Apr 2024 10:47:46 +0100 +Subject: [PATCH 2/5] pinctrl: rp1: Use the correct per-bank GPIO base + +The GPIO start for each bank - min_gpio - must be used in the IRQ +handler. + +Signed-off-by: Phil Elwell +--- + drivers/pinctrl/pinctrl-rp1.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/pinctrl/pinctrl-rp1.c ++++ b/drivers/pinctrl/pinctrl-rp1.c +@@ -781,12 +781,12 @@ static void rp1_gpio_irq_handler(struct + + ints = readl(pc->gpio_base + bank->ints_offset); + for_each_set_bit(b, &ints, 32) { +- struct rp1_pin_info *pin = rp1_get_pin(chip, b); ++ struct rp1_pin_info *pin = rp1_get_pin(chip, bank->min_gpio + b); + + writel(RP1_GPIO_CTRL_IRQRESET, + pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL); + generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irq.domain, +- bank->gpio_offset + b)); ++ bank->min_gpio + b)); + } + + chained_irq_exit(host_chip, desc); diff --git a/target/linux/bcm27xx/patches-6.1/961-3-pinctrl-rp1-Allow-legacy-brcm-pins-on-all-banks.patch b/target/linux/bcm27xx/patches-6.1/961-3-pinctrl-rp1-Allow-legacy-brcm-pins-on-all-banks.patch new file mode 100644 index 0000000000..4550188cb4 --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/961-3-pinctrl-rp1-Allow-legacy-brcm-pins-on-all-banks.patch @@ -0,0 +1,47 @@ +From d81e2fafab376d3975c46c5f477945384a38524d Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 4 Apr 2024 10:50:32 +0100 +Subject: [PATCH 3/5] pinctrl: rp1: Allow legacy brcm,pins on all banks + +Support the use of the brcm,pins property for GPIOs in banks 1 and 2, +but only for inputs and outputs - no other legacy mapping. + +Signed-off-by: Phil Elwell +--- + drivers/pinctrl/pinctrl-rp1.c | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +--- a/drivers/pinctrl/pinctrl-rp1.c ++++ b/drivers/pinctrl/pinctrl-rp1.c +@@ -981,7 +981,16 @@ static int rp1_pctl_legacy_map_func(stru + return -EINVAL; + } + +- func = legacy_fsel_map[pin][fnum]; ++ if (pin < ARRAY_SIZE(legacy_fsel_map)) { ++ func = legacy_fsel_map[pin][fnum]; ++ } else if (fnum < 2) { ++ func = func_gpio; ++ } else { ++ dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n", ++ np, pin); ++ return -EINVAL; ++ } ++ + if (func == func_invalid) { + dev_err(pc->dev, "%pOF: brcm,function %d not supported on pin %d\n", + np, fnum, pin); +@@ -1104,13 +1113,6 @@ static int rp1_pctl_dt_node_to_map(struc + err = of_property_read_u32_index(np, "brcm,pins", i, &pin); + if (err) + goto out; +- if (pin >= ARRAY_SIZE(legacy_fsel_map)) { +- dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n", +- np, pin); +- err = -EINVAL; +- goto out; +- } +- + if (num_funcs) { + err = of_property_read_u32_index(np, "brcm,function", + (num_funcs > 1) ? i : 0, diff --git a/target/linux/bcm27xx/patches-6.1/961-4-pinctrl-rp1-Support-interrupt-CPU-affinity.patch b/target/linux/bcm27xx/patches-6.1/961-4-pinctrl-rp1-Support-interrupt-CPU-affinity.patch new file mode 100644 index 0000000000..6d418626dc --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/961-4-pinctrl-rp1-Support-interrupt-CPU-affinity.patch @@ -0,0 +1,52 @@ +From 086480cc43b9d967647b237a84623b27b8850a64 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 3 Apr 2024 23:16:47 +0100 +Subject: [PATCH 4/5] pinctrl: rp1: Support interrupt CPU affinity + +See: https://github.com/raspberrypi/linux/issues/6077 + +Signed-off-by: Phil Elwell +--- + drivers/pinctrl/pinctrl-rp1.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +--- a/drivers/pinctrl/pinctrl-rp1.c ++++ b/drivers/pinctrl/pinctrl-rp1.c +@@ -894,6 +894,29 @@ static void rp1_gpio_irq_ack(struct irq_ + writel(RP1_GPIO_CTRL_IRQRESET, pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL); + } + ++static int rp1_gpio_irq_set_affinity(struct irq_data *data, const struct cpumask *dest, bool force) ++{ ++ struct gpio_chip *chip = irq_data_get_irq_chip_data(data); ++ struct rp1_pinctrl *pc = gpiochip_get_data(chip); ++ const struct rp1_iobank_desc *bank; ++ struct irq_data *parent_data = NULL; ++ int i; ++ ++ for (i = 0; i < 3; i++) { ++ bank = &rp1_iobanks[i]; ++ if (data->hwirq >= bank->min_gpio && ++ data->hwirq < bank->min_gpio + bank->num_gpios) { ++ parent_data = irq_get_irq_data(pc->irq[i]); ++ break; ++ } ++ } ++ ++ if (parent_data && parent_data->chip->irq_set_affinity) ++ return parent_data->chip->irq_set_affinity(parent_data, dest, force); ++ ++ return -EINVAL; ++} ++ + static struct irq_chip rp1_gpio_irq_chip = { + .name = MODULE_NAME, + .irq_enable = rp1_gpio_irq_enable, +@@ -902,6 +925,7 @@ static struct irq_chip rp1_gpio_irq_chip + .irq_ack = rp1_gpio_irq_ack, + .irq_mask = rp1_gpio_irq_disable, + .irq_unmask = rp1_gpio_irq_enable, ++ .irq_set_affinity = rp1_gpio_irq_set_affinity, + .flags = IRQCHIP_IMMUTABLE, + }; + diff --git a/target/linux/bcm27xx/patches-6.1/961-5-pinctrl-rp1-Clear-events-when-setting-IRQ-type.patch b/target/linux/bcm27xx/patches-6.1/961-5-pinctrl-rp1-Clear-events-when-setting-IRQ-type.patch new file mode 100644 index 0000000000..afb3d965bd --- /dev/null +++ b/target/linux/bcm27xx/patches-6.1/961-5-pinctrl-rp1-Clear-events-when-setting-IRQ-type.patch @@ -0,0 +1,31 @@ +From ba9f37cecf19e4d2b5cc7186d054735e3cc7a4a2 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Thu, 4 Apr 2024 11:52:33 +0100 +Subject: [PATCH 5/5] pinctrl: rp1: Clear events when setting IRQ type + +When setting the interrupt type, it is unlikely that any latched events +are of interest, so clear them. + +Signed-off-by: Phil Elwell +--- + drivers/pinctrl/pinctrl-rp1.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/pinctrl/pinctrl-rp1.c ++++ b/drivers/pinctrl/pinctrl-rp1.c +@@ -848,10 +848,13 @@ static int rp1_irq_set_type(struct rp1_p + return -EINVAL; + } + +- /* Clear them all */ ++ /* Clear the event enables */ + writel(RP1_INT_MASK << RP1_GPIO_EVENTS_SHIFT_RAW, + pin->gpio + RP1_CLR_OFFSET + RP1_GPIO_CTRL); +- /* Set those that are needed */ ++ /* Clear any latched events */ ++ writel(RP1_GPIO_CTRL_IRQRESET, ++ pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL); ++ /* Enable the events that are needed */ + writel(irq_flags << RP1_GPIO_EVENTS_SHIFT_RAW, + pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL); + pin->irq_type = type; From 5e0587b8d1274096620031951f0fe0449913740d Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 7 Apr 2024 11:15:23 +0200 Subject: [PATCH 10/11] uclient: update to Git HEAD (2024-04-05) e209a4ced1d8 add strdupa macro for compatibility af1962b9a609 uclient: add helper function for getting ustream-ssl context/ops 488f1d52cfd2 http: add helper function for checking redirect status b6e5548a3ecc uclient: defer read notifications to uloop timer 352fb3eeb408 http: call ustream_poll if not enough read data is available e611e6d0ff0b add ucode binding ddb18d265757 uclient: add function for getting the amount of pending read/write data 980220ad1762 ucode: fix a few ucode binding issues 6c16331e4bf5 ucode: add support for using a prototype for cb, pass it to callbacks Signed-off-by: Felix Fietkau --- package/libs/uclient/Makefile | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile index 8a977a7aa7..cb679231cc 100644 --- a/package/libs/uclient/Makefile +++ b/package/libs/uclient/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git -PKG_MIRROR_HASH:=798f77d47695f7aaf7397072be2d2359c69ef53993e1b1910074cdacaa1d17e2 -PKG_SOURCE_DATE:=2023-04-13 -PKG_SOURCE_VERSION:=007d945467499f43656b141171d31f5643b83a6c +PKG_MIRROR_HASH:=21c95854c60757007edacc579ce874999d2d536f682b0e636a8d19bc75e70da5 +PKG_SOURCE_DATE:=2024-04-05 +PKG_SOURCE_VERSION:=6c16331e4bf542fbb538d62a6b5bf3d286ecbf2c CMAKE_INSTALL:=1 PKG_BUILD_DEPENDS:=ustream-ssl @@ -16,6 +16,7 @@ PKG_LICENSE:=ISC PKG_LICENSE_FILES:= PKG_MAINTAINER:=Felix Fietkau +PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_ucode-mod-uclient include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -37,6 +38,16 @@ define Package/uclient-fetch DEPENDS:=+libuclient endef +define Package/ucode-mod-uclient + SECTION:=utils + CATEGORY:=Utilities + TITLE:=ucode uclient module + DEPENDS:=+libucode +libuclient +endef + +CMAKE_OPTIONS += \ + -DBUILD_UCODE=$(if $(CONFIG_PACKAGE_ucode-mod-uclient),ON,OFF) + define Package/libuclient/install $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuclient.so $(1)/usr/lib/ @@ -47,5 +58,11 @@ define Package/uclient-fetch/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uclient-fetch $(1)/bin/ endef +define Package/ucode-mod-uclient/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/*.so $(1)/usr/lib/ucode +endef + $(eval $(call BuildPackage,libuclient)) $(eval $(call BuildPackage,uclient-fetch)) +$(eval $(call BuildPackage,ucode-mod-uclient)) From 501ef81040baa2ee31de6dd9f75d619de0e4c9bc Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 7 Apr 2024 19:50:04 +0100 Subject: [PATCH 11/11] config: select KERNEL_WERROR if building with default GCC version At the moment we have to manually follow the default GCC version also in config/Config-kernel.in. This tends to be forgotten at GCC version bumps (just happened when switching from version 12 to 13). Instead, introduce a hidden Kconfig symbol which implies KERNEL_WERROR in toolchain/gcc/Config.in where it is visible for developers changing the default version. Also remove the explicit default on BUILDBOT to avoid a circular dependency and also because buildbots anyway implicitly always select the default GCC version. Reference: https://github.com/openwrt/openwrt/pull/15064 Signed-off-by: Daniel Golle --- config/Config-kernel.in | 2 -- toolchain/gcc/Config.in | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index f4ea6ccbe8..feabf0870e 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -1418,8 +1418,6 @@ config KERNEL_JFFS2_FS_SECURITY config KERNEL_WERROR bool "Compile the kernel with warnings as errors" - default BUILDBOT - default y if GCC_USE_VERSION_12 help A kernel build should not cause any compiler warnings, and this enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 85abbdabb7..fd98914075 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -16,6 +16,11 @@ choice bool "gcc 13.x" endchoice +config GCC_USE_DEFAULT_VERSION + bool + default y if !TOOLCHAINOPTS || GCC_USE_VERSION_13 + imply KERNEL_WERROR + config GCC_USE_GRAPHITE bool prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS