[PATCH 3/4] tegra: initial kernel 6.1 support

Tomasz Maciej Nowak tmn505 at terefe.re
Thu Jul 27 13:25:47 PDT 2023


From: Tomasz Maciej Nowak <tmn505 at gmail.com>

- refresh patches
- adjust kernel config, with main change enabling VIDEO_TEGRA_VDE,
  necessary for driving power domain responsible for clean reboot
- adjust LED patch to changes in LED drivers

Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 package/kernel/linux/modules/video.mk         |  4 +-
 target/linux/tegra/Makefile                   |  1 +
 target/linux/tegra/config-6.1                 | 77 +++++++++++++++++--
 ...interrupts-due-to-tegra2-silicon-bug.patch |  2 +-
 ...enable-front-panel-leds-in-TrimSlice.patch | 22 ++++--
 5 files changed, 90 insertions(+), 16 deletions(-)

diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index e8a2d479ee03..b0f5c027ed60 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -1058,7 +1058,7 @@ define KernelPackage/video-mem2mem
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=Memory 2 Memory device support
   HIDDEN:=1
-  DEPENDS:=+kmod-video-videobuf2
+  DEPENDS:=@!TARGET_tegra +kmod-video-videobuf2
   KCONFIG:= CONFIG_V4L_MEM2MEM_DRIVERS=y
   FILES:= $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-mem2mem.ko
   AUTOLOAD:=$(call AutoLoad,66,v4l2-mem2mem)
@@ -1075,7 +1075,7 @@ define KernelPackage/video-dma
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=Video DMA support
   HIDDEN:=1
-  DEPENDS:=+kmod-video-videobuf2
+  DEPENDS:=@!TARGET_tegra +kmod-video-videobuf2
   KCONFIG:= \
 	CONFIG_VIDEOBUF2_DMA_CONTIG \
 	CONFIG_VIDEOBUF2_DMA_SG
diff --git a/target/linux/tegra/Makefile b/target/linux/tegra/Makefile
index 43ca154e8a08..95d62cf6b0f5 100644
--- a/target/linux/tegra/Makefile
+++ b/target/linux/tegra/Makefile
@@ -13,6 +13,7 @@ CPU_SUBTYPE := vfpv3-d16
 SUBTARGETS := generic
 
 KERNEL_PATCHVER := 5.15
+KERNEL_TESTING_PATCHVER := 6.1
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/tegra/config-6.1 b/target/linux/tegra/config-6.1
index 257ffda252ad..1f2000044916 100644
--- a/target/linux/tegra/config-6.1
+++ b/target/linux/tegra/config-6.1
@@ -23,12 +23,11 @@ CONFIG_ARCH_TEGRA_2x_SOC=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
 CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
 CONFIG_ARM_ERRATA_720789=y
 CONFIG_ARM_ERRATA_754327=y
 CONFIG_ARM_ERRATA_764369=y
 CONFIG_ARM_GIC=y
-CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
 CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
@@ -55,6 +54,8 @@ CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_PM=y
 CONFIG_BOUNCE=y
 CONFIG_CACHE_L2X0=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CLZ_TAB=y
@@ -70,7 +71,10 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
 # CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
 # CONFIG_CMA_SYSFS is not set
 CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CONTIG_ALLOC=y
 CONFIG_CPUFREQ_DT=y
 CONFIG_CPUFREQ_DT_PLATDEV=y
@@ -97,6 +101,7 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
 CONFIG_CPU_HAS_ASID=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
@@ -120,7 +125,9 @@ CONFIG_CRYPTO_ECHAINIV=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_JITTERENTROPY=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZ4=y
 CONFIG_CRYPTO_LZ4HC=y
 CONFIG_CRYPTO_LZO=y
@@ -137,30 +144,37 @@ CONFIG_CRYPTO_SHA512=y
 CONFIG_CRYPTO_SHA512_ARM=y
 CONFIG_CRYPTO_TWOFISH=y
 CONFIG_CRYPTO_TWOFISH_COMMON=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
 CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DDR=y
 CONFIG_DEBUG_ALIGN_RODATA=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 # CONFIG_DEVFREQ_GOV_PASSIVE is not set
 # CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
 # CONFIG_DEVFREQ_GOV_POWERSAVE is not set
 CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
 # CONFIG_DEVFREQ_GOV_USERSPACE is not set
-CONFIG_DEVFREQ_THERMAL=y
+# CONFIG_DEVFREQ_THERMAL is not set
 # CONFIG_DEVPORT is not set
 CONFIG_DMADEVICES=y
 CONFIG_DMA_CMA=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DNOTIFY=y
 CONFIG_DRM=y
 CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_DISPLAY_DP_HELPER=y
+CONFIG_DRM_DISPLAY_HDMI_HELPER=y
+CONFIG_DRM_DISPLAY_HELPER=y
+CONFIG_DRM_DP_AUX_BUS=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_NOMODESET=y
 CONFIG_DRM_PANEL=y
 CONFIG_DRM_PANEL_BRIDGE=y
 CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
@@ -170,6 +184,7 @@ CONFIG_DRM_TEGRA=y
 CONFIG_DTC=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_EXTCON=y
 CONFIG_F2FS_FS=y
@@ -187,6 +202,7 @@ CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
@@ -220,7 +236,6 @@ CONFIG_GLOB=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_TEGRA=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
@@ -244,23 +259,24 @@ CONFIG_I2C_COMPAT=y
 CONFIG_I2C_TEGRA=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
-CONFIG_INPUT_KEYBOARD=y
 CONFIG_INTERCONNECT=y
 CONFIG_IOMMU_API=y
 # CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
 CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
+# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
 CONFIG_IOMMU_IOVA=y
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
 CONFIG_IOMMU_SUPPORT=y
 CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 CONFIG_JBD2=y
 CONFIG_KCMP=y
-CONFIG_KEYBOARD_ATKBD=y
 CONFIG_KMAP_LOCAL=y
 CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
 CONFIG_LIBFDT=y
@@ -271,6 +287,12 @@ CONFIG_LZ4_COMPRESS=y
 CONFIG_LZ4_DECOMPRESS=y
 CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
+CONFIG_MEDIA_CONTROLLER=y
+CONFIG_MEDIA_CONTROLLER_REQUEST_API=y
+CONFIG_MEDIA_PLATFORM_DRIVERS=y
+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_SUPPORT_FILTER=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MEMORY_ISOLATION=y
@@ -311,6 +333,9 @@ CONFIG_OUTER_CACHE=y
 CONFIG_OUTER_CACHE_SYNC=y
 CONFIG_PADATA=y
 CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
 CONFIG_PCI=y
 CONFIG_PCIEAER=y
 CONFIG_PCIEASPM=y
@@ -345,11 +370,13 @@ CONFIG_PM_OPP=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_GPIO=y
 CONFIG_POWER_SUPPLY=y
+CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_PWM=y
 CONFIG_PWM_SYSFS=y
 CONFIG_PWM_TEGRA=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
@@ -384,6 +411,7 @@ CONFIG_SG_POOL=y
 CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SND=y
+CONFIG_SND_AUDIO_GRAPH_CARD=y
 # CONFIG_SND_COMPRESS_OFFLOAD is not set
 CONFIG_SND_DMAENGINE_PCM=y
 # CONFIG_SND_DRIVERS is not set
@@ -392,26 +420,37 @@ CONFIG_SND_JACK=y
 CONFIG_SND_JACK_INPUT_DEV=y
 # CONFIG_SND_PCI is not set
 CONFIG_SND_PCM=y
+CONFIG_SND_PCM_ELD=y
+CONFIG_SND_PCM_IEC958=y
 # CONFIG_SND_PROC_FS is not set
 CONFIG_SND_SIMPLE_CARD=y
 CONFIG_SND_SIMPLE_CARD_UTILS=y
 CONFIG_SND_SOC=y
 CONFIG_SND_SOC_AC97_BUS=y
 CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
+CONFIG_SND_SOC_HDMI_CODEC=y
 CONFIG_SND_SOC_I2C_AND_SPI=y
 CONFIG_SND_SOC_TEGRA=y
+# CONFIG_SND_SOC_TEGRA186_ASRC is not set
 # CONFIG_SND_SOC_TEGRA186_DSPK is not set
 CONFIG_SND_SOC_TEGRA20_AC97=y
 CONFIG_SND_SOC_TEGRA20_DAS=y
 CONFIG_SND_SOC_TEGRA20_I2S=y
 CONFIG_SND_SOC_TEGRA20_SPDIF=y
 # CONFIG_SND_SOC_TEGRA210_ADMAIF is not set
+# CONFIG_SND_SOC_TEGRA210_ADX is not set
 # CONFIG_SND_SOC_TEGRA210_AHUB is not set
+# CONFIG_SND_SOC_TEGRA210_AMX is not set
 # CONFIG_SND_SOC_TEGRA210_DMIC is not set
 # CONFIG_SND_SOC_TEGRA210_I2S is not set
+# CONFIG_SND_SOC_TEGRA210_MIXER is not set
+# CONFIG_SND_SOC_TEGRA210_MVC is not set
+# CONFIG_SND_SOC_TEGRA210_OPE is not set
+# CONFIG_SND_SOC_TEGRA210_SFC is not set
 # CONFIG_SND_SOC_TEGRA30_AHUB is not set
 # CONFIG_SND_SOC_TEGRA30_I2S is not set
 # CONFIG_SND_SOC_TEGRA_ALC5632 is not set
+# CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD is not set
 CONFIG_SND_SOC_TEGRA_MACHINE_DRV=y
 # CONFIG_SND_SOC_TEGRA_MAX98090 is not set
 # CONFIG_SND_SOC_TEGRA_RT5640 is not set
@@ -430,6 +469,7 @@ CONFIG_SOC_TEGRA20_VOLTAGE_COUPLER=y
 CONFIG_SOC_TEGRA_FLOWCTRL=y
 CONFIG_SOC_TEGRA_FUSE=y
 CONFIG_SOC_TEGRA_PMC=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SOUND=y
 CONFIG_SOUND_OSS_CORE=y
 CONFIG_SOUND_OSS_CORE_PRECLAIM=y
@@ -441,23 +481,33 @@ CONFIG_SPI_MEM=y
 CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
 # CONFIG_SPI_TEGRA210_QUAD is not set
+CONFIG_SRAM=y
+CONFIG_SRAM_EXEC=y
 CONFIG_SRCU=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYNC_FILE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_TEGRA186_TIMER is not set
 CONFIG_TEGRA20_APB_DMA=y
 CONFIG_TEGRA20_EMC=y
 CONFIG_TEGRA_AHB=y
 CONFIG_TEGRA_GMI=y
 CONFIG_TEGRA_HOST1X=y
+CONFIG_TEGRA_HOST1X_CONTEXT_BUS=y
 CONFIG_TEGRA_HOST1X_FIREWALL=y
 CONFIG_TEGRA_IOMMU_GART=y
 # CONFIG_TEGRA_IOMMU_SMMU is not set
 # CONFIG_TEGRA_IVC is not set
 CONFIG_TEGRA_MC=y
-# CONFIG_TEGRA_SOCTHERM is not set
+CONFIG_TEGRA_SOCTHERM=y
 CONFIG_TEGRA_TIMER=y
 CONFIG_TEGRA_WATCHDOG=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
@@ -490,8 +540,19 @@ CONFIG_USB_ULPI_BUS=y
 CONFIG_USB_ULPI_VIEWPORT=y
 # CONFIG_USB_XHCI_TEGRA is not set
 CONFIG_USE_OF=y
+CONFIG_V4L2_H264=y
+CONFIG_V4L2_MEM2MEM_DEV=y
+CONFIG_V4L_MEM2MEM_DRIVERS=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
+CONFIG_VIDEOBUF2_CORE=y
+CONFIG_VIDEOBUF2_DMA_CONTIG=y
+CONFIG_VIDEOBUF2_DMA_SG=y
+CONFIG_VIDEOBUF2_MEMOPS=y
+CONFIG_VIDEOBUF2_V4L2=y
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_TEGRA_VDE=y
+CONFIG_VIDEO_V4L2_I2C=y
 CONFIG_WATCHDOG_CORE=y
 # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
 CONFIG_XPS=y
diff --git a/target/linux/tegra/patches-6.1/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch b/target/linux/tegra/patches-6.1/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
index 8f01f73eb24a..08ed9d441c5f 100644
--- a/target/linux/tegra/patches-6.1/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
+++ b/target/linux/tegra/patches-6.1/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
@@ -36,7 +36,7 @@ David
 
 --- a/drivers/tty/serial/8250/8250_core.c
 +++ b/drivers/tty/serial/8250/8250_core.c
-@@ -134,6 +134,38 @@ static irqreturn_t serial8250_interrupt(
+@@ -133,6 +133,38 @@ static irqreturn_t serial8250_interrupt(
  
  		if (l == i->head && pass_counter++ > PASS_LIMIT)
  			break;
diff --git a/target/linux/tegra/patches-6.1/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch b/target/linux/tegra/patches-6.1/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
index b1e210b212de..e4a17af66fad 100644
--- a/target/linux/tegra/patches-6.1/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
+++ b/target/linux/tegra/patches-6.1/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
@@ -1,6 +1,14 @@
 --- a/arch/arm/boot/dts/tegra20-trimslice.dts
 +++ b/arch/arm/boot/dts/tegra20-trimslice.dts
-@@ -201,16 +201,17 @@
+@@ -2,6 +2,7 @@
+ /dts-v1/;
+ 
+ #include <dt-bindings/input/input.h>
++#include <dt-bindings/leds/common.h>
+ #include "tegra20.dtsi"
+ #include "tegra20-cpu-opp.dtsi"
+ 
+@@ -201,16 +202,17 @@
  			conf_ata {
  				nvidia,pins = "ata", "atc", "atd", "ate",
  					"crtp", "dap2", "dap3", "dap4", "dta",
@@ -23,20 +31,24 @@
  				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  				nvidia,tristate = <TEGRA_PIN_DISABLE>;
  			};
-@@ -396,6 +397,20 @@
+@@ -396,6 +398,24 @@
  		};
  	};
  
-+	gpio-leds {
++	leds {
 +		compatible = "gpio-leds";
 +
 +		ds2 {
-+			label = "trimslice:green:right";
++			label = "green:right";
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_STATUS;
 +			gpios = <&gpio TEGRA_GPIO(D, 2) GPIO_ACTIVE_LOW>;
 +		};
 +
 +		ds3 {
-+			label = "trimslice:green:left";
++			label = "green:left";
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_STATUS;
 +			gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_LOW>;
 +		};
 +	};
-- 
2.41.0




More information about the openwrt-devel mailing list