diff --git a/acpi/README.md b/acpi/README.md new file mode 100644 index 0000000..b3471b1 --- /dev/null +++ b/acpi/README.md @@ -0,0 +1,62 @@ +# Imaging ACPI Configuration SSDT +## Overview +This directory contains imaging specific ACPI SSDT ASL sources + +Table of sensor ASL sources +| File | Component | +|---------------|---------------------------------------------| +| isx031.asl | 4x D3 ISX031 sensor with MAX9295 serializer | + +Table of common ASL include sources +| File | Component | +|---------------|-----------------------------| +| _ipu0.asl | IPU7 | +| _max96724.asl | MAX96724 GMSL2 deserializer | + +## How to compile ACPI ASL source +1. Install acpica tools version 20250807 https://github.com/acpica/acpica/releases/tag/20250807 +```sh + wget https://github.com/user-attachments/files/21674610/acpica-unix-20250807.tar.gz + tar zxf ../acpica-unix-20250807.tar.gz + cd acpica-unix-20250807/ + make + sudo make install + ``` + +2. Compile ASL source into AML file +```sh +iasl isx031.asl +``` + +## How to load imaging SSDT at boot time +1. Create initramfs containing AML file +```sh +mkdir -p kernel/firmware/acpi/ +find kernel | cpio -H newc --create > img_ssdt.img +``` + +2. Copy initfamfs to /boot directory +```sh +sudo cp img_ssdt.img /boot +``` + +3. Add following line to /etc/default/grub for GRUB to load SSDT initramf +``` +GRUB_EARLY_INITRD_LINUX_CUSTOM="img_ssdt.img" +``` +4. Rebuild GRUB configuration +```sh +sudo update-grub +``` + +5. Reboot system and inspect loading of SSDT in kernel dmesg +```sh +dmesg | grep SSDT +``` +You should see +``` +[ 0.009303] ACPI: SSDT ACPI table found in initrd [kernel/firmware/acpi/isx031.aml][0x143d] +... +[ 0.009609] ACPI: Table Upgrade: install [SSDT- - IMG_PTL] +[ 0.009611] ACPI: SSDT 0x00000000678E6000 00143D (v02 IMG_PTL 20250920 INTL 20250404) +``` diff --git a/acpi/_ipu.asl b/acpi/_ipu.asl new file mode 100644 index 0000000..14dc0fc --- /dev/null +++ b/acpi/_ipu.asl @@ -0,0 +1,27 @@ +External (_SB.PC00.IPU0, DeviceObj) + +Scope (\_SB.PC00.IPU0) +{ + Name (_DSD, Package () /* method */ + { + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () { + Package () { "mipi-img-port-0", "PRT0" },// mipi port 0 to DES0 + Package () { "mipi-img-port-2", "PRT2" },// mipi port 2 to DES1 + }, + }) + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } } + }, + }) + Name (PRT2, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } } + }, + }) +} diff --git a/acpi/_max96724.asl b/acpi/_max96724.asl new file mode 100644 index 0000000..0092d8d --- /dev/null +++ b/acpi/_max96724.asl @@ -0,0 +1,213 @@ +Device (DES0) +{ + Name (_UID, Zero) // _UID: Unique ID + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1139") + } + Method (_CID, 0, NotSerialized) // _CID: Compatible ID + { + Return ("INTC1139") + } + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 0, 6, "\\_SB.PC00.IPU0", 0,,,) // type 0 for CPHY, IPU0 local port 6 remote port 0 + I2cSerialBusV2 ( + 0x0027, // SlaveAddress + ControllerInitiated, // SlaveMode + 0x00061A80, // ConnectionSpeed + AddressingMode7Bit, // AddressingMode + "\\_SB.PC00.I2C1", // ResourceSource + 0x00, // ResourceSourceIndex + ResourceConsumer, // ResourceUsage + , // DescriptorName + Exclusive, // ShareType + ) + }) + + Name (_DEP, Package () // _DEP: Dependencies + { + \_SB.PC00.IPU0 + }) + + Name (_DSD, Package () + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "i2c-alias-pool", Package () { 0x44, 0x45, 0x46, 0x47 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, + Package () { "mipi-img-port-1", "PRT1" }, + Package () { "mipi-img-port-2", "PRT2" }, + Package () { "mipi-img-port-3", "PRT3" }, + Package () { "mipi-img-port-6", "PRT6" }, + } + }) + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } }, + }, + }) + + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + + }) + + Name (PRT2, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } }, + }, + }) + + Name (PRT3, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + + }) + + Name (PRT6, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2 } }, + Package () { "mipi-img-link-frequencies", Package() { 1200000000 } }, // 1200 MHz + }, + }) +} + +Device (DES1) +{ + Name (_UID, Zero) // _UID: Unique ID + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1139") + } + Method (_CID, 0, NotSerialized) // _CID: Compatible ID + { + Return ("INTC1139") + } + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 0, 4, "\\_SB.PC00.IPU0", 2,,,) // type 0 for CPHY, IPU0 local port 4 remote port 2 + I2cSerialBusV2 ( + 0x0027, // SlaveAddress + ControllerInitiated, // SlaveMode + 0x00061A80, // ConnectionSpeed + AddressingMode7Bit, // AddressingMode + "\\_SB.PC00.I2C2", // ResourceSource + 0x00, // ResourceSourceIndex + ResourceConsumer, // ResourceUsage + , // DescriptorName + Exclusive, // ShareType + ) + }) + + Name (_DEP, Package () // _DEP: Dependencies + { + \_SB.PC00.IPU0 + }) + + Name (_DSD, Package () + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "i2c-alias-pool", Package () { 0x44, 0x45, 0x46, 0x47 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser4 + Package () { "mipi-img-port-1", "PRT1" }, // to ser5 + Package () { "mipi-img-port-2", "PRT2" }, // to ser6 + Package () { "mipi-img-port-3", "PRT3" }, // to ser7 + Package () { "mipi-img-port-4", "PRT4" }, // to ipu0 + } + }) + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } }, + }, + }) + + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + + }) + + Name (PRT2, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package () { 1, 2, 3, 4 } }, + }, + }) + + Name (PRT3, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + + }) + + Name (PRT4, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2 } }, + Package () { "mipi-img-link-frequencies", Package() { 1200000000 } }, // 1200 MHz + }, + }) +} diff --git a/acpi/isx031.asl b/acpi/isx031.asl new file mode 100644 index 0000000..8bba8db --- /dev/null +++ b/acpi/isx031.asl @@ -0,0 +1,979 @@ +DefinitionBlock ("", "SSDT", 2, "", "IMG_PTL", 0x20250920) +{ + External (_SB.PC00, DeviceObj) + + Include ("_ipu.asl") + + Scope (\_SB.PC00) + { + Include ("_max96724.asl") + + Device (SER0) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES0", 0,,,) // type 0 for DPHY, DES1 local port 1 remote port 0 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES0", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER0", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES0 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 0 }, // channel 0 + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER1) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES0", 1,,,) // type 0 for DPHY, DES1 local port 1 remote port 1 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES0", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER1", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES0 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 1 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER2) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES0", 2,,,) // type 0 for DPHY, DES1 local port 1 remote port 2 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES0", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER2", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES0 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 2 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER3) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES0", 3,,,) // type 0 for DPHY, DES1 local port 1 remote port 3 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES0", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER3", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES0 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 3 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER4) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 0,,,) // type 0 for DPHY, DES1 local port 1 remote port 0 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER4", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 0 }, // channel 0 + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER5) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 1,,,) // type 0 for DPHY, DES1 local port 1 remote port 1 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER5", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 1 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER6) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 2,,,) // type 0 for DPHY, DES1 local port 1 remote port 2 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER6", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 2 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (SER7) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC1138") + } + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 1, "\\_SB.PC00.DES1", 3,,,) // type 0 for DPHY, DES1 local port 1 remote port 3 + I2cSerialBusV2 (0x40, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.DES1", + 0x00, ResourceConsumer,, Exclusive) + GpioIo ( + Exclusive, // Not shared + PullNone, // No need for pulls + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionOutputOnly, // Only used as output + "\\_SB.PC00.SER7", // GPIO controller + 0) // Must be 0 + { + 0, // Pin 0 + } + }) + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.DES1 + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "channel", 3 }, + Package () { "i2c-alias-pool", Package () { 0x54, 0x55 } }, // alias for cam0 + Package () { "i2c-gate", 1 }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to sensor + Package () { "mipi-img-port-1", "PRT1" } // to des + } + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + }, + }) + Name (PRT1, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM0) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER0 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER0", 0,,,) // type 0 for DPHY, SER0 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER0", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER0, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM1) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER1 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER1", 0,,,) // type 0 for DPHY, SER1 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER1", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER1, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM2) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER2 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER2", 0,,,) // type 0 for DPHY, SER2 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER2", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER2, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM3) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER3 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER3", 0,,,) // type 0 for DPHY, SER3 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER3", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER3, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM4) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER4 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER4", 0,,,) // type 0 for DPHY, SER4 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER4", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER4, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM5) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER5 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER5", 0,,,) // type 0 for DPHY, SER5 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER5", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER5, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM6) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER6 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER6", 0,,,) // type 0 for DPHY, SER6 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER6", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER6, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + + Device (CAM7) + { + Method (_STA, 0, NotSerialized) // _STA: Status + { + Return (0x0F) + } + Method (_HID, 0, NotSerialized) // _HID: Hardware ID + { + Return ("INTC113C") // ISX031 + } + Name (_DEP, Package (0x01) // _DEP: Dependencies + { + \_SB.PC00.SER7 + }) + Name(_CRS, ResourceTemplate () // _CRS: Current Resource Settings + { + CSI2Bus(DeviceInitiated, 1, 0, "\\_SB.PC00.SER7", 0,,,) // type 0 for DPHY, SER7 local port 0 remote port 0 + + I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, // actual address + AddressingMode7Bit, "\\_SB.PC00.SER7", + 0x00, ResourceConsumer,, Exclusive) + }) + Name (_DSD, Package () // _DSD: Device-Specific Data + { + + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), /* Device Properties for _DSD */, + Package () + { + Package () { "mipi-img-clock-frequency", 96000000 }, // 9.6 MHz + Package () { "channel", Zero }, // channel 0 + Package () { "reset-gpios", Package () { ^SER7, 0, 0, 0 } }, + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, + Package () + { + Package () { "mipi-img-port-0", "PRT0" }, // to ser + }, + }) + + Name (PRT0, Package() + { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () + { + Package () { "mipi-img-clock-lanes", 0 }, + Package () { "mipi-img-data-lanes", Package() { 1, 2, 3, 4 } }, + Package () { "mipi-img-link-frequencies", Package() { 600000000 } }, // 600 MHz + }, + }) + } + } +} diff --git a/patch/v6.17_iot/0011-media-mc-Add-INTERNAL-pad-flag.patch b/patch/v6.17_iot/0011-media-mc-Add-INTERNAL-pad-flag.patch new file mode 100644 index 0000000..e64d082 --- /dev/null +++ b/patch/v6.17_iot/0011-media-mc-Add-INTERNAL-pad-flag.patch @@ -0,0 +1,107 @@ +From 6897ea849a83d3a5cb5d33700aa3cd53696a0b4b Mon Sep 17 00:00:00 2001 +From: Sakari Ailus +Date: Fri, 14 Nov 2025 16:51:41 +0200 +Subject: [PATCH 11/51] media: mc: Add INTERNAL pad flag + +Internal sink pads will be used as routing endpoints in V4L2 [GS]_ROUTING +IOCTLs, to indicate that the stream begins in the entity. Internal sink +pads are pads that have both SINK and INTERNAL flags set. + +Also prevent creating links to pads that have been flagged as internal and +initialising SOURCE pads with INTERNAL flag set. + +Signed-off-by: Sakari Ailus +Reviewed-by: Tomi Valkeinen +Reviewed-by: Laurent Pinchart +Reviewed-by: Mirela Rabulea +--- + .../userspace-api/media/mediactl/media-types.rst | 9 +++++++++ + drivers/media/mc/mc-entity.c | 15 ++++++++++++--- + include/uapi/linux/media.h | 1 + + 3 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/Documentation/userspace-api/media/mediactl/media-types.rst b/Documentation/userspace-api/media/mediactl/media-types.rst +index 6332e8395263b..200c37a1da268 100644 +--- a/Documentation/userspace-api/media/mediactl/media-types.rst ++++ b/Documentation/userspace-api/media/mediactl/media-types.rst +@@ -361,6 +361,7 @@ Types and flags used to represent the media graph elements + .. _MEDIA-PAD-FL-SINK: + .. _MEDIA-PAD-FL-SOURCE: + .. _MEDIA-PAD-FL-MUST-CONNECT: ++.. _MEDIA-PAD-FL-INTERNAL: + + .. flat-table:: Media pad flags + :header-rows: 0 +@@ -381,6 +382,14 @@ Types and flags used to represent the media graph elements + enabled links even when this flag isn't set; the absence of the flag + doesn't imply there is none. + ++ * - ``MEDIA_PAD_FL_INTERNAL`` ++ - The internal flag indicates an internal pad that has no external ++ connections. As they are internal to entities, internal pads shall not ++ be connected with links. ++ ++ The internal flag may currently be present only in a sink pad where it ++ indicates that the :ref:``stream `` originates ++ from within the entity. + + One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE`` + must be set for every pad. +diff --git a/drivers/media/mc/mc-entity.c b/drivers/media/mc/mc-entity.c +index 0455909055820..04d69f042a0eb 100644 +--- a/drivers/media/mc/mc-entity.c ++++ b/drivers/media/mc/mc-entity.c +@@ -209,11 +209,16 @@ int media_entity_pads_init(struct media_entity *entity, u16 num_pads, + mutex_lock(&mdev->graph_mutex); + + media_entity_for_each_pad(entity, iter) { ++ const u32 pad_flags = iter->flags & (MEDIA_PAD_FL_SINK | ++ MEDIA_PAD_FL_SOURCE | ++ MEDIA_PAD_FL_INTERNAL); ++ + iter->entity = entity; + iter->index = i++; + +- if (hweight32(iter->flags & (MEDIA_PAD_FL_SINK | +- MEDIA_PAD_FL_SOURCE)) != 1) { ++ if (pad_flags != MEDIA_PAD_FL_SINK && ++ pad_flags != (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_INTERNAL) && ++ pad_flags != MEDIA_PAD_FL_SOURCE) { + ret = -EINVAL; + break; + } +@@ -1118,7 +1123,8 @@ int media_get_pad_index(struct media_entity *entity, u32 pad_type, + + for (i = 0; i < entity->num_pads; i++) { + if ((entity->pads[i].flags & +- (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE)) != pad_type) ++ (MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_SOURCE | ++ MEDIA_PAD_FL_INTERNAL)) != pad_type) + continue; + + if (entity->pads[i].sig_type == sig_type) +@@ -1148,6 +1154,9 @@ media_create_pad_link(struct media_entity *source, u16 source_pad, + return -EINVAL; + if (WARN_ON(!(sink->pads[sink_pad].flags & MEDIA_PAD_FL_SINK))) + return -EINVAL; ++ if (WARN_ON(source->pads[source_pad].flags & MEDIA_PAD_FL_INTERNAL) || ++ WARN_ON(sink->pads[sink_pad].flags & MEDIA_PAD_FL_INTERNAL)) ++ return -EINVAL; + + link = media_add_link(&source->links); + if (link == NULL) +diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h +index 1c80b1d6bbaf3..80cfd12a43fc1 100644 +--- a/include/uapi/linux/media.h ++++ b/include/uapi/linux/media.h +@@ -208,6 +208,7 @@ struct media_entity_desc { + #define MEDIA_PAD_FL_SINK (1U << 0) + #define MEDIA_PAD_FL_SOURCE (1U << 1) + #define MEDIA_PAD_FL_MUST_CONNECT (1U << 2) ++#define MEDIA_PAD_FL_INTERNAL (1U << 3) + + struct media_pad_desc { + __u32 entity; /* entity ID */ +-- +2.51.1 + diff --git a/patch/v6.17_iot/0012-dt-bindings-media-i2c-max96717-add-support-for-I2C-A.patch b/patch/v6.17_iot/0012-dt-bindings-media-i2c-max96717-add-support-for-I2C-A.patch new file mode 100644 index 0000000..1d69212 --- /dev/null +++ b/patch/v6.17_iot/0012-dt-bindings-media-i2c-max96717-add-support-for-I2C-A.patch @@ -0,0 +1,79 @@ +From 282d93a4c911137bffb9e1101803826d467fc083 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:42 +0200 +Subject: [PATCH 12/51] dt-bindings: media: i2c: max96717: add support for I2C + ATR + +MAX96717 is capable of address translation for the connected I2C slaves. + +Add support for I2C ATR while keeping I2C gate for compatibility to +support this usecase. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Rob Herring (Arm) +Reviewed-by: Julien Massot +--- + .../bindings/media/i2c/maxim,max96717.yaml | 39 +++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index d1e8ba6e368ec..976f6dd2c164c 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -91,6 +91,30 @@ properties: + incoming GMSL2 link. Therefore, it supports an i2c-gate + subnode to configure a sensor. + ++ i2c-alias-pool: ++ maxItems: 2 ++ ++ i2c-atr: ++ type: object ++ additionalProperties: false ++ ++ properties: ++ '#address-cells': ++ const: 1 ++ ++ '#size-cells': ++ const: 0 ++ ++ patternProperties: ++ '^i2c@[01]$': ++ $ref: /schemas/i2c/i2c-controller.yaml# ++ unevaluatedProperties: false ++ properties: ++ reg: ++ items: ++ minimum: 0 ++ maximum: 1 ++ + required: + - compatible + - reg +@@ -98,6 +122,21 @@ required: + + additionalProperties: false + ++allOf: ++ - $ref: /schemas/i2c/i2c-atr.yaml# ++ ++ - anyOf: ++ - oneOf: ++ - required: [i2c-atr] ++ - required: [i2c-gate] ++ ++ - not: ++ required: [i2c-atr, i2c-gate] ++ ++dependentRequired: ++ i2c-atr: [i2c-alias-pool] ++ i2c-alias-pool: [i2c-atr] ++ + examples: + - | + #include +-- +2.51.1 + diff --git a/patch/v6.17_iot/0013-dt-bindings-media-i2c-max96717-add-support-for-pinct.patch b/patch/v6.17_iot/0013-dt-bindings-media-i2c-max96717-add-support-for-pinct.patch new file mode 100644 index 0000000..30c078a --- /dev/null +++ b/patch/v6.17_iot/0013-dt-bindings-media-i2c-max96717-add-support-for-pinct.patch @@ -0,0 +1,136 @@ +From 60ce3a6ab17bcceca63528db5b00bb17efdcacc5 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:43 +0200 +Subject: [PATCH 13/51] dt-bindings: media: i2c: max96717: add support for + pinctrl/pinconf + +MAX96717 is capable of configuring various pin properties. + +Add pinctrl/pinconf properties to support this usecase. + +Signed-off-by: Cosmin Tanislav +Reviewed-by: Rob Herring (Arm) +Reviewed-by: Julien Massot +--- + .../bindings/media/i2c/maxim,max96717.yaml | 105 ++++++++++++++++++ + 1 file changed, 105 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index 976f6dd2c164c..d507cad18edc7 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -120,6 +120,111 @@ required: + - reg + - ports + ++patternProperties: ++ '-pins$': ++ type: object ++ additionalProperties: false ++ ++ properties: ++ function: ++ enum: [gpio, rclkout] ++ ++ pins: true ++ drive-open-drain: true ++ drive-push-pull: true ++ bias-disable: true ++ output-disable: true ++ output-enable: true ++ output-low: true ++ output-high: true ++ input-enable: true ++ ++ slew-rate: ++ description: | ++ Slew rate. ++ Rise and fall times represent the time needed for a GPIO to go ++ from 20% to 80% of VDDIO. ++ 0 - Fastest ++ rise: 1.0ns @ 1.8V, 0.6ns @ 3.3V, ++ fall: 0.8ns @ 1.8V, 0.5ns @ 3.3V ++ 1 - Fast ++ rise: 2.1ns @ 1.8V, 1.1ns @ 3.3V, ++ fall: 2.0ns @ 1.8V, 1.1ns @ 3.3V ++ 2 - Slow ++ rise: 4.0ns @ 1.8V, 2.3ns @3.3V, ++ fall: 10.0ns @ 1.8V, 5.0ns @3.3V ++ 3 - Slowest ++ rise: 9.0ns @ 1.8V, 5.0ns @3.3V, ++ fall: 10.0ns @ 1.8V, 5.0ns @3.3V ++ maximum: 3 ++ ++ bias-pull-up: ++ oneOf: ++ - type: boolean ++ description: Enable regular 40kOhm pull-up ++ - enum: [ 40000, 1000000 ] ++ description: Enable either the 40kOhm or the 1MOhm pull-up ++ ++ bias-pull-down: ++ oneOf: ++ - type: boolean ++ description: Enable regular 40kOhm pull-down ++ - enum: [ 40000, 1000000 ] ++ description: Enable either the 40kOhm or the 1MOhm pull-down ++ ++ maxim,jitter-compensation: ++ type: boolean ++ description: | ++ Enables jitter compensation. ++ Jitter compensation is used to minimize the jitter of the ++ signals transmitted from the deserializer to the serializer ++ by adding a fixed delay to every transition on the serializer ++ side. This can be used for pulse generation where timing is ++ critical. ++ ++ maxim,tx-id: ++ $ref: /schemas/types.yaml#/definitions/uint32 ++ description: ++ Enable transmission of the pin state from the serializer to ++ the deserializer using the specified identifier. ++ maximum: 31 ++ ++ maxim,rx-id: ++ $ref: /schemas/types.yaml#/definitions/uint32 ++ description: ++ Enable transmission of the pin state from the deserializer to ++ the serializer using the specified identifier. ++ maximum: 31 ++ ++ required: ++ - pins ++ - function ++ ++ allOf: ++ - $ref: /schemas/pinctrl/pincfg-node.yaml# ++ - $ref: /schemas/pinctrl/pinmux-node.yaml# ++ ++ - if: ++ properties: ++ function: ++ const: gpio ++ then: ++ properties: ++ pins: ++ items: ++ enum: [mfp0, mfp1, mfp2, mfp3, mfp4, mfp5, mfp6, mfp7, ++ mfp8, mfp9, mfp10] ++ ++ - if: ++ properties: ++ function: ++ const: rclkout ++ then: ++ properties: ++ pins: ++ items: ++ enum: [mfp2, mfp4] ++ + additionalProperties: false + + allOf: +-- +2.51.1 + diff --git a/patch/v6.17_iot/0014-dt-bindings-media-i2c-max96717-add-support-for-MAX92.patch b/patch/v6.17_iot/0014-dt-bindings-media-i2c-max96717-add-support-for-MAX92.patch new file mode 100644 index 0000000..116b317 --- /dev/null +++ b/patch/v6.17_iot/0014-dt-bindings-media-i2c-max96717-add-support-for-MAX92.patch @@ -0,0 +1,44 @@ +From b92cb2e3ad360e7792bd61682ddebfbb73b40211 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:44 +0200 +Subject: [PATCH 14/51] dt-bindings: media: i2c: max96717: add support for + MAX9295A + +MAX9295A is an older variant of the MAX96717 which does not support +tunnel mode. + +Document the compatibility. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Julien Massot +--- + .../devicetree/bindings/media/i2c/maxim,max96717.yaml | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index d507cad18edc7..bbb38b3de7dfc 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -24,12 +24,17 @@ description: + + The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the + forward direction and 187.5Mbps in the reverse direction. ++ + MAX96717F only supports a fixed rate of 3Gbps in the forward direction. + ++ MAX9295A only supports pixel mode. ++ + properties: + compatible: + oneOf: +- - const: maxim,max96717f ++ - enum: ++ - maxim,max9295a ++ - maxim,max96717f + - items: + - enum: + - maxim,max96717 +-- +2.51.1 + diff --git a/patch/v6.17_iot/0015-dt-bindings-media-i2c-max96717-add-support-for-MAX96.patch b/patch/v6.17_iot/0015-dt-bindings-media-i2c-max96717-add-support-for-MAX96.patch new file mode 100644 index 0000000..1b4e814 --- /dev/null +++ b/patch/v6.17_iot/0015-dt-bindings-media-i2c-max96717-add-support-for-MAX96.patch @@ -0,0 +1,42 @@ +From e627492bc0eb84c92678aeba9e805a7915a51952 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:45 +0200 +Subject: [PATCH 15/51] dt-bindings: media: i2c: max96717: add support for + MAX96793 + +MAX96793 is a newer variant of the MAX96717 which also supports GMSL3 +links. + +Document this compatibility. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Julien Massot +--- + .../devicetree/bindings/media/i2c/maxim,max96717.yaml | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +index bbb38b3de7dfc..0d53637a69915 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96717.yaml +@@ -29,6 +29,8 @@ description: + + MAX9295A only supports pixel mode. + ++ MAX96793 also supports GMSL3 mode. ++ + properties: + compatible: + oneOf: +@@ -38,6 +40,7 @@ properties: + - items: + - enum: + - maxim,max96717 ++ - maxim,max96793 + - const: maxim,max96717f + + '#gpio-cells': +-- +2.51.1 + diff --git a/patch/v6.17_iot/0016-dt-bindings-media-i2c-max96712-use-pattern-propertie.patch b/patch/v6.17_iot/0016-dt-bindings-media-i2c-max96712-use-pattern-propertie.patch new file mode 100644 index 0000000..bb78f4e --- /dev/null +++ b/patch/v6.17_iot/0016-dt-bindings-media-i2c-max96712-use-pattern-propertie.patch @@ -0,0 +1,76 @@ +From aa06c02dcc9026a6e976c66d9f38192b57d8f18c Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:46 +0200 +Subject: [PATCH 16/51] dt-bindings: media: i2c: max96712: use pattern + properties for ports +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The MAX96712 and MAX96724 support up to 4 separate PHYs, depending on +the selected PHY configuration. Use patternProperties to document this. + +The input ports are all the same, use patternProperties for them. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Niklas Söderlund +Reviewed-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max96712.yaml | 29 +++++++------------ + 1 file changed, 10 insertions(+), 19 deletions(-) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index 26f85151afbd3..583bbd60157c6 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -39,27 +39,15 @@ properties: + ports: + $ref: /schemas/graph.yaml#/properties/ports + +- properties: +- port@0: ++ patternProperties: ++ '^port@[0-3]$': + $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 0 ++ description: GMSL Input ports 0-3 + +- port@1: +- $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 1 +- +- port@2: +- $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 2 +- +- port@3: +- $ref: /schemas/graph.yaml#/properties/port +- description: GMSL Input 3 +- +- port@4: ++ '^port@[4-7]$': + $ref: /schemas/graph.yaml#/$defs/port-base + unevaluatedProperties: false +- description: CSI-2 Output ++ description: CSI-2 Output port 0-3 + + properties: + endpoint: +@@ -77,8 +65,11 @@ properties: + - data-lanes + - bus-type + +- required: +- - port@4 ++ anyOf: ++ - required: [port@4] ++ - required: [port@5] ++ - required: [port@6] ++ - required: [port@7] + + required: + - compatible +-- +2.51.1 + diff --git a/patch/v6.17_iot/0017-dt-bindings-media-i2c-max96712-add-support-for-I2C-A.patch b/patch/v6.17_iot/0017-dt-bindings-media-i2c-max96712-add-support-for-I2C-A.patch new file mode 100644 index 0000000..2855e4c --- /dev/null +++ b/patch/v6.17_iot/0017-dt-bindings-media-i2c-max96712-add-support-for-I2C-A.patch @@ -0,0 +1,76 @@ +From 74b4883807d4cd34c8bd64b0bcf7b18450c0a82d Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:47 +0200 +Subject: [PATCH 17/51] dt-bindings: media: i2c: max96712: add support for I2C + ATR + +MAX96712 and MAX96724 have more than one GMSL2 link, and each link is +capable of connecting to a separate serializer. If these serializers +have the same CFG pins configuration, they will also have the same I2C +address, causing conflicts unless the deserializer changes the address +of the connected serializers. + +The MAX96712 and MAX96724 support changing the I2C address of the +connected serializers. + +Document this capability. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max96712.yaml | 31 +++++++++++++++++++ + 1 file changed, 31 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index 583bbd60157c6..abacc3c874a9f 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -36,6 +36,30 @@ properties: + + enable-gpios: true + ++ i2c-alias-pool: ++ maxItems: 4 ++ ++ i2c-atr: ++ type: object ++ additionalProperties: false ++ ++ properties: ++ '#address-cells': ++ const: 1 ++ ++ '#size-cells': ++ const: 0 ++ ++ patternProperties: ++ '^i2c@[0-3]$': ++ $ref: /schemas/i2c/i2c-controller.yaml# ++ unevaluatedProperties: false ++ properties: ++ reg: ++ items: ++ minimum: 0 ++ maximum: 3 ++ + ports: + $ref: /schemas/graph.yaml#/properties/ports + +@@ -78,6 +102,13 @@ required: + + additionalProperties: false + ++allOf: ++ - $ref: /schemas/i2c/i2c-atr.yaml# ++ ++dependentRequired: ++ i2c-atr: [i2c-alias-pool] ++ i2c-alias-pool: [i2c-atr] ++ + examples: + - | + #include +-- +2.51.1 + diff --git a/patch/v6.17_iot/0018-dt-bindings-media-i2c-max96712-add-support-for-POC-s.patch b/patch/v6.17_iot/0018-dt-bindings-media-i2c-max96712-add-support-for-POC-s.patch new file mode 100644 index 0000000..9c2df0f --- /dev/null +++ b/patch/v6.17_iot/0018-dt-bindings-media-i2c-max96712-add-support-for-POC-s.patch @@ -0,0 +1,40 @@ +From bfd8cefa05b617b7bf7b33e7efaec1f1720434db Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:48 +0200 +Subject: [PATCH 18/51] dt-bindings: media: i2c: max96712: add support for POC + supplies +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The GMSL links can carry power to the serializer when using coaxial +cables. + +Document this capability. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Niklas Söderlund +Reviewed-by: Rob Herring (Arm) +--- + .../devicetree/bindings/media/i2c/maxim,max96712.yaml | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index abacc3c874a9f..d2dd72f2e9244 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -95,6 +95,10 @@ properties: + - required: [port@6] + - required: [port@7] + ++patternProperties: ++ '^port[0-3]-poc-supply$': ++ description: Regulator providing Power over Coax for GMSL ports ++ + required: + - compatible + - reg +-- +2.51.1 + diff --git a/patch/v6.17_iot/0019-dt-bindings-media-i2c-max96712-add-support-for-MAX96.patch b/patch/v6.17_iot/0019-dt-bindings-media-i2c-max96712-add-support-for-MAX96.patch new file mode 100644 index 0000000..067ab69 --- /dev/null +++ b/patch/v6.17_iot/0019-dt-bindings-media-i2c-max96712-add-support-for-MAX96.patch @@ -0,0 +1,44 @@ +From e2c38bb452e969f097b9597d6307ea5ef09f3c0b Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:49 +0200 +Subject: [PATCH 19/51] dt-bindings: media: i2c: max96712: add support for + MAX96724F/R +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +MAX96724F/MAX96724R are a lower capability variant of the MAX96724 which +only support a fixed rate of 3Gbps in the forward direction. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Niklas Söderlund +--- + .../devicetree/bindings/media/i2c/maxim,max96712.yaml | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +index d2dd72f2e9244..161d40acdd28f 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml +@@ -23,12 +23,17 @@ description: | + MAX96712 can be paired with first-generation 3.12Gbps or 1.5Gbps GMSL1 + serializers or operate up to 3.12Gbps with GMSL2 serializers in GMSL1 mode. + ++ MAX96724F and MAX96724R only support a fixed rate of 3Gbps in the forward ++ direction. ++ + properties: + compatible: + items: + - enum: + - maxim,max96712 + - maxim,max96724 ++ - maxim,max96724f ++ - maxim,max96724r + + reg: + description: I2C device address +-- +2.51.1 + diff --git a/patch/v6.17_iot/0020-dt-bindings-media-i2c-max96714-add-support-for-MAX96.patch b/patch/v6.17_iot/0020-dt-bindings-media-i2c-max96714-add-support-for-MAX96.patch new file mode 100644 index 0000000..e7aa45e --- /dev/null +++ b/patch/v6.17_iot/0020-dt-bindings-media-i2c-max96714-add-support-for-MAX96.patch @@ -0,0 +1,42 @@ +From 1d995beee79f64e57a5423f880893b7984562b90 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:50 +0200 +Subject: [PATCH 20/51] dt-bindings: media: i2c: max96714: add support for + MAX96714R + +MAX96714R is a lower capability variant of the MAX96714 which only +supports a fixed rate of 3Gbps in the forward direction. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +Reviewed-by: Julien Massot +--- + .../devicetree/bindings/media/i2c/maxim,max96714.yaml | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml +index 3ace50e11921b..ec6a91c4a51c0 100644 +--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96714.yaml +@@ -22,7 +22,9 @@ description: + + The GMSL2 serial link operates at a fixed rate of 3Gbps or 6Gbps in the + forward direction and 187.5Mbps in the reverse direction. +- MAX96714F only supports a fixed rate of 3Gbps in the forward direction. ++ ++ MAX96714F and MAX96714R only support a fixed rate of 3Gbps in the forward ++ direction. + + properties: + compatible: +@@ -31,6 +33,7 @@ properties: + - items: + - enum: + - maxim,max96714 ++ - maxim,max96714r + - const: maxim,max96714f + + reg: +-- +2.51.1 + diff --git a/patch/v6.17_iot/0021-dt-bindings-media-i2c-add-MAX9296A-MAX96716A-MAX9679.patch b/patch/v6.17_iot/0021-dt-bindings-media-i2c-add-MAX9296A-MAX96716A-MAX9679.patch new file mode 100644 index 0000000..852aeea --- /dev/null +++ b/patch/v6.17_iot/0021-dt-bindings-media-i2c-add-MAX9296A-MAX96716A-MAX9679.patch @@ -0,0 +1,294 @@ +From f116d21505263e3c0e4e9c144569f235f26a35c4 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:51 +0200 +Subject: [PATCH 21/51] dt-bindings: media: i2c: add MAX9296A, MAX96716A, + MAX96792A + +The MAX9296A deserializer converts single or dual serial inputs to MIPI +CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps or 6Gbps +in the forward direction and 187.5Mbps in the reverse direction. +In GMSL1 mode, each serial link can be paired with 3.12Gbps or 1.5Gbps +GMSL1 serializers or operate up to 4.5Gbps with GMSL2 serializers with +GMSL1 backward compatibility. The MAX9296A supports mixed GMSL2 and +GMSL1 links. The serial inputs operate independently, allowing videos +with different timings and resolutions to be received on each input. + +MAX96716A supports both tunnel and pixel mode. +MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links. + +Signed-off-by: Cosmin Tanislav +Acked-by: Rob Herring (Arm) +--- + .../bindings/media/i2c/maxim,max9296a.yaml | 242 ++++++++++++++++++ + MAINTAINERS | 6 + + 2 files changed, 248 insertions(+) + create mode 100644 Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml + +diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml +new file mode 100644 +index 0000000000000..de6bfcec5dc63 +--- /dev/null ++++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml +@@ -0,0 +1,242 @@ ++# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) ++# Copyright (C) 2024 Collabora Ltd. ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/media/i2c/maxim,max9296a.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Maxim MAX9296A GMSL2 to CSI-2 Deserializer ++ ++maintainers: ++ - Cosmin Tanislav ++ ++description: > ++ The MAX9296A deserializer converts single or dual serial inputs to ++ MIPI CSI-2 outputs. The GMSL2 links operate at a fixed rate of 3Gbps ++ or 6Gbps in the forward direction and 187.5Mbps in the reverse ++ direction. In GMSL1 mode, each serial link can be paired with 3.12Gbps ++ or 1.5Gbps GMSL1 serializers or operate up to 4.5Gbps with GMSL2 ++ serializers with GMSL1 backward compatibility. The MAX9296A supports ++ mixed GMSL2 and GMSL1 links. The serial inputs operate independently, ++ allowing videos with different timings and resolutions to be received ++ on each input. ++ ++ MAX96716A supports both tunnel and pixel mode. ++ ++ MAX96792A supports both tunnel and pixel mode, and has two GMSL3 links. ++ ++properties: ++ compatible: ++ enum: ++ - maxim,max9296a ++ - maxim,max96716a ++ - maxim,max96792a ++ ++ reg: ++ maxItems: 1 ++ ++ powerdown-gpios: ++ maxItems: 1 ++ description: Specifier for the GPIO connected to the PWDNB pin. ++ ++ port0-poc-supply: ++ description: Regulator providing Power over Coax for GMSL port 0 ++ ++ port1-poc-supply: ++ description: Regulator providing Power over Coax for GMSL port 1 ++ ++ i2c-alias-pool: ++ maxItems: 2 ++ ++ i2c-atr: ++ type: object ++ additionalProperties: false ++ ++ properties: ++ '#address-cells': ++ const: 1 ++ ++ '#size-cells': ++ const: 0 ++ ++ patternProperties: ++ '^i2c@[0-1]$': ++ $ref: /schemas/i2c/i2c-controller.yaml# ++ unevaluatedProperties: false ++ properties: ++ reg: ++ items: ++ minimum: 0 ++ maximum: 1 ++ ++ ports: ++ $ref: /schemas/graph.yaml#/properties/ports ++ ++ patternProperties: ++ '^port@[0-1]$': ++ $ref: /schemas/graph.yaml#/properties/port ++ description: GMSL Input ports 0-1 ++ ++ '^port@[2-3]$': ++ $ref: /schemas/graph.yaml#/$defs/port-base ++ unevaluatedProperties: false ++ description: CSI-2 Output ports 0-1 ++ properties: ++ endpoint: ++ $ref: /schemas/media/video-interfaces.yaml# ++ unevaluatedProperties: false ++ ++ properties: ++ data-lanes: ++ minItems: 1 ++ maxItems: 4 ++ ++ lane-polarities: ++ minItems: 2 ++ maxItems: 5 ++ ++ link-frequencies: ++ maxItems: 1 ++ ++ required: ++ - data-lanes ++ ++ anyOf: ++ - required: ++ - port@2 ++ - required: ++ - port@3 ++ ++required: ++ - compatible ++ - reg ++ - ports ++ ++additionalProperties: false ++ ++allOf: ++ - $ref: /schemas/i2c/i2c-atr.yaml# ++ ++dependentRequired: ++ i2c-atr: [i2c-alias-pool] ++ i2c-alias-pool: [i2c-atr] ++ ++examples: ++ - | ++ #include ++ #include ++ ++ i2c { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ deserializer@28 { ++ compatible = "maxim,max9296a"; ++ reg = <0x28>; ++ powerdown-gpios = <&main_gpio0 37 GPIO_ACTIVE_LOW>; ++ ++ i2c-alias-pool = <0x40 0x41>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ des_gmsl_in_0: endpoint { ++ remote-endpoint = <&ser_0_gmsl_out>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ des_gmsl_in_1: endpoint { ++ remote-endpoint = <&ser_1_gmsl_out>; ++ }; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ des_csi_out: endpoint { ++ data-lanes = <1 2 3 4>; ++ link-frequencies = /bits/ 64 <400000000>; ++ remote-endpoint = <&csi_in>; ++ }; ++ }; ++ }; ++ ++ i2c-atr { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c@0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <0>; ++ ++ serializer@40 { ++ compatible = "maxim,max96717", "maxim,max96717f"; ++ reg = <0x40>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ #clock-cells = <0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ ser_0_csi_in: endpoint { ++ data-lanes = <1 2>; ++ remote-endpoint = <&sensor_0_out>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ ser_0_gmsl_out: endpoint { ++ remote-endpoint = <&des_gmsl_in_0>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ ++ i2c@1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ reg = <1>; ++ ++ serializer@40 { ++ compatible = "maxim,max96717", "maxim,max96717f"; ++ reg = <0x40>; ++ gpio-controller; ++ #gpio-cells = <2>; ++ #clock-cells = <0>; ++ ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ ser_1_csi_in: endpoint { ++ data-lanes = <1 2>; ++ remote-endpoint = <&sensor_1_out>; ++ }; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ ser_1_gmsl_out: endpoint { ++ remote-endpoint = <&des_gmsl_in_1>; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++ }; ++... +diff --git a/MAINTAINERS b/MAINTAINERS +index 37c00034d0a0d..0be95cb256996 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -14995,6 +14995,12 @@ S: Maintained + F: Documentation/devicetree/bindings/iio/proximity/maxbotix,mb1232.yaml + F: drivers/iio/proximity/mb1232.c + ++MAXIM GMSL2/3 SERIALIZERS AND DESERIALIZERS ++M: Cosmin Tanislav ++L: linux-media@vger.kernel.org ++S: Maintained ++F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml ++ + MAXIM MAX11205 DRIVER + M: Ramona Bolboaca + L: linux-iio@vger.kernel.org +-- +2.51.1 + diff --git a/patch/v6.17_iot/0022-media-i2c-add-Maxim-GMSL2-3-serializer-and-deseriali.patch b/patch/v6.17_iot/0022-media-i2c-add-Maxim-GMSL2-3-serializer-and-deseriali.patch new file mode 100644 index 0000000..9ab072e --- /dev/null +++ b/patch/v6.17_iot/0022-media-i2c-add-Maxim-GMSL2-3-serializer-and-deseriali.patch @@ -0,0 +1,720 @@ +From eab10c22adadf12d7cc2863c4a59ffa8cbc776f0 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 14 Nov 2025 16:51:52 +0200 +Subject: [PATCH 22/51] media: i2c: add Maxim GMSL2/3 serializer and + deserializer framework + +These drivers are meant to be used as a common framework for Maxim +GMSL2/3 serializers and deserializers. + +This framework enables support for the following new features across +all the chips: + * Full Streams API support + * .get_frame_desc() + * .get_mbus_config() + * I2C ATR + * automatic GMSL link version negotiation + * automatic stream id selection + * automatic VC remapping + * automatic pixel mode / tunnel mode selection + * automatic double mode selection / data padding + * logging of internal state and chip status registers via .log_status() + * PHY modes + * serializer pinctrl + * TPG + +Signed-off-by: Cosmin Tanislav +--- + MAINTAINERS | 1 + + drivers/media/i2c/Kconfig | 2 + + drivers/media/i2c/Makefile | 1 + + drivers/media/i2c/maxim-serdes/Kconfig | 17 + + drivers/media/i2c/maxim-serdes/Makefile | 3 + + drivers/media/i2c/maxim-serdes/max_serdes.c | 413 ++++++++++++++++++++ + drivers/media/i2c/maxim-serdes/max_serdes.h | 183 +++++++++ + 7 files changed, 620 insertions(+) + create mode 100644 drivers/media/i2c/maxim-serdes/Kconfig + create mode 100644 drivers/media/i2c/maxim-serdes/Makefile + create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.c + create mode 100644 drivers/media/i2c/maxim-serdes/max_serdes.h + +diff --git a/MAINTAINERS b/MAINTAINERS +index 0be95cb256996..a7814ecf91fbb 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -15000,6 +15000,7 @@ M: Cosmin Tanislav + L: linux-media@vger.kernel.org + S: Maintained + F: Documentation/devicetree/bindings/media/i2c/maxim,max9296a.yaml ++F: drivers/media/i2c/maxim-serdes/ + + MAXIM MAX11205 DRIVER + M: Ramona Bolboaca +diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig +index d7e8a0b986a32..52d22b93dde46 100644 +--- a/drivers/media/i2c/Kconfig ++++ b/drivers/media/i2c/Kconfig +@@ -1714,6 +1714,8 @@ config VIDEO_MAX96717 + To compile this driver as a module, choose M here: the + module will be called max96717. + ++source "drivers/media/i2c/maxim-serdes/Kconfig" ++ + endmenu + + endif # VIDEO_DEV +diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile +index 085c0e0e15dd9..22813cf584eff 100644 +--- a/drivers/media/i2c/Makefile ++++ b/drivers/media/i2c/Makefile +@@ -72,6 +72,7 @@ obj-$(CONFIG_VIDEO_MAX9271_LIB) += max9271.o + obj-$(CONFIG_VIDEO_MAX9286) += max9286.o + obj-$(CONFIG_VIDEO_MAX96714) += max96714.o + obj-$(CONFIG_VIDEO_MAX96717) += max96717.o ++obj-$(CONFIG_VIDEO_MAXIM_SERDES) += maxim-serdes/ + obj-$(CONFIG_VIDEO_ML86V7667) += ml86v7667.o + obj-$(CONFIG_VIDEO_MSP3400) += msp3400.o + obj-$(CONFIG_VIDEO_MT9M001) += mt9m001.o +diff --git a/drivers/media/i2c/maxim-serdes/Kconfig b/drivers/media/i2c/maxim-serdes/Kconfig +new file mode 100644 +index 0000000000000..f5a4ca80a263b +--- /dev/null ++++ b/drivers/media/i2c/maxim-serdes/Kconfig +@@ -0,0 +1,17 @@ ++# SPDX-License-Identifier: GPL-2.0 ++ ++config VIDEO_MAXIM_SERDES ++ tristate "Maxim GMSL2/3 Serializer and Deserializer support" ++ depends on VIDEO_DEV ++ depends on I2C ++ select I2C_ATR ++ select I2C_MUX ++ select MEDIA_CONTROLLER ++ select V4L2_FWNODE ++ select VIDEO_V4L2_SUBDEV_API ++ help ++ This driver supports the Maxim GMSL2/3 common Serializer and ++ Deserializer framework. ++ ++ To compile this driver as a module, choose M here: the module ++ will be called max_serdes. +diff --git a/drivers/media/i2c/maxim-serdes/Makefile b/drivers/media/i2c/maxim-serdes/Makefile +new file mode 100644 +index 0000000000000..630fbb486bab1 +--- /dev/null ++++ b/drivers/media/i2c/maxim-serdes/Makefile +@@ -0,0 +1,3 @@ ++# SPDX-License-Identifier: GPL-2.0 ++max-serdes-objs := max_serdes.o ++obj-$(CONFIG_VIDEO_MAXIM_SERDES) += max-serdes.o +diff --git a/drivers/media/i2c/maxim-serdes/max_serdes.c b/drivers/media/i2c/maxim-serdes/max_serdes.c +new file mode 100644 +index 0000000000000..bed70b8ce99a4 +--- /dev/null ++++ b/drivers/media/i2c/maxim-serdes/max_serdes.c +@@ -0,0 +1,413 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (C) 2025 Analog Devices Inc. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include